diff options
author | Britney Fransen <brfransen@gmail.com> | 2013-12-26 20:13:40 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2013-12-26 20:13:40 (GMT) |
commit | af515b99f692bcf1f0af57aabe8f7c1a950b32c5 (patch) | |
tree | d2cbd0bd7a159adac8ebc749e6c76d005ad4a42e | |
parent | 45f667c9512475b4cb5c5290557dea854d056634 (diff) | |
parent | 816f6f419c662354f4224f8d82387fc27693b0fb (diff) | |
download | linhes_pkgbuild-af515b99f692bcf1f0af57aabe8f7c1a950b32c5.zip linhes_pkgbuild-af515b99f692bcf1f0af57aabe8f7c1a950b32c5.tar.gz linhes_pkgbuild-af515b99f692bcf1f0af57aabe8f7c1a950b32c5.tar.bz2 |
Merge branch 'testing'
285 files changed, 22444 insertions, 2194 deletions
@@ -24,3 +24,5 @@ srclinks.* */git_src/mythtv abs/core/mythtv/stable-0.25/git_src/mythtv abs/core/mythtv/stable-0.25/git_src/mythweb +abs/core/mythtv/stable-0.27/git_src/mythtv +abs/core/mythtv/stable-0.27/git_src/mythweb diff --git a/abs/core/LinHES-config/LinHES-release b/abs/core/LinHES-config/LinHES-release index 747db47..f4126e5 100644 --- a/abs/core/LinHES-config/LinHES-release +++ b/abs/core/LinHES-config/LinHES-release @@ -1 +1 @@ -LinHES 8.0 (Trip the bits) +LinHES R8.1 (It isn't only a girl's name) diff --git a/abs/core/LinHES-config/PKGBUILD b/abs/core/LinHES-config/PKGBUILD index d4983bb..75b93a2 100755 --- a/abs/core/LinHES-config/PKGBUILD +++ b/abs/core/LinHES-config/PKGBUILD @@ -1,12 +1,12 @@ pkgname=LinHES-config -pkgver=8.0 -pkgrel=11 +pkgver=8.1 +pkgrel=8 conflicts=(MythVantage-config MythVantage-config-dev LinHES-config-dev LinHes-config ) pkgdesc="Install and configure your system" -depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted' +depends=('bc' 'libstatgrab' 'mysql-python' 'expect' 'curl' 'dnsutils' 'parted' 'sg3_utils' 'nmbscan' 'system-templates' 'rsync' 'python-parted' 'python-pexpect' 'python-netifaces' 'xcursor-vanilla-dmz-aa' - 'python-iplib' 'mythinstall>=2-10' 'sudo' 'setserial' 'udevil') + 'python-iplib' 'sudo' 'setserial' 'udevil' 'balance' ) arch=('i686' 'x86_64') source=(mv_install.py 09_mythvantge_runit_grub @@ -19,7 +19,7 @@ source=(mv_install.py 09_mythvantge_runit_grub install_db_chroot.sh restore_default_settings.sh myth_settings_wrapper.sh - xconfig.sh + xconfig.sh timezip.py soundconfig.sh LinHES-release @@ -133,13 +133,13 @@ package() { install -o root -g root -D -m 0755 blacklist_nouveau.conf $pkgdir/etc/modprobe.d/blacklist_nouveau.conf } -md5sums=('c832059cd635359d39a2ac3166ff463c' +md5sums=('8ee14247b04ab4152d4919d4d4b8d869' '3f6855b7bb860a44f96a972c2e80f497' - 'aaeb581275433649ff74e05da5e61a78' + 'f6e9dd7bc6cf0aaa3bd203dab4cb79b9' '2596460462cf6c889cf8f95485537b20' '985891a43f7c4c983eb2a362162f1a0f' - 'fda01259a4bc74d83c9092d338bd247a' - '768504ef10ecd11a22875ccea9fcf62b' + '261ba62515edd7a13d46cbeb1b0eadca' + '31106caee7f621e7c5f008ccd9600b36' 'f73d6d6f98839e900cb6685bf5dc4eae' 'b8becf69d4309b938ceba3178c799270' '2a7f3b34e522acfd08283b86c8926aba' @@ -147,12 +147,12 @@ md5sums=('c832059cd635359d39a2ac3166ff463c' '5012fbd31d205a6d6b0a1d8caf3eba8f' '157e73d0f90d7b306aba8f5921aeedd3' 'a805504b6593eaa416fe5f32cd4d1b9e' - '8ba06c2ce6129371548cc360ccca27f8' + '952af1c0a44579c04a405ffce9aed264' '5f890ea9bda6aef652d2560ca19dac07' 'ab2aa42c2947148c2b1cac0ade6d1d55' 'd429b59d3cfb37b0624c6a4a71a7c2c0' 'f6a935c35123fdc7c259c01cbc794a64' - '5e865cc04fe5de8a39d9c1e377fc4ebe' + 'b3ce302473883ca118d4a58f1b1306e2' 'd3490e93f313bbbcbc6c3693c56b9c17' 'e959df98947eb0d2ea64ff616b61aab5' '2506860a416e1988934225d80d501c2c' @@ -171,7 +171,7 @@ md5sums=('c832059cd635359d39a2ac3166ff463c' '299c24c0820fc9c483c820db2595e3cb' 'cf51cb22e23218ae7e9b55cac1ba3a7f' '781f161a79c3188a31c8615b8258b241' - '540a5b7f63a83ad53d6924c637bfd1c7' + '70749be12c98d4b8fd283bd5dd9182bb' '2596460462cf6c889cf8f95485537b20' 'dc3c5270691a62600475705f4cb78b56' '4804aa93aaad3dfcfff08cd9ffd68836' @@ -181,4 +181,4 @@ md5sums=('c832059cd635359d39a2ac3166ff463c' 'c9279fa095af624ee3d9bc75d3328360' '02cf69074d2bbacef05fa3e451af9af3' '85d15efc55074a94c58d44542ea1dd13' - 'e410d108ed4778dd898dc68fad4e8828') + '7acbd2064db905e76372a0618b24a6d9') diff --git a/abs/core/LinHES-config/autocard.py b/abs/core/LinHES-config/autocard.py index c461714..19563a4 100644..100755 --- a/abs/core/LinHES-config/autocard.py +++ b/abs/core/LinHES-config/autocard.py @@ -766,20 +766,21 @@ def gather_ceton(tuner_list): command="/usr/MythVantage/bin/discover_infinitv.py %s" %iface results=os.popen(command,'r') lines=results.readlines() - #try: - if lines[0].strip().split()[0] == "no": - print "Ceton not detected" - else: - for line in lines: - #Found InfiniTV. Location URL: http://192.168.200.1/description.xml - #cetondevice = line.strip().split()[0] - cetonip = line.strip().split("/")[2] - - tuners = [0,1,2,3] - for t in tuners: - tuner_list.append(infinitv_tuner(t,cetonip)) - #except: - # print "Error finding Ceton InfinitTV" + try: + print lines + if lines[0].strip().split()[0].lower() == "no": + print "Ceton not detected on %s" %iface + else: + for line in lines: + #Found InfiniTV. Location URL: http://192.168.200.1/description.xml + #cetondevice = line.strip().split()[0] + cetonip = line.strip().split("/")[2] + + tuners = [0,1,2,3] + for t in tuners: + tuner_list.append(infinitv_tuner(t,cetonip)) + except: + print "Error finding Ceton InfinitTV on %s" %iface return tuner_list @@ -816,11 +817,16 @@ def find_ceton_network_list(): for i in netinterfaces: if i.startswith("ctn") or i.startswith("usb"): #configure and start ctn network - config_ctn_network(i) - - #read ip - ctnip.append(netifaces.ifaddresses(i) - [netifaces.AF_INET][0]['addr']) + try: + config_ctn_network(i) + + #read ip + ctnip.append(netifaces.ifaddresses(i) + [netifaces.AF_INET][0]['addr']) + except: + print " * Error scanning network interface %s" %i + print " * Please check that the interface is ready and configured" + return ctnip #--end of linhes specific diff --git a/abs/core/LinHES-config/config.install b/abs/core/LinHES-config/config.install index c9171a6..4c99e03 100644 --- a/abs/core/LinHES-config/config.install +++ b/abs/core/LinHES-config/config.install @@ -15,6 +15,7 @@ post_install() { echo "List of packages to ignore" > /etc/blacklist.package echo "one package per line" >> /etc/blacklist.package fi + cat /etc/LinHES-release > /etc/os_myth_release } # arg 1: the new package version diff --git a/abs/core/LinHES-config/discover_infinitv.py b/abs/core/LinHES-config/discover_infinitv.py index 5c39c59..421ba84 100755 --- a/abs/core/LinHES-config/discover_infinitv.py +++ b/abs/core/LinHES-config/discover_infinitv.py @@ -74,7 +74,7 @@ if __name__ == "__main__": try: timeout = float(sys.argv[2]) except: - timeout=5 + timeout=15 L = find_the_infiniTV(interface_ip=interface_ip) thread.start_new_thread(L.listen, ()) time.sleep(timeout) diff --git a/abs/core/LinHES-config/install_functions.sh b/abs/core/LinHES-config/install_functions.sh index fd33e00..d841947 100755 --- a/abs/core/LinHES-config/install_functions.sh +++ b/abs/core/LinHES-config/install_functions.sh @@ -49,7 +49,7 @@ function parse_cmdline_2_db(){ function bootsplash_setup (){ - echo $CMDLINE | grep -q splash=silent + echo $CMDLINE | grep -q splash if [ $? -eq 0 ] then update_db_settings Hostbootsplash 1 diff --git a/abs/core/LinHES-config/install_proxy.sh b/abs/core/LinHES-config/install_proxy.sh index 99609cc..7d987f5 100755 --- a/abs/core/LinHES-config/install_proxy.sh +++ b/abs/core/LinHES-config/install_proxy.sh @@ -1,6 +1,7 @@ #!/bin/bash export TERM=vt100 MVHOSTNAME=apheleia +export MYTH_RUN_STATUS="1" . /etc/profile TEMP_TEMPLATES=/tmp/templates disk=$2 diff --git a/abs/core/LinHES-config/mv_config.py b/abs/core/LinHES-config/mv_config.py index f15f41c..e2c3b83 100755 --- a/abs/core/LinHES-config/mv_config.py +++ b/abs/core/LinHES-config/mv_config.py @@ -13,7 +13,7 @@ NOOPDEBUG="FALSE" TEMP_TEMPLATES="/tmp/templates" share_exclude_dir=['mysql','srv'] -SG_MAP_AUTONFS_SKIP=['media/tv','media/video','media/video_stuff','media/streaming'] +SG_MAP_AUTONFS_SKIP=['media/tv','media/music','media/video','media/artwork','media/streaming'] MAP_AUTONFS_SKIP=['lost+found','media','backup'] nfs_options="hard,intr,actimeo=0" diff --git a/abs/core/LinHES-config/mv_install.py b/abs/core/LinHES-config/mv_install.py index 57b784b..ba88ade 100755 --- a/abs/core/LinHES-config/mv_install.py +++ b/abs/core/LinHES-config/mv_install.py @@ -1255,7 +1255,7 @@ def double_mount(fe_only=False, upgrade=False): cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount" else: #cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --no_mount" - cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --add_fe_sg --add_be_sg " + cmd = "chroot " + data_config.MOUNTPOINT +" /usr/LH/bin/add_storage.py --double_myth --add_sg" if runcmd(cmd)[0] == 0: logging.debug(" Add storage worked, breaking out of loop") diff --git a/abs/core/LinHES-config/systemconfig.py b/abs/core/LinHES-config/systemconfig.py index 07b2820..1af9daf 100755 --- a/abs/core/LinHES-config/systemconfig.py +++ b/abs/core/LinHES-config/systemconfig.py @@ -53,25 +53,52 @@ def setup_x(systemconfig): def generate_config_xml(uuid,dbhost): - configxml_t =''' -<Configuration> + #configxml_t =''' +#<Configuration> + #<UPnP> + #<UDN> + #<MediaRenderer>%s</MediaRenderer> + #</UDN> + #<MythFrontend> + #<DefaultBackend> + #<DBHostName>%s</DBHostName> + #<DBUserName>mythtv</DBUserName> + #<DBPassword>mythtv</DBPassword> + #<DBName>mythconverg</DBName> + #<DBPort>0</DBPort> + #</DefaultBackend> + #</MythFrontend> + #</UPnP> +#</Configuration> + #''' + configxml_t=''' + <Configuration> + <LocalHostName>my-unique-identifier-goes-here</LocalHostName> + <Database> + <PingHost>1</PingHost> + <Host>%s</Host> + <UserName>mythtv</UserName> + <Password>mythtv</Password> + <DatabaseName>mythconverg</DatabaseName> + <Port>3306</Port> + </Database> + <WakeOnLAN> + <Enabled>0</Enabled> + <SQLReconnectWaitTime>0</SQLReconnectWaitTime> + <SQLConnectRetry>5</SQLConnectRetry> + <Command>echo 'WOLsqlServerCommand not set'</Command> + </WakeOnLAN> <UPnP> <UDN> <MediaRenderer>%s</MediaRenderer> </UDN> - <MythFrontend> - <DefaultBackend> - <DBHostName>%s</DBHostName> - <DBUserName>mythtv</DBUserName> - <DBPassword>mythtv</DBPassword> - <DBName>mythconverg</DBName> - <DBPort>0</DBPort> - </DefaultBackend> - </MythFrontend> </UPnP> </Configuration> ''' - configxml= configxml_t %(uuid,dbhost) + + + + configxml= configxml_t %(dbhost,uuid) return configxml def gen_uuid(): diff --git a/abs/core/LinHES-system/LinHES-run b/abs/core/LinHES-system/LinHES-run deleted file mode 100755 index 0de0feb..0000000 --- a/abs/core/LinHES-system/LinHES-run +++ /dev/null @@ -1,149 +0,0 @@ -#!/bin/sh -exit 0 -################################################################ -# WARNING THIS FILE IS DEPRECATED -# any changes to this file must also be made to LinHES-session -# -# -############################################################### -function msg(){ - echo -e "$1" | osd_cat --pos=middle --align=center --offset=200 --delay=5 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & -} - -. /etc/profile -. /etc/systemconfig -. /etc/unclutter.cfg || { - idle=1 - jitter=200 -} -. /etc/osd_cat.cfg || { - color=yellow - outline=2 - outlinecolour=black - shadow=0 - shadowcolour=black - font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" -} -#keylaunch & -#/usr/bin/tilda & - -lsmod |cut -f1 -d" " |grep -q nvidia -if [ $? = 0 ] -then - /usr/bin/nvidia-settings --load-config-only -fi - -#move mouse to corner -xdotool mousemove 0 0 -/usr/X11R6/bin/unclutter -root -idle $idle -jitter $jitter -noevents & -if [ x"$Screensavertype" = "xgscreensaver" ] -then - gnome-screensaver & -elif [ x"$Screensavertype" = "xxscreensaver" ] -then - xscreensaver -no-splash & -fi - -/usr/bin/xvattr -a XV_COLORKEY -v 0 -mtd & -#/usr/bin/nvidia-settings -l -#/usr/bin/nvidia-settings -a InitialPixmapPlacement=2 - -if [ x$ShowTips = "x1" ] -then - msg "Alt+h for help" & -fi - -# Run any scripting that applies to special hardware. These brand-specific commands that run -# after Tweaker will, of course, override generic or hardware-specific settings. -SpecialHardwareCommands() { - special_hardware_file=/myth/.special_hardware_type - special_hardware=`cat $special_hardware_file` - - case $special_hardware in - dragon*) - sudo -E twk_audio.pl --implement digital - sudo -E twk_dragon.pl --implement all - ;; - ausdragon*) - ;; - *) - # there are no brand-specific commands for configuring whatever - # special hardware the user chose - ;; - esac -} - -#update apple trailers -if [[ x$RunFrontend = x1 && -f ~/.configure ]] -then - /usr/bin/php -q /usr/bin/myth_trailers_grabber > /home/mythtv/appletrailer.xml && /usr/bin/fix_aple_url.sh 2>/dev/null & -fi - - -if [ ! $SystemType = "Frontend_only" ] -then - if [ -f ~/.configure ] - then - # Run Tweaker, which applies generic and hardware-specific settings - if [ ! -f ~/.no_meth ] - then - #remove tweaker cause it's broken and duplicates entries - #sudo -E tweaker.pl - #/bin/rm /tmp/fps # ??? clean up a temp file that will eventually be obsolete anyway - # Run any brand-specific commands, if necessary. - SpecialHardwareCommands - else - rm -f ~/.no_meth - fi - sudo pacman -R --noconfirm myth2ipod myt2xvid3 - sudo pacman -S --noconfirm myth2ipod myt2xvid3 -# sudo ln -s /usr/share/mythtv/mythexport /data/srv/httpd/htdocs - sudo sv stop mythbackend - /usr/LH/bin/dtheme.sh - xterm -fn *18* -e sudo taskset -c 0 /usr/bin/mythtv-setup - sudo sv start mythbackend - sudo sv stop mythexport - sudo pacman -R --noconfirm mythexport - sudo pacman -S --noconfirm mythexport - sudo chown -R mythtv.mythtv /home/mythtv - nice -n 19 mythfilldatabase --quiet & - msg "Guide data is being loaded. \n Until this completes\n some shows will appear as unknown \n in the program guide." - rm ~/.configure - fi -fi - - -if [ x"$UseMythWelcome" = "x1" ] -then - STARTCMD="/usr/bin/mythwelcome" -else - if pacman -Q mythtv | grep -q 0.24 - then - STARTCMD="/usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log" - else - STARTCMD="/usr/bin/mythfrontend -d --syslog local6" - fi -fi - -echo "=====================================================================" -echo "Starting $STARTCMD" -firstboot.sh & - -if [ -f /tmp/nomfe ] -then - exit 0 -else - if [ -f /tmp/debug ] - then - echo "using gbd/debug" - gdb /usr/bin/mythfrontend -x $MV_ROOT/mfegdbcommands.txt - mv gdb.txt gdb.txt.mythfrontend - sleep 10 - else - killall -9 irexec - /usr/bin/irexec -d - $STARTCMD 2>&1 - fi -fi - diff --git a/abs/core/LinHES-system/LinHES-session b/abs/core/LinHES-system/LinHES-session index a8c8c09..c6d0b09 100755 --- a/abs/core/LinHES-system/LinHES-session +++ b/abs/core/LinHES-system/LinHES-session @@ -75,7 +75,7 @@ function start_x11vnc(){ . /etc/x11vnc.cfg x11vnc $x11vnc_options else - x11vnc -rfbport 5902 --passwd $xvncpassword + x11vnc -forever -rfbport 5902 --passwd $xvncpassword fi fi } @@ -286,12 +286,7 @@ function start_myth() { then STARTCMD="/usr/bin/mythwelcome" else - if pacman -Q mythtv | grep -q 0.24 - then - STARTCMD="/usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log" - else - STARTCMD="/usr/bin/mythfrontend $MYTH_ARGS" - fi + STARTCMD="/usr/bin/mythfrontend $MYTH_ARGS" fi echo "=====================================================================" @@ -304,10 +299,16 @@ function start_myth() { while [ $rc -ne 0 ] do msg "Waiting for connection to MythBackend" + sleep 6 /usr/LH/bin/be_check.py rc=$? - sleep 6 + if [ $rc -eq 0 ] + then + msg "Successful Connection to MythBackend" + fi done + sleep 3 #give time for MBE to be fully operational + fi #continue on with starting mythtv diff --git a/abs/core/LinHES-system/LinHES-start b/abs/core/LinHES-system/LinHES-start index 3157a2e..88ecffb 100755 --- a/abs/core/LinHES-system/LinHES-start +++ b/abs/core/LinHES-system/LinHES-start @@ -12,6 +12,7 @@ # # $XFree86: xc/programs/xinit/startx.cpp,v 3.16tsi Exp $ . /etc/profile +MYTH_RUN_STATUS="1" unset DBUS_SESSION_BUS_ADDRESS unset SESSION_MANAGER diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 71c7ae1..b0b8ba7 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system -pkgver=8.0 -pkgrel=29 +pkgver=8.1 +pkgrel=10 arch=('i686' 'x86_64') install=system.install pkgdesc="Everything that makes LinHES an automated system" @@ -11,14 +11,14 @@ depends=('linhes-sounds' 'xdotool' 'tilda' 'keylaunch' 'ethtool' 'gnu-netcat' 'normalize' 'ttf-overlock' 'handbrake-cli' 'mkvtoolnix' 'mplayer') backup=('etc/modprobe.d/alsa-base.conf') -binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh - LinHES-run load-modules-mythvantage.sh unclutter-toggle.sh tvterm.sh +binfiles="LinHES-start optimize_mythdb.py myth_mtc.py + load-modules-mythvantage.sh unclutter-toggle.sh tvterm.sh mythfrontend-start set_windowmanager.sh myth_status.py myth_status.sh install_supplemental_service.sh get_airplay_key importfiles.sh lh_system_backup lh_system_backup_job lh_system_restore_job lh_system_host_update lh_system_all_host_update add_storage.py diskspace.sh cacheclean lh_backend_control.sh - switch_web.sh create_media_dirs.sh msg_client.py msg_daemon.py + create_media_dirs.sh msg_client.py msg_daemon.py gen_is_xml.py gen_lib_xml.py gen_light_include.py gen_game_xml.py misc_recent_recordings.pl misc_status_config.py misc_status_info.sh misc_upcoming_recordings.pl misc_which_recorder.pl @@ -28,9 +28,9 @@ binfiles="LinHES-start optimize_mythdb.py myth_mtc.py myth_mtc.sh mythwelcome-config.py mythwelcome-set-alarm.sh mythwelcome-test-wakeup.sh" source=(LinHES-session LinHES-profile.sh $binfiles - alsa-base diskspace.cron cacheclean.cron xfs_defrag.cron + alsa-base cacheclean.cron myth_mtc.cron xfs_defrag.cron readme_is_xml readme_light add_storage.readme - system-sudo.rules ) + system-sudo.rules msg.cfg) package() { cd $srcdir @@ -61,8 +61,8 @@ package() { #cron files #install -m755 -D $srcdir/smolt.cron $pkgdir/etc/cron.weekly/smolt.cron install -m755 -D $srcdir/cacheclean.cron $pkgdir/etc/cron.weekly/cacheclean - install -m755 -D $srcdir/diskspace.cron $pkgdir/etc/cron.tenminutes/diskspace install -m755 -D $srcdir/xfs_defrag.cron $pkgdir/etc/cron.weekly/xfs_defrag + install -m755 -D $srcdir/myth_mtc.cron $pkgdir/etc/cron.hourly/myth_mtc #sudo rules mkdir -p $pkgdir/etc/sudoers.d/ @@ -70,36 +70,36 @@ package() { chown -R root:root $pkgdir/etc/sudoers.d install -o root -g root -m 0750 $srcdir/system-sudo.rules $pkgdir/etc/sudoers.d/system_sudo + #config file of msg_daemon + install -m755 -D $srcdir/msg.cfg $pkgdir/usr/MythVantage/etc/msg.cfg + } -md5sums=('5ee78704cab0e88ec58d1aab821fc1aa' +md5sums=('7f5624a2d965a4cd3ed6a37ebee13fd9' 'de32a1c50101265dd7f6ca5037f7a26a' - 'a875ee97f86e46f34a741c2bc455f894' + '301884fb60521627fffd1160b2cf5181' '76b2637cac0452b3acdbeeb4e8a5474b' - '781c977f8872543f033dad2caaf0458e' - '6f5b757524d905b5d2420519a88edc93' - '4b4585ccba30595cf958d202997c57f7' + '22807bd1e37d2a07bc0bd3f2a9fd2bb4' 'dc3eef2a624754e16805d72bbe488b67' '617af86b901538817ebdcaf646248dc5' '542e670e78d117657f93141e9689f54d' - '41951459ea9d2b0567be521b67e6285a' + '8da6a7f1703a002f84e66629e847d8a6' 'bb72ab230c7a71706285bd0f31a4fb1f' - '692563448cca1d49f45e7d1c8abcaa0c' + 'f8683caddf74dca1ea5cc3db4d748764' '962a3e9eaba2d1466251b7ab0956705d' '1758aed160de64abfafb28a3a8f3390e' '33fbebbd546672cedd3c5e7350ab414e' 'c773d8caacba8fbd4968e8afe5137bc6' '3edef50a49a47694bf8add39cc160add' - '5e17e0786afd891550a660f646076308' + 'b376c30f95892b8682fad84f81685f75' 'bc69a520add58ede9b060c73e67ace13' - '26fdd26e945f0c187f9fdcf98a7a5bef' + '2e5e1b3187f75154366bffe806ff8ae9' '47e093e8cfe4b5b96602358e1f540832' - 'a8e486f5d23913242b6edb862bf44c0e' + '4d6a6e88b519caf917ebe6c85c32c45b' '2c005d95312018bef80092136f80f254' '6519d209e151cdc39ae7e1091d189c3e' - '8f474e019d5fcb775497aca355d61b0b' - '4a3cd8f9b33b2b86fdba47a8f1fa2859' - '16f079dab35dde6efd55bf6cf4e2fb2f' + 'ca63946920ba33de1f15abda83e74e40' + '7f7c49d859abdaa0b5fca399241d4998' '3e60b17892e5b8214d47dcfddf5215a4' '57ec994cc3964a10c00580e89ebcae35' 'ea315f41dcd6c978e546c95fc05546cf' @@ -108,9 +108,9 @@ md5sums=('5ee78704cab0e88ec58d1aab821fc1aa' 'b7febd04f64fe21e8cfbb888219b0b31' '06a628469051237943b7c874f2e29b8a' '8fe86aa9109a285aedce3c8658952bbb' - '45f46d1f9193c8dde18e56369ec29a1e' + '3300ea8b02e4fb8bd3409df348de6e16' '145b1da6ce501b3ce38ea415a576bf2d' - '116b0f62ed4e8dd6e437930deeb6e49e' + 'b51c93ad9f3717a616d92899f6bfde76' '17f678d37187be0f12d67f64e40429c6' 'bacc813b48bafcc6fe906e5969930501' '8e02efe1ad0df9a179075147eebb05b9' @@ -119,8 +119,8 @@ md5sums=('5ee78704cab0e88ec58d1aab821fc1aa' '34fc1f58ad1eabf4eff4979d420760c0' 'c3ada01d3a739abe3f920b02d4ea3f6e' 'a94fe6d980f4b810f2e2ae5352084b39' - 'e1011e0df090372cccc03ecf9d6805c7' - '5727da2f13541b0cde2aea0ab94d4960' + 'f808e8614246913a7f633b51c7169c85' + '3fc3d584fadd47f82c5cfe8ac0f4322a' '503df99218373dfc75e7e7f5e449a44e' '4a1fda884dcd7d65fb2690fbdbd92a83' '2b7fe3b57592823a4c7e3ec132dcb7f4' @@ -128,10 +128,11 @@ md5sums=('5ee78704cab0e88ec58d1aab821fc1aa' '95c092f67036a361ef7a57436f44332e' '410795ef9039e4c6c0484e706ecfd567' 'eb879fee9603a05d5420d4ce8ed9e450' - '84492954db16740f949d795b74383189' '02c810c2f47b7c4495fdacaf54189473' + 'fae4162988de9525ba3f9341e17f9c52' '474d5c6883fcfffae4f199aceb3b1356' '36bdfa8d877cea20ca3870faf08e08d5' '59d0602bac7e06f11abba1894acc8bb0' 'da432d68962e109e09beb2b71c8c8571' - '366ccb097d1c221389709485c3b2d159') + '366ccb097d1c221389709485c3b2d159' + 'bdd37627c9effd745a051fd2d279975b') diff --git a/abs/core/LinHES-system/add_storage.py b/abs/core/LinHES-system/add_storage.py index 1f166b1..61ce0ea 100644..100755 --- a/abs/core/LinHES-system/add_storage.py +++ b/abs/core/LinHES-system/add_storage.py @@ -1,8 +1,9 @@ #!/usr/bin/python2 -#Program used to auto_add new storage to mythtv storage groups -#If it's a new disk it will erase the entire disk and reformat +#add_storage.py used to auto add new storage to MythTV storage groups +#If it's a new disk it will erase the entire disk and reformat. # -#Drives that are mount, in fstab, size < 5000 bytes, optical or have already been seen will not be presented as an option. +#Disks that are mounted, in fstab, size < 5000 bytes, optical or +#have already been seen will not be presented as an option. # @@ -23,29 +24,23 @@ storage_dir = "/etc/storage.d" pickle_file = "%s/storage.pkl" %storage_dir -SG_MAP_BE={ 'Default' :'media/tv', -'LiveTV' :'media/tv/live', -'DB Backups' :'backup/mythtv_backups/', -'Streaming' :'media/streaming'} - - -SG_MAP_FE={ - 'Videos' :'media/video', - 'Trailers' :'media/video_stuff/trailers', - 'Coverart' :'media/video_stuff/coverart', - 'Fanart' :'media/video_stuff/fanart', - 'Banners' :'media/video_stuff/banners', - 'Screenshots':'media/video_stuff/screenshots', - } - -FS_LIST_BE=[] -for key in SG_MAP_BE.keys(): - FS_LIST_BE.append(SG_MAP_BE[key]) - -FS_LIST_FE=[] -for key in SG_MAP_FE.keys(): - FS_LIST_FE.append(SG_MAP_FE[key]) - +SG_MAP={ + 'Default' :'media/tv', + 'LiveTV' :'media/tv/live', + 'DB Backups' :'backup/mythtv_backups/', + 'Music' :'media/music', + 'Streaming' :'media/streaming', + 'Videos' :'media/video', + 'Banners' :'media/artwork/banners', + 'Coverart' :'media/artwork/coverart', + 'Fanart' :'media/artwork/fanart', + 'Screenshots':'media/artwork/screenshots', + 'Trailers' :'media/artwork/trailers', + } + +FS_LIST=[] +for key in SG_MAP.keys(): + FS_LIST.append(SG_MAP[key]) class disk_device: def __init__(self,device,storage_dir): @@ -152,7 +147,7 @@ class disk_device: def partition_disk(self): - print " Creating new partiton table" + print " Creating new partition table" cmd = "parted -s -a optimal %s mklabel gpt" %self.block_path runcmd(cmd) cmd = "parted -s -a optimal %s mkpart primary \" 1 -1\"" %self.block_path @@ -189,20 +184,23 @@ class disk_device: break return fstype - - def format_disk(self): + def lookup_format(self): fstab = self.read_fstab() - #lookup format current_media_mount = self.find_options_type(fstab)[1] new_fstype = self.find_fstype(current_media_mount) #setting self.new_fstype so that it can be referenced when setting fstab self.new_fstype = new_fstype + return + + def format_disk(self): + #lookup format + #self.lookup_format() #do format - if new_fstype == "xfs": - cmd = "mkfs -t %s -f %s " %(new_fstype,self.block_partition) + if self.new_fstype == "xfs": + cmd = "mkfs -t %s -f %s " %(self.new_fstype,self.block_partition) else: - cmd = "mkfs -t %s %s " %(new_fstype,self.block_partition) - print " Formating %s with %s" %(self.block_partition,new_fstype) + cmd = "mkfs -t %s %s " %(self.new_fstype,self.block_partition) + print " Formatting %s with %s" %(self.block_partition,self.new_fstype) runcmd(cmd) return @@ -285,13 +283,20 @@ class disk_device: except: os.makedirs(self.new_mount_point) if no_mount == False: - cmd = "mount %s" %self.new_mount_point - runcmd(cmd) + if os.path.ismount(self.new_mount_point): + print " Disk already mounted, will not mount:\n %s" %self.new_mount_point + pass + else: + print " Mounting %s" %self.new_mount_point + cmd = "mount %s" %self.new_mount_point + runcmd(cmd) return def mkdirs(self,FS_LIST): - print " Creating Directory stucture" + print " Creating directory structure:" + print " %s" %self.new_mount_point for y in FS_LIST: + print " %s" %y new_dir="%s/%s" %(self.new_mount_point,y) try: os.stat(new_dir) @@ -319,7 +324,7 @@ class disk_device: with DB as c: try: c.execute("""insert into storagegroup (groupname,hostname,dirname) values (%s,%s,%s)""",(gn,hn,dn)) - print " Adding location: %s to storagegroup %s" %(dn,gn) + print " Adding location: %s to storagegroup %s" %(dn,gn) except: print " *Error inserting %s into storage groups" %dn @@ -339,10 +344,11 @@ class disk_device: return def write_config(self): - print " Writing out storage.d conf file" + print " Writing /etc/storage.d conf file" self.config.add_section('storage') self.config.set('storage','uuid',self.uuid) self.config.set('storage','mountpoint',self.new_mount_point) + self.config.set('storage','fstype',self.new_fstype) self.config.set('storage','shareable','True') self.config.set('storage','mmount',self.mmount) self.config.set('storage','disk_num',self.disk_num) @@ -352,24 +358,25 @@ class disk_device: self.serial_number.replace(' ','')) configfile="/etc/storage.d/%s" %filename - print " %s" %configfile + print " %s" %configfile with open(configfile, 'wb') as configfile: self.config.write(configfile) return def symlink_disk(self): - print " Creating symlink for disk number" + print " Creating symlink for disk%s" %self.disk_num disk_ln="%s/disk%s" %(self.top_mount_dir,self.disk_num) cmd = "ln -s %s %s" %(self.new_mount_point,disk_ln) - print cmd runcmd(cmd) def symlink(self): pass - print " Creating symlink" - cmd = "ln -s %s/media /myth " %(self.new_mount_point) - runcmd(cmd) - + print " Creating symlink for /myth" + if not os.path.exists("/myth"): + cmd = "ln -s %s/media /myth " %(self.new_mount_point) + runcmd(cmd) + else: + print " Skipping symlink, /myth already exists" #end of class @@ -442,17 +449,16 @@ def prompt_to_add(current_drive,destruction = True): loop = True if destruction : prompt = ''' - Adding the drive will remove all contents on the drive. + ** Adding this disk will remove all contents on the disk. ** + This disk will be partitioned and formatted. - Do you wish enable this drive for MythTV storage(Y/N)?: - ''' + Enable this disk for storage (Y/N)?:''' else: prompt = ''' - ** Preserving existing data ** - will not format or partition + ** Preserving existing contents on the disk. ** + This disk will NOT be partitioned or formatted. - Do you wish enable this drive for MythTV storage(Y/N)?: - ''' + Enable this disk for storage (Y/N)?:''' while loop: str1 = raw_input(prompt) @@ -466,11 +472,17 @@ def prompt_to_add(current_drive,destruction = True): rc = False return rc -def prompt_to_continue(): +def prompt_to_continue(process_list): loop = True #while loop: - print "\n\n\n\n" - str1 = raw_input("\n Ready to add additional storage!\n Press Y to continue, anything else to abort:") + print "\n\n\n Ready to add additional storage!\n" + if destruction: + print "** WARNING: These disk(s) WILL be partitioned and formatted. **\n ** All content on these disk(s) will be erased. **" + else: + print " ** These disk(s) will NOT be partitioned and formatted. **" + for i in process_list: + print " %s" %(i.get_name()) + str1 = raw_input("\n Press Y to add disk(s), any other key to cancel:") #if str1 in ['Y','N','y','n']: # loop = False @@ -480,47 +492,27 @@ def prompt_to_continue(): rc = True else: rc = False + print "\nCancelled: No disk(s) added to your system." print "-----" return rc -def prompt_sg(dir_be_sg,dir_fe_sg): - #check for backend storage groups - if dir_be_sg != True: +def prompt_sg(dir_sg): + #check for storage groups + print "*" * 60 + if dir_sg != True: loop = True - print "*" * 40 prompt_string=''' - Backend Storage Groups are used for things like - TV Recordings and database backups. + MythTV Storage Groups are used for artwork, database backups, + music, streaming, TV recordings, and videos. The content on these storage groups will only be available while the system is online. - Do you wish enable this system for Backend Storage Groups(Y/N)?:''' - - while loop: - str1 = raw_input(prompt_string) - if str1 in ['Y','N','y','n']: - loop = False - break - print "\n" - - if str1 == 'Y' or str1 == 'y': - dir_be_sg = True - print " ** Will add Backend Storage Groups!" - else: - print " ** Will NOT add Backend Storage Groups!" - dir_be_sg = False + Enabling MythTV Storage Groups will create the directories + on the disk(s) and add the paths to the MythTV database. - #now for frontend storage groups - if dir_fe_sg != True: - loop = True - print "+" * 20 - prompt_string=''' - Frontend Storage Groups are used for videos. - The content on these storage groups will - only be available while the system is online. + Enable MythTV Storage Groups (Y/N)?:''' - Do you wish enable this system for Frontend Storage Groups(Y/N)?:''' while loop: str1 = raw_input(prompt_string) if str1 in ['Y','N','y','n']: @@ -529,17 +521,21 @@ def prompt_sg(dir_be_sg,dir_fe_sg): print "\n" if str1 == 'Y' or str1 == 'y': - dir_fe_sg = True - print " ** Will add Frontend Storage Groups!" + dir_sg = True + print " ** Will add MythTV Storage Groups!" else: - dir_fe_sg = False - print " ** Will NOT add Frontend Storage Groups!" + print " ** Will NOT add MythTV Storage Groups!" + dir_sg = False + else: + dir_sg = True + print "\n --add_sg option used" + print " ** Will add MythTV Storage Groups!" - return dir_be_sg,dir_fe_sg + return dir_sg def remove_pickle(): try: - print "* Resetting list of known drives." + print "\n* Removing list of known disks.\n" os.remove(pickle_file) except: pass @@ -555,7 +551,7 @@ def last_disk_num(): return num_list[-1] #-------------------------------------------- -def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): +def main(scan_only, destruction, no_mount, install_call , dir_sg): global bus bus = dbus.SystemBus() @@ -565,6 +561,8 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): process_list=[] no_process_list=[] + print "-" * 60 + print " Scan for Disks" for i in system_drive_list: #print i.mount_path @@ -575,8 +573,17 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): #print "--" if search_for_match(i,known_drive_list) or i.in_use : + if search_for_match(i,known_drive_list) : + dstatus = " Ignoring - Disk has been previously skipped:" + if i.in_use : + dstatus = " Ignoring - Disk is mounted:" + if search_for_match(i,known_drive_list) and i.in_use : + dstatus = " Ignoring - Disk has been previously skipped and is mounted:" + print "\n" - print " Storage is already in use or previously skipped:%s" %i.model + print " --------------------------------------------------------" + print dstatus + print " model: %s" %i.model print " location: %s" %i.block_path print " size: %s" %i.device_size continue @@ -584,27 +591,35 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): else: if not scan_only: print "\n" - print "-------------------------------------------------------------" - print " Found new hard drive: %s" %i.model - print " location: %s" %i.block_path - print " size: %s " %i.device_size + print " --------------------------------------------------------" + print " Found New Disk:" + print " model: %s" %i.model + print " location: %s" %i.block_path + print " size: %s " %i.device_size if prompt_to_add(i,destruction) : - print "\n Disk will be added to the storage pool!" + print "\n %s will be added to your system!" %i.model process_list.append(i) else: no_process_list.append(i) else: process_list.append(i) - print " End of scan" - print "---------------------------------------" + print "\n" + print " Scan Finished" + print "-" * 60 if scan_only: if len(process_list) > 0: + print " Unknown or Unmounted Disks:" f = open('/tmp/scan_report', 'w') for i in process_list: - f.write("drive: %s , location: %s ,size: %s \n" %(i.model,i.block_path,i.device_size)) - print "drive: %s , location: %s ,size: %s \n" %(i.model,i.block_path,i.device_size) + f.write("disk: %s , location: %s ,size: %s \n" %(i.model,i.block_path,i.device_size)) + print "\n" + print " ---------------------------------------------------------" + print " Found New Disk:" + print " model: %s" %i.model + print " location: %s" %i.block_path + print " size: %s " %i.device_size f.close() sys.exit(0) @@ -619,7 +634,7 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): system_drive_list.remove(y) write_known_drive_list(system_drive_list) else: - print "\nDid not find any new storage to add.\n" + print "\nThere are no disks to add to your system.\n\nFor more options: add_storage.py --help\n" write_known_drive_list(system_drive_list) #BE = MythBE(db=DB) @@ -630,15 +645,16 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): if len(process_list) > 0: - print " Will add %s disks to systems" %len(process_list) + print "\n Will add %s disk(s) to your system." %len(process_list) - dir_be_sg , dir_fe_sg = prompt_sg(dir_be_sg,dir_fe_sg) - if prompt_to_continue() == True: + dir_sg = prompt_sg(dir_sg) + if prompt_to_continue(process_list) == True: write_known_drive_list(system_drive_list) disk_num = last_disk_num() for i in process_list: - print " Drive: %s" %(i.get_name()) + print " Disk: %s" %(i.get_name()) disk_num = disk_num + 1 + i.lookup_format() if destruction == True: i.partition_disk() i.format_disk() @@ -646,10 +662,8 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): i.mount_disk(no_mount) #if destruction == True: - if dir_fe_sg == True: - i.mkdirs(FS_LIST_FE) - if dir_be_sg == True: - i.mkdirs(FS_LIST_BE) + if dir_sg == True: + i.mkdirs(FS_LIST) i.set_disk_num(disk_num) i.write_config() @@ -658,17 +672,15 @@ def main(scan_only, destruction, no_mount, install_call , dir_fe_sg, dir_be_sg): i.symlink_disk() - if dir_fe_sg == True: - i.add_sg(DB,host,SG_MAP_FE) - if dir_be_sg == True: - i.add_sg(DB,host,SG_MAP_BE) + if dir_sg == True: + i.add_sg(DB,host,SG_MAP) print "-----" cmd = "systemconfig.py -m fileshare" runcmd(cmd) #i.add_sg(DB,host,SG_MAP) -def myth_main(no_mount,install_call,dir_fe_sg): +def myth_main(no_mount,install_call,dir_sg): global bus bus = dbus.SystemBus() #search for root @@ -713,19 +725,18 @@ def myth_main(no_mount,install_call,dir_fe_sg): host=gethostname() - print " Drive: %s" %(i.get_name()) + print " Disk: %s" %(i.get_name()) i.set_mmount(True) i.set_partition("7") i.set_disk_num(0) + i.lookup_format() i.add_fstab(True) #if not install_call: i.mount_disk(no_mount) i.write_config() #no need to make the sub directories because the install process has taken care of it. - if dir_fe_sg == True: - i.add_sg(DB,host,SG_MAP_FE,'99',install_call) - if dir_be_sg == True: - i.add_sg(DB,host,SG_MAP_BE,'99',install_call) + if dir_sg == True: + i.add_sg(DB,host,SG_MAP,'99',install_call) i.symlink() cmd = "systemconfig.py -m fileshare" @@ -736,7 +747,7 @@ class reconstruct_path: self.conf_file = conf_file parser = SafeConfigParser() parser.read(self.conf_file) - + self.config = ConfigParser.RawConfigParser() self.uuid = parser.get('storage', 'uuid') self.mount_point = parser.get('storage', 'mountpoint') @@ -745,9 +756,22 @@ class reconstruct_path: self.bind = self.myth_mount self.disk_num = parser.get('storage', 'disk_num') self.top_mount_dir = os.path.dirname(self.mount_point) + try: + self.fstype = parser.get('storage', 'fstype') + except: + self.fstype = self.get_fstype() + + def get_fstype(self): + cmd = "fsck -N UUID=%s" %self.uuid + tmpfstype = runcmd(cmd) + tmpfstype = tmpfstype[1].split('/sbin/fsck.') + tmpfstype = tmpfstype[1].split(' ') + self.fstype = tmpfstype[0] + self.write_config() + return self.fstype def get_conf(self): - return self.conf_file + return self.conf_file def get_uuid(self): return self.uuid @@ -809,30 +833,29 @@ class reconstruct_path: f.close() def symlink(self): - print " Creating symlink" + print " Creating symlink for /myth" if not os.path.exists("/myth"): cmd = "ln -s %s/media /myth " %(self.mount_point) runcmd(cmd) else: - print " Skipping symlink, path already present" + print " Skipping symlink, /myth already exists" def symlink_disk(self): - print " Creating symlink for disk number" + print " Creating symlink for disk%s" %self.disk_num disk_ln="%s/disk%s" %(self.top_mount_dir,self.disk_num) cmd = "ln -s %s %s" %(self.mount_point,disk_ln) runcmd(cmd) - def add_fstab(self): #new_fstab_list=['UUID=', 'mount_point', 'auto', 'defaults', '0', '1'] - new_fstab_list=['UUID=', 'mount_point', self.new_fstype, 'defaults', '0', '1'] + new_fstab_list=['UUID=', 'mount_point', self.fstype, 'defaults', '0', '1'] fstab=self.read_fstab() if self.bind == "True": self.symlink() if self.check_in_fstab(fstab,self.uuid) == True: - print " Found storage in fstab, will not add it" + print " Found disk in fstab, will not add it" else: print " Adding storage to fstab" if self.bind == "True" : @@ -857,19 +880,39 @@ class reconstruct_path: except: os.makedirs(self.mount_point) if no_mount == False : - cmd = "mount %s" %self.mount_point - runcmd(cmd) + if os.path.ismount(self.mount_point): + print " Disk already mounted, will not mount:\n %s" %self.mount_point + pass + else: + print " Mounting %s" %self.mount_point + cmd = "mount %s" %self.mount_point + runcmd(cmd) + return + + def write_config(self): + print " Writing /etc/storage.d conf file" + self.config.add_section('storage') + self.config.set('storage','uuid',self.uuid) + self.config.set('storage','mountpoint',self.mount_point) + self.config.set('storage','fstype',self.fstype) + self.config.set('storage','shareable','True') + self.config.set('storage','mmount',self.myth_mount) + self.config.set('storage','disk_num',self.disk_num) + + print " %s" %self.conf_file + with open(self.conf_file, 'wb') as self.conf_file: + self.config.write(self.conf_file) return def reconstruct_mounts(no_mount): - print "Recreating devices based on contents of /etc/storage.d" + print "\nRecreating disks from contents of /etc/storage.d/" for conf_file in glob.glob('%s/*.conf' %storage_dir): print "\n" cf = reconstruct_path(conf_file) #print cf.get_conf() #print cf.get_uuid() - print " %s" %cf.get_mount_point() + print " Recreating %s" %cf.get_mount_point() #print cf.get_shareable() #print cf.get_is_myth_mount() #print cf.get_disk_num() @@ -879,30 +922,52 @@ def reconstruct_mounts(no_mount): cf.symlink_disk() cf.mount_disk(no_mount) + print "\n\nDone recreating disks.\n" pass def usage(): - help='''\n - Add storage is designed to find and setup new disks for mythtv usage. - It's a powerfull tool that could destroy data if not used correctly, so please be careful. - Normal operations include (in this order): + help=''' + add_storage.py finds and sets up disks for MythTV usage. + It's a powerful tool that could destroy data if not used correctly, + please be careful. + + Scanned disks are ignored if they are mounted or have been + previously skipped by add_storage.py. + + The file system type for disks added by add_storage.py is + automatically set to the type selected for the data partition + at install. + + Normal operations without options include (in this order): Partition the disk Format the disk Add disk to /etc/fstab Mount the disk - Create the directory - Write out the config file to /etc/storage.d - Add new locations to mythtv storage groups - - options: - - --no_mount : Do not mount the disk, only add it to /etc/fstab and create the dir. - --no_destruction: Will not partition or format the disk. This can be used to import disks from other systems. - --new_init : Erase the list of new disks and rescan. - --report : will scan the disks and print out if it found new storage. - --add_fe_sg : Will only create the storage group dir for videos..excludes tv - --add_be_sg : Will only create the storage group dir for TV, backups, streaming + Create the directories + (if user enables MythTV Storage Groups) + Write out the disk config file to /etc/storage.d/ + Create disk# symlink at /data/storage/ + Create /myth symlink (if applicable) + Create MythTV Storage Group paths in MythTV database + (if user enables MythTV Storage Groups) + + Options: + --add_sg: Create the MythTV Storage Group directories and + database entries for database backups, TV + recordings, music, streaming, videos and artwork. + -h, --help: Show this help message. + --new_init: Erase the list of known disks and rescan. + --no_destruction: Will not partition or format the disk. + All other normal operations will be performed. + Can be used to import disks from other systems. + --no_mount: Do not mount the disk. + All other normal operations will be performed. + --reconstruct: Recreate mount point, /myth symlink, fstab entry, + /data/storage/disk# symlink, and mount the disk. + --no_mount is the only option that works with + --reconstruct. + --report: Scan disks and print new found disks. ''' print help sys.exit(0) @@ -916,8 +981,7 @@ if __name__ == "__main__": no_mount = False destruction = True install_call = False - dir_fe_sg = False - dir_be_sg = False + dir_sg = False reconstruct = False try: os.remove("/tmp/scan_report") @@ -925,9 +989,9 @@ if __name__ == "__main__": pass if not os.geteuid()==0: - sys.exit("\nRoot access is required to run this program\n") + sys.exit("\nRoot access is required to run this program.\n") - if "--help" in sys.argv: + if "--help" in sys.argv or "-h" in sys.argv: usage() if "--install_call" in sys.argv: @@ -945,23 +1009,23 @@ if __name__ == "__main__": if "--report" in sys.argv : scan_only = True + if "--add_sg" in sys.argv: + dir_sg = True + + #there is no distinction between FE and BE sg anymore + #but leaving these for backwards compatibility if "--add_fe_sg" in sys.argv: - dir_fe_sg = True + dir_sg = True if "--add_be_sg" in sys.argv: - dir_be_sg = True - + dir_sg = True if "--reconstruct" in sys.argv: reconstruct = True if "--double_myth" in sys.argv: - myth_main(no_mount,install_call,dir_fe_sg) + myth_main(no_mount, install_call, dir_sg) elif reconstruct == True: reconstruct_mounts(no_mount) else: - main(scan_only,destruction,no_mount, install_call, dir_fe_sg, dir_be_sg) - - - - + main(scan_only,destruction,no_mount, install_call, dir_sg) diff --git a/abs/core/LinHES-system/create_media_dirs.sh b/abs/core/LinHES-system/create_media_dirs.sh index 9e64301..6af6eb7 100644 --- a/abs/core/LinHES-system/create_media_dirs.sh +++ b/abs/core/LinHES-system/create_media_dirs.sh @@ -52,11 +52,11 @@ media/tmp media/archive media/pretty media/streaming -media/video_stuff/trailers -media/video_stuff/coverart -media/video_stuff/fanart -media/video_stuff/screenshots -media/video_stuff/banners +media/artwork/trailers +media/artwork/coverart +media/artwork/fanart +media/artwork/screenshots +media/artwork/banners media/games/screenshots media/games/fanart media/games/boxart diff --git a/abs/core/LinHES-system/diskspace.cron b/abs/core/LinHES-system/diskspace.cron deleted file mode 100755 index ab3c91b..0000000 --- a/abs/core/LinHES-system/diskspace.cron +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -/usr/bin/nice -n19 /usr/LH/bin/diskspace.sh -osd diff --git a/abs/core/LinHES-system/lh_backend_control.sh b/abs/core/LinHES-system/lh_backend_control.sh index c116cdb..4b0f184 100644 --- a/abs/core/LinHES-system/lh_backend_control.sh +++ b/abs/core/LinHES-system/lh_backend_control.sh @@ -24,7 +24,7 @@ case $1 in then $MV_BEC stop $dbhost else - msg_client.py --msg "Stopping backend" + msg_client.py --msg "Stopping MythBackend" sudo sv stop mythbackend fi else @@ -41,7 +41,7 @@ case $1 in then $MV_BEC start $dbhost else - msg_client.py --msg "Starting backend" + msg_client.py --msg "Starting MythBackend" sudo sv start mythbackend fi else @@ -58,7 +58,7 @@ case $1 in then $MV_BEC restart $dbhost else - msg_client.py --msg "Restarting backend" + msg_client.py --msg "Restarting MythBackend" sudo sv restart mythbackend fi else @@ -71,5 +71,3 @@ case $1 in ;; esac - - diff --git a/abs/core/LinHES-system/lh_system_backup_job b/abs/core/LinHES-system/lh_system_backup_job index e095a97..3ac9de0 100644 --- a/abs/core/LinHES-system/lh_system_backup_job +++ b/abs/core/LinHES-system/lh_system_backup_job @@ -7,7 +7,8 @@ MYTH_RUN_STATUS="1" . /etc/profile . /etc/systemconfig BACKUPDIR=/data/storage/disk0/backup/system_backups -DELETE_DAYS=21 +SECBACKUPLINK=/data/storage/disk1 +KeepBackups=13 DATE=`date +%F_%H-%M` backup_status=0 # @@ -32,8 +33,7 @@ function backup_status_check(){ function backup(){ - echo "#######################################" - echo "Starting backup " + echo "Starting Backup" mkdir -p $BACKUPDIR/$DATE #backup database @@ -42,15 +42,19 @@ function backup(){ pacman -Q mysql 2>/dev/null if [ $? = 0 ] then + echo " mythconverg (mythtv database)" mysqldump -x mythconverg > $BACKUPDIR/$DATE/mythconverg backup_status_check $? - mysqldump -x ncid > $BACKUPDIR/$DATE/ncid + echo " ncid (caller id)" + mysqldump -x ncid > $BACKUPDIR/$DATE/ncid 2>/dev/null #this is all the users + echo " users" mysqldump -x mysql > $BACKUPDIR/$DATE/mysql_table #this is everything + echo " All databases in one file" mysqldump -x --all-databases > $BACKUPDIR/$DATE/all_databases backup_status_check $? @@ -112,19 +116,20 @@ function backup(){ echo echo "Created file:" echo " $BACKUPDIR/backup.$DATE.tgz" - echo "########################################" } function update_backup_status(){ + echo # Add Last backup status to menu item #if description not in the backup xml file, add it if [ $rc=0 ] then - COMPLETE_MSG="Last backup completed on `date '+%D @ %-I:%M %p'`" + COMPLETE_MSG="Last backup completed `date '+%D %-I:%M %p'`" else - COMPLETE_MSG="Last backup FAILED on `date '+%D @ %-I:%M %p'`" + COMPLETE_MSG="Last backup FAILED `date '+%D %-I:%M %p'`" fi - + echo "Updating menu with:" + echo " $COMPLETE_MSG" xmlfile="/usr/share/mythtv/themes/defaultmenu/mythbackup.xml" grep -q "<description>" $xmlfile >/dev/null @@ -132,19 +137,27 @@ function update_backup_status(){ if [ $desc_check = 0 ] then - sed -i "s_\<description\>.*\<description\>_description\>$COMPLETE_MSG\<\/description_" $xmlfile + sed -i "0,/<description\>.*\<description\>/s||\<description\>$COMPLETE_MSG<\/description|" $xmlfile + #sed -i "0,/\<description\>.*\<description\>/s//\<description\>$COMPLETE_MSG\<\/description/" $xmlfile else sed -i " /NONE/ i\ \<description\>$COMPLETE_MSG\<\/description\>" $xmlfile fi } function remove_old_backups(){ + #remove old backups - find $BACKUPDIR/backup*.tgz -type f -mtime +$DELETE_DAYS -delete + NumBackups=`ls $BACKUPDIR/backup*.tgz|wc -l` + if [[ $NumBackups -gt $KeepBackups ]]; then + numdel=$(($NumBackups-$KeepBackups)) + rm -f `ls $BACKUPDIR/backup*.tgz -tr1|head -$numdel` + fi } function remote_backup(){ + echo + echo "Remote backup" #Remote copy if [ x$RemoteBackup = x1 ] then @@ -152,7 +165,7 @@ function remote_backup(){ if [ x$localRemoteCheck = xdir ] then localRemotedir=`echo $RemoteBackupDir | cut -d: -f2` - echo "copying $BACKUPDIR/backup.$DATE.tgz to $localRemotedir " + echo " copying $BACKUPDIR/backup.$DATE.tgz to $localRemotedir " cp $BACKUPDIR/backup.$DATE.tgz $localRemotedir else /usr/bin/func ${RemoteBackupDir} ping| grep -q "FAILED" @@ -161,13 +174,33 @@ function remote_backup(){ then #this is here to mark failed copy of the backup. #There is a cron.hourly job that will attempt to retransfer the file - echo "Remote backup failed to ${RemoteBackupDir}" + echo " Remote backup failed to ${RemoteBackupDir}" echo backup.$DATE.tgz >> $BACKUPDIR/remote_backup_failed.txt else - echo "copying $BACKUPDIR/backup.$DATE.tgz to ${RemoteBackupDir}:$BACKUPDIR/MBE_$DATE.tgz" + echo " copying $BACKUPDIR/backup.$DATE.tgz to ${RemoteBackupDir}:$BACKUPDIR/MBE_$DATE.tgz" /usr/bin/func ${RemoteBackupDir} copyfile -f $BACKUPDIR/backup.$DATE.tgz --remotepath $BACKUPDIR/MBE_$DATE.tgz fi fi + else #do local copy to SECBACKUPLINK + echo " Remote backup is not enabled, copying backup to $SECBACKUPLINK if it exists" + SECBACKUPDISK=`readlink $SECBACKUPLINK` + SECBACKUP=$SECBACKUPDISK/backup + + if [ -n "$SECBACKUPDISK" ]; then + if [ `mountpoint -q -d $SECBACKUPDISK` ]; then + if [ ! -d "$SECBACKUP" ]; then + mkdir -p -m 775 $SECBACKUP + echo " Created $SECBACKUP" + chown mythtv:users $SECBACKUP + fi + echo " Copying system backups to $SECBACKUP" + rsync -au --delete $BACKUPDIR $SECBACKUP + else + echo " $SECBACKUPDISK isn't mounted." + fi + else + echo " Link $SECBACKUPLINK doesn't exist." + fi fi } @@ -180,10 +213,10 @@ function remote_transfer(){ then #this is here to mark a failed copy of the backup. #There is a cron.hourly job that will attempt to retransfer the file - echo "Remote backup failed to ${RemoteBackupDir}" + echo " Remote backup failed to ${RemoteBackupDir}" echo $transfer_file >> $BACKUPDIR/remote_backup_failed.txt else - echo "copying $BACKUPDIR/$transfer_file to ${RemoteBackupDir}:$BACKUPDIR/MBE_$transfer_file" + echo " copying $BACKUPDIR/$transfer_file to ${RemoteBackupDir}:$BACKUPDIR/MBE_$transfer_file" /usr/bin/func ${RemoteBackupDir} copyfile -f $BACKUPDIR/$transfer_file --remotepath $BACKUPDIR/MBE_$transfer_file fi } diff --git a/abs/core/LinHES-system/lh_system_host_update b/abs/core/LinHES-system/lh_system_host_update index 56a22e5..ca6aeff 100644 --- a/abs/core/LinHES-system/lh_system_host_update +++ b/abs/core/LinHES-system/lh_system_host_update @@ -2,8 +2,8 @@ # Process that call this script # func update # supplemental web -echo "#####################################################" -echo "Starting update" + +echo "Starting Update" MYTH_RUN_STATUS="1" . /etc/profile @@ -17,7 +17,7 @@ fi case $Hostupdateplan in "Myth_only") - echo "Updating myth packages" + echo "Updating only myth packages" postfix=`cat $INSTALL_DIR/usr/local/share/mythtv/.releasetype` for mythl in mythphone mytharchive mythbrowser mythnews mythgame mythflix mythweather mythcontrols mythgallery mythmovietime mythmusic mythsmolt mythvideo mythweb mythtv do @@ -52,6 +52,3 @@ case $Hostupdateplan in echo "Unknown $Hostupdateplan, skipping updates" ;; esac - - -echo "##################################################################################" diff --git a/abs/core/LinHES-system/linhes_update.sh b/abs/core/LinHES-system/linhes_update.sh index 87ac8a1..76501fb 100644 --- a/abs/core/LinHES-system/linhes_update.sh +++ b/abs/core/LinHES-system/linhes_update.sh @@ -6,7 +6,7 @@ dsply () { then msg_client.py --clear --tag "checkUpdates" msg_client.py --kill - msg_client.py --msg "Updates available!\nExit and re-enter Service Menu\nto install the updates.|middle" + msg_client.py --msg "Updates available!\nGo to the Service Menu to install the updates.|middle" exit else msg_client.py --msg "Checking for updates...|middle" --timeout 600 --tag "checkUpdates" @@ -20,7 +20,7 @@ chck () { then msg_client.py --clear --tag "checkUpdates" msg_client.py --kill - msg_client.py --msg "No updates available.|middle" + msg_client.py --msg "No updates available.\nReturning to Main Menu.|middle" else mv /usr/share/mythtv/themes/defaultmenu/linhes.xml /tmp/linhes.xml.tmp sed -e '/\#Check/,/\#Check/d' < /tmp/linhes.xml.tmp > /usr/share/mythtv/themes/defaultmenu/linhes.xml @@ -30,6 +30,7 @@ chck () { echo " <button>" >> /tmp/linhes.xml.tmp echo " <type>UPGRADE</type>" >> /tmp/linhes.xml.tmp echo " <text>Updates Available</text>" >> /tmp/linhes.xml.tmp + echo " <description>Updates for the LinHES system</description>" >> /tmp/linhes.xml.tmp echo " <action>MENU update2.xml</action>" >> /tmp/linhes.xml.tmp echo " </button>" >> /tmp/linhes.xml.tmp echo "<!--#UpdatesAvailable-->" >> /tmp/linhes.xml.tmp @@ -45,6 +46,7 @@ chck () { echo " <button>" >> /tmp/update3.xml.tmp echo " <type>UPGRADE</type>" >> /tmp/update3.xml.tmp echo " <text>REBOOT REQUIRED</text>" >> /tmp/update3.xml.tmp + echo " <description>Some packages require a reboot</description>" >> /tmp/update3.xml.tmp echo " <action>NONE</action>" >> /tmp/update3.xml.tmp echo " </button>" >> /tmp/update3.xml.tmp fi @@ -55,6 +57,7 @@ chck () { echo " <button>" >> /tmp/update3.xml.tmp echo " <type>UPGRADE</type>" >> /tmp/update3.xml.tmp echo " <text>$line</text>" >> /tmp/update3.xml.tmp + echo " <description>$line</description>" >> /tmp/update3.xml.tmp echo " <action>NONE</action>" >> /tmp/update3.xml.tmp echo " </button>" >> /tmp/update3.xml.tmp done < "/tmp/to_be_upgraded" diff --git a/abs/core/LinHES-system/linhes_update2.sh b/abs/core/LinHES-system/linhes_update2.sh index fbdd36b..b26e762 100644 --- a/abs/core/LinHES-system/linhes_update2.sh +++ b/abs/core/LinHES-system/linhes_update2.sh @@ -28,6 +28,7 @@ then echo " <button>" >> /tmp/linhes.xml.tmp echo " <type>UPGRADE</type>" >> /tmp/linhes.xml.tmp echo " <text>Update LinHES</text>" >> /tmp/linhes.xml.tmp + echo " <description>Update the LinHES System</description>" >> /tmp/linhes.xml.tmp echo " <action>MENU update.xml</action>" >> /tmp/linhes.xml.tmp echo " </button>" >> /tmp/linhes.xml.tmp echo "<!--#Check for updates-->" >> /tmp/linhes.xml.tmp diff --git a/abs/core/LinHES-system/misc_status_info.sh b/abs/core/LinHES-system/misc_status_info.sh index 14a972c..a75b144 100755 --- a/abs/core/LinHES-system/misc_status_info.sh +++ b/abs/core/LinHES-system/misc_status_info.sh @@ -12,7 +12,7 @@ # Get Encoder that was used for recordings from the backend log firstrun=1 -loglist=`find /var/log/ -name *_mythbackend.*.log*` +loglist=`find /var/log/ -name *_mythbackend*.log*` for i in `ls -t $loglist` do if [ $firstrun -eq 1 ]; then diff --git a/abs/core/LinHES-system/misc_which_recorder.pl b/abs/core/LinHES-system/misc_which_recorder.pl index 6952b3f..2ad91b0 100755 --- a/abs/core/LinHES-system/misc_which_recorder.pl +++ b/abs/core/LinHES-system/misc_which_recorder.pl @@ -47,20 +47,20 @@ if ($log_file =~ /\.gz$/) { # read top down # open($fh, "gunzip -c $log_file |") or die "Unable to open log file '$log_file', stopping:"; +# read bottom up open($fh, "gunzip -c $log_file |tac |") or die "Unable to open log file '$log_file', stopping:"; } else { # read top down # open($fh, "<$log_file") or die "Unable to open log file '$log_file', stopping:"; +# read bottom up open($fh, "tac $log_file |") or die "Unable to open log file '$log_file', stopping:"; } while (<$fh>) { -# Myth .24 regex to find start of recording -# if (/^(.*)(?:\d(?: I )?|I.* -) (?:Started|Tuning) recording: (.*): channel (\d+) on cardid (\d+), sourceid (\d+)/) -# Myth .25 regex to find start of recording for digital and analog MPEG +# Myth .25 & .27 regex to find start of recording for digital and analog MPEG if (/^(\d+-\d+-\d+T\d+\:\d+\:\d+)(?:.*) (?:Started|Tuning) recording: (.*): channel (\d+) on cardid (\d+), sourceid (\d+)/ || /^(\d+-\d+-\d+T\d+\:\d+\:\d+)(?:.*) \(UpdateRecStatus\) Updating status for (.*)() on cardid (\d+) \(Will Record => Recording\)()/) { if ($mode eq "--noheader") diff --git a/abs/core/func/msg.cfg b/abs/core/LinHES-system/msg.cfg index 0d687c5..0d687c5 100644 --- a/abs/core/func/msg.cfg +++ b/abs/core/LinHES-system/msg.cfg diff --git a/abs/core/LinHES-system/myth_mtc.cron b/abs/core/LinHES-system/myth_mtc.cron new file mode 100755 index 0000000..4f63dec --- /dev/null +++ b/abs/core/LinHES-system/myth_mtc.cron @@ -0,0 +1,23 @@ +#!/bin/bash +MYTH_RUN_STATUS=1 +. /etc/profile + +date=`date +%Y-%m-%d` +timestamp=`date +'%Y-%m-%d %H:%M'` +logFile="/var/log/$date/myth_mtc.log" + +if [ ! -f $logFile ]; then + touch $logFile +fi + +#check logfile for Finished and if not run myth_mtc.py +if ! grep -q "Finished" $logFile +then + MYTHCONFDIR=/usr/share/mythtv unbuffer myth_mtc.py >> $logFile 2>&1 + if [ $? = 0 ] + then + echo "Finished $timestamp" >> $logFile + else + echo "Time Exceeded $timestamp" >> $logFile + fi +fi diff --git a/abs/core/LinHES-system/myth_mtc.py b/abs/core/LinHES-system/myth_mtc.py index a5f02a0..7847313 100755 --- a/abs/core/LinHES-system/myth_mtc.py +++ b/abs/core/LinHES-system/myth_mtc.py @@ -5,6 +5,7 @@ import re import socket import os import datetime,time +import shlex try: from MythTV import MythBE @@ -14,24 +15,33 @@ except: #print mythtv.db.getSetting( 'Theme', socket.gethostname()) +def get_timestamp(): + now = datetime.datetime.now() +#date = "%s-%s-%s" %(now.year, now.month, now.day) + date = (now.strftime('%Y-%m-%d %H:%M')) + return date + + def optimize(): + try: cursor = mythtv.db.cursor() cursor.execute("SHOW tables") result = cursor.fetchall() except: - print "Problem getting tables from database" + print " Problem getting tables from database" return ops=["REPAIR","OPTIMIZE","ANALYZE"] for row in result: ctable=row[0] for op in ops: - print op,ctable + print " %s %s" %(op,ctable) cmd= "%s table %s" %(op,ctable) cursor.execute(cmd) def upcoming_check(): + print " Checking for upcoming shows" try: upcoming = mythtv.getUpcomingRecordings() except: @@ -50,11 +60,12 @@ def upcoming_check(): if ( time_diff > 30) : return True else: - print show , "is upcoming in " , time_diff + print " %s is upcoming in %s" %(show,time_diff) return False def schemalock_check(): + print " Checking if schema is locked" try: c = mythtv.db.cursor() c.execute("select count(*) from schemalock") @@ -66,10 +77,11 @@ def schemalock_check(): if schemalock == 0: return True else: - print "schema is locked" + print " schema is locked" return False def job_check(): + print " Checking jobqueue" try: c = mythtv.db.cursor() c.execute("select count(*) from jobqueue where status = 4") @@ -80,11 +92,12 @@ def job_check(): if jobs == 0 : return True else: - print " jobs are running" + print " jobs are running" return False def in_use(): + print " Checking if programs are in use" try: c = mythtv.db.cursor() c.execute("select count(*) from inuseprograms") @@ -95,10 +108,11 @@ def in_use(): if prginuse == 0 : return True else: - print "programs in use" + print " Programs in use" return False def mfd_check(): + print " Checking is mythfilldatabase is running" ps = subprocess.Popen("ps ax -o pid= -o args= ", shell=True, stdout=subprocess.PIPE) ps_pid = ps.pid output = ps.stdout.read() @@ -110,50 +124,64 @@ def mfd_check(): if res: pid = int(res[0][0]) if proc_name in res[0][1] and pid != os.getpid() and pid != ps_pid: - print "mythfilldatabase is running" + print " mythfilldatabase is running" return False return True +def bail_if_another_is_running(): + cmd = shlex.split("pgrep -u {} -f {}".format(os.getuid(), __file__)) + pids = subprocess.check_output(cmd).strip().split('\n') + if len(pids) > 1: + pids.remove("{}".format(os.getpid())) + print "Exiting! Found {} is already running (pids): {}".format( + __file__, " ".join(pids)) + raise SystemExit(1) def idle_check(): + print "\n%s Checking Idle" %(get_timestamp()) if ( upcoming_check() and schemalock_check() and job_check() and in_use() and mfd_check() ): idle=True - print "Myth is idle" + print "\n%s Myth is idle" %(get_timestamp()) else: idle=False - print "Myth is NOT idle" + print "\n%s Myth is NOT idle" %(get_timestamp()) return idle def run_stuff(): if idle_check(): - print "Running optimize" + print "\n#######################################" + print "\n%s Running Optimize" %(get_timestamp()) optimize() - print "Running backup" + print "\n#######################################" + print "\n%s Running Backup" %(get_timestamp()) os.system('/usr/LH/bin/lh_system_backup_job') - print "Running system_update" - os.system('/usr/LH/bin/lh_system_host_update') + print "\n#######################################" + print "\n%s Running System Update" %(get_timestamp()) + os.system('/usr/LH/bin/lh_system_host_update') + + print "\n#######################################" continue_loop=False else: continue_loop=True return continue_loop #--------------------------------- +bail_if_another_is_running() starttime=time.time() ctin=True while ctin: ctin=run_stuff() if ctin: + print "\n%s Waiting 10 minutes before trying again." %(get_timestamp()) time.sleep(600) + current_time=time.time() - if (current_time - starttime) > 10800 : + if (current_time - starttime) > 3000 : ctin = False - print "time exceeded (3 hours)" + print "\n%s Time Exceeded 50 minutes. Quitting.)" %(get_timestamp()) exit(1) - - - diff --git a/abs/core/LinHES-system/myth_mtc.sh b/abs/core/LinHES-system/myth_mtc.sh deleted file mode 100755 index 7899daa..0000000 --- a/abs/core/LinHES-system/myth_mtc.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/bin/bash -MYTH_RUN_STATUS=1 -. /etc/profile - -date=`date +%Y-%m-%d` -logFile="/var/log/$date/myth_mtc.log" - -MYTHCONFDIR=/usr/share/mythtv myth_mtc.py > $logFile 2>&1 -if [ $? = 0 ] -then - echo "Finished $date" >> $logFile -else - echo "Time Exceede $date" >> $logFile -fi diff --git a/abs/core/LinHES-system/myth_status.py b/abs/core/LinHES-system/myth_status.py index 2e48024..40dd3b3 100644 --- a/abs/core/LinHES-system/myth_status.py +++ b/abs/core/LinHES-system/myth_status.py @@ -1,115 +1,263 @@ #!/usr/bin/python2 +#This program is called on login to display the status of mythtv tuners & recording status +#Also will display alerts generated by xymon. If the location of xymon changes, this script needs to be updated. + from MythTV import MythBE,MythDB,MythLog -import datetime,time,sys,subprocess -try: - be=MythBE() - db = MythDB() -except: - print "\nCouldn't connect to MythTV service for status" - sys.exit(1) - -cursor = db.cursor() -now = datetime.datetime.now() -farout=99999999 -next_start_diff=datetime.timedelta(farout) -num_upcoming=12 +import datetime,time,sys,subprocess,re +import os,glob +from socket import gethostname; def formatTD(td): - #print td days = td.days hours = td.seconds // 3600 minutes = (td.seconds % 3600) // 60 seconds = td.seconds % 60 - if days > 1: - day_string = "%s days" %days + if days == 0: + day_string = "" + elif days > 1: + day_string = "%s days, " %days else: - day_string = "%s day" %days + day_string = "%s day, " %days if hours > 1: - hour_string = "%s hours" %hours + hour_string = "%s hours, " %hours else: - hour_string = "%s hour" %hours + hour_string = "%s hour, " %hours if minutes > 1: - minute_string = "%s minutes" %minutes + minute_string = "%s minutes, " %minutes else: - minute_string = "%s minute" %minutes + minute_string = "%s minute, " %minutes if seconds > 1: second_string = "%s seconds" %seconds else: second_string = "%s second" %seconds - return_string = '%s, %s, %s, %s' % (day_string, hour_string, minute_string, second_string) + return_string = '%s%s%s%s' % (day_string, hour_string, minute_string, second_string) return return_string +def print_alerts(): + dir_name = "/home/xymon/var/login_alerts" + out_alert="" + try: + os.chdir(dir_name) + except: + pass + #print " myth_status: Couldn't change dir to %s" %dir_name + file_list=glob.glob("*") + + if len(file_list) == 0: + #print " myth_status: no alert files found" + pass + else: + for alert_file in file_list: + out_line='' + datahost = '' + dataservice = '' + datacolor = '' + datadown = '' + try: + #print " myth_staus: reading in %s" %alert_file + f=open(alert_file,'r') + lines=f.readlines() + f.close() + except: + #print " myth_status: Couldn't open %s for reading" %alert_file + continue + + for line in lines: + try: + data,value=line.split(":") + except: + continue #exception occured try the next line + + if data == 'HOST': + datahost = value.strip() + elif data == 'SERVICE': + dataservice = value.strip() + elif data == 'COLOR': + datacolor = value.strip() + elif data == 'DOWN': + datadown = value.strip() + sec=int(datadown) + td_sec = datetime.timedelta(seconds=sec) + td_sec_formated = formatTD(td_sec) + + out_line =" %s on %s %s for %s \n" %(dataservice, + datahost,datacolor.upper(), + td_sec_formated) + out_alert += out_line + + print "System Alerts:" + print "--------------" + if len(out_alert) > 0: + print out_alert + print " Go to http://%s and click Health & Maintenance for more information." %gethostname() + else: + print " All systems OK" -a=be.getRecorderList() -header="#"*60 -print header -print "" -print "Tuner Status: " -print "--------------" -for i in a: - cmd="select cardtype,hostname from capturecard where cardid=%s;" %i + return - cursor.execute(cmd) - results=cursor.fetchall() - type = results[0][0] - hostname = results[0][1] - id = i - try: - c=be.getCurrentRecording(i) - if c.title == None: - current_recording = "Idle" + +#------------------------------------------- + + +class tuner_recording_status: + def __init__ (self,num_upcoming): + + self.now = datetime.datetime.now() + self.farout=99999999 + self.next_start_diff=datetime.timedelta(self.farout) + self.num_upcoming=num_upcoming + self.tuner_status_list=[] + self.conflict_list=[] + self.upcoming_list=[] + self.ur=0 + self.db_connection_status = self.check_database_connection() + if self.db_connection_status == 0: + self.tuner_status() + self.conflicts() + self.upcoming_recordings() + + def get_db_check_status(self): + return self.db_connection_status + + def check_database_connection(self): + rc=0 + try: + self.be = MythBE() + self.db = MythDB() + self.cursor = self.db.cursor() + except: + print "\nCouldn't connect to MythTV service for status" + rc=1 + return rc +#----- + def tuner_status(self): + a=self.be.getRecorderList() + for i in a: + outline='' + cmd="select cardtype,hostname from capturecard where cardid=%s;" %i + self.cursor.execute(cmd) + results=self.cursor.fetchall() + type = results[0][0] + hostname = results[0][1] + id = i + try: + c=self.be.getCurrentRecording(i) + if c.title == None: + current_recording = "Idle" + else: + current_recording = "Recording %s" %c.title + outline = " Tuner %s (%s) on %s : %s " %(id, type, hostname, current_recording) + self.tuner_status_list.append(outline) + except: + outline = " Tuner %s (%s) on %s : %s " %(id, type, hostname, "Tuner Error") + self.tuner_status_list.append(outline) + + def get_tuner_status(self): + return self.tuner_status + + def print_tuner_status(self): + print "Tuner Status:" + print "-------------" + if len(self.tuner_status_list) > 0 : + for line in self.tuner_status_list: + print line else: - current_recording = "Recording %s" %c.title - print " Tuner %s (%s) on %s : %s " %(id, type, hostname, current_recording) - except: - print " Tuner %s (%s) on %s : %s " %(id, type, hostname, "Tuner Error") - -print "" -print "Upcoming Recordings (Next %s scheduled):" %(num_upcoming) -print "--------------------" -a=be.getUpcomingRecordings() -r=0 -for i in a: - r += 1 - if r > num_upcoming: - break - - title_chan="%s (%s)" %(i.title, i.channame) - print " %s - %s - %-50s " %(i.starttime,i.hostname, title_chan) - #start_time=time.strptime(str(i.starttime), "%Y-%m-%d %H:%M:%S") - diff = i.starttime - now - if diff < next_start_diff : - next_start_diff = diff - - -print "" -print "Conflicted Recordings:" -print "----------------------" -a=be.getConflictedRecordings() -c=0 -for i in a: - title_chan="%s (%s)" %(i.title, i.channame) - print " %s - %-50s " %(i.starttime,title_chan) - c=c+1 - -if c == 0: - print " No conflicts" - -print "" -print "" - - -if next_start_diff == datetime.timedelta(farout): - ur="No recordings are scheduled" -else: - ur=formatTD(next_start_diff) -print "The next recording starts in:\n %s" %(ur) -print "" -subprocess.call("/usr/LH/bin/diskspace.sh",shell=True) -print "" + print " No tuners found" + +#-------- + def upcoming_recordings(self): + + a=self.be.getUpcomingRecordings() + r=0 + for i in a: + r += 1 + if r > self.num_upcoming: + break + + title_chan="%s (%s)" %(i.title, i.channame) + #remove timezone + start_time=re.split("[-+]\d\d:\d\d",str(i.starttime))[0] + start_time_struct=datetime.datetime.strptime(start_time, "%Y-%m-%d %H:%M:%S") + start_time_out=start_time_struct.strftime("%a %b %d %I:%M%p") + self.upcoming_list.append([start_time_out,i.hostname, title_chan]) + #print " %s - %s - %s" %(start_time_out,i.hostname, title_chan) + diff = start_time_struct - self.now + if diff < self.next_start_diff : + self.next_start_diff = diff + + if self.next_start_diff == datetime.timedelta(self.farout): + self.ur="No recordings are scheduled" + else: + self.ur=formatTD(self.next_start_diff) + + + def get_upcoming_recordings(self): + return self.upcoming_list + + def print_upcoming_recordings(self): + #print self.get_upcoming_recordings() + print "" + print "Upcoming Recordings (Next %s Scheduled):" %(self.num_upcoming) + print "----------------------------------------" + if len(self.get_upcoming_recordings()) > 0: + for i in self.get_upcoming_recordings(): + #print " %s - %s - %s" %(start_time_out,i.hostname, title_chan) + print " %s - %s - %s" %(i[0],i[1],i[2]) + else: + print " No upcoming recordings" + pass + + def get_next_start_time(self): + return self.ur + + def print_next_start_time(self): + print "" + print "The next recording starts in:" + print "-----------------------------" + print " %s" %(self.get_next_start_time()) + print "" + +#----- + + def conflicts(self): + a=self.be.getConflictedRecordings() + for i in a: + out_line='' + title_chan="%s (%s)" %(i.title, i.channame) + out_line=(i.starttime,title_chan) + self.conflict_list.append(out_line) + + def get_conflict_list(self): + return self.conflict_list + + def print_conflict_list(self): + print "" + print "Recording Conflicts:" + print "--------------------" + if len(self.get_conflict_list()) > 0: + for i in self.get_conflict_list(): + print " %s - %-50s " %(i[0],i[1]) + else: + print " No conflicts" + +#header="#"*60 + + +def go(): + tuner = tuner_recording_status(12) + if tuner.get_db_check_status() == 0: + tuner.print_tuner_status() + tuner.print_upcoming_recordings() + tuner.print_conflict_list() + tuner.print_next_start_time() + print_alerts() + + +if __name__ == "__main__": + go() diff --git a/abs/core/LinHES-system/mythfrontend-start b/abs/core/LinHES-system/mythfrontend-start index 5cfc9b7..320f960 100755 --- a/abs/core/LinHES-system/mythfrontend-start +++ b/abs/core/LinHES-system/mythfrontend-start @@ -3,12 +3,7 @@ PIDS=$(pidof mythfrontend) P_array=( $PIDS ) let "instances = ${#P_array[*]}" # Count elements. -if pacman -Q mythtv | grep -q 0.24 -then - STARTCMD="/usr/bin/mythfrontend -d -l /var/log/mythtv/mythfrontend.log" -else - STARTCMD="/usr/bin/mythfrontend -d --syslog local6" -fi +STARTCMD="/usr/bin/mythfrontend -d --syslog local6" if [ $instances -gt 0 ]; then diff --git a/abs/core/LinHES-system/switch_web.sh b/abs/core/LinHES-system/switch_web.sh deleted file mode 100644 index bf57764..0000000 --- a/abs/core/LinHES-system/switch_web.sh +++ /dev/null @@ -1,29 +0,0 @@ -#!/bin/bash -#This script is used to switch the default homepage between supplementalweb and -#the standard local webpage -. /etc/systemconfig -DATADIR=/data/srv/httpd/htdocs - -function rmindex { - if [ -L $DATADIR/index.html ] - then - rm -f $DATADIR/index.html - fi -} - -if [ $SystemType = Master_backend -o $SystemType = Standalone ] -then - if [ x$1 = xsupplemental ] - then - rmindex - ln -s $DATADIR/alt_index.html $DATADIR/index.html - else - rmindex - ln -s $DATADIR/index.htm $DATADIR/index.html - fi -else - echo "This service is only available for StandAlone or Master_backend LinHES systems" - -fi - - diff --git a/abs/core/LinHES-system/system.install b/abs/core/LinHES-system/system.install index ddad9e3..880ea02 100644 --- a/abs/core/LinHES-system/system.install +++ b/abs/core/LinHES-system/system.install @@ -8,17 +8,11 @@ pre_install() { # arg 1: the new package version post_install() { - MVDIR=/usr/LH/bin - #add myth_mtc to cron list - if [ ! -e /etc/cron.daily/myth_mtc ] - then - ln -s $MVDIR/myth_mtc.sh /etc/cron.daily/myth_mtc + #remove daily myth_mtc link + if [ -h /etc/cron.daily/myth_mtc ]; then + rm -f /etc/cron.daily/myth_mtc fi - # Add db entry for misc status in MythWeb - # not needed in R8 because it's in the DB, may be removed - #/usr/LH/bin/misc_status_config.py - sv restart msg_daemon } diff --git a/abs/core/ceton_infinitv/98-ctn91xx.rules b/abs/core/ceton_infinitv/98-ctn91xx.rules index dc91d36..c690c4b 100755 --- a/abs/core/ceton_infinitv/98-ctn91xx.rules +++ b/abs/core/ceton_infinitv/98-ctn91xx.rules @@ -1 +1 @@ -KERNEL=="ctn91xx_*", MODE="0666",OWNER="root",GROUP="root" SYMLINK+="ceton/%k", RUN+="/usr/LH/bin/ifctn.sh" +KERNEL=="ctn91xx_*", MODE="0666",OWNER="root",GROUP="root" SYMLINK+="ceton/%k" diff --git a/abs/core/ceton_infinitv/PKGBUILD b/abs/core/ceton_infinitv/PKGBUILD index 758a344..bc37ba9 100755 --- a/abs/core/ceton_infinitv/PKGBUILD +++ b/abs/core/ceton_infinitv/PKGBUILD @@ -3,7 +3,7 @@ pkgname=ceton_infinitv _kernver=3.6.7-1-ARCH pkgver=2012_1116_1219 -pkgrel=2 +pkgrel=3 usb_pkgver=0.1.0 pkgdesc="Drivers for Ceton InfiniTV4 - pci/usb " arch=('i686' 'x86_64') @@ -41,7 +41,7 @@ package() { install -m755 ${srcdir}/reset_network.py ${pkgdir}/usr/bin/infinitv_reset_network.py } md5sums=('7c56167bfa89d228bf170962bc42ac01' - '104092cdb5bfc54ddc53f768bff7937d' + '554f2c1bcc5d7169659f0ad3d8a513a5' 'b5db78e2b9cccd65d6ea4c88dd028ace' '9f95a08bdd8c2a9e8d62e7daf52a90f6' '3fc4c4981d2dab54b297f17564b7729f' diff --git a/abs/core/e16_theme_settings/PKGBUILD b/abs/core/e16_theme_settings/PKGBUILD index 4526103..c6cd7a9 100644 --- a/abs/core/e16_theme_settings/PKGBUILD +++ b/abs/core/e16_theme_settings/PKGBUILD @@ -1,6 +1,6 @@ pkgname=e16_theme_settings -pkgver=1.0 -pkgrel=16 +pkgver=8.1 +pkgrel=2 pkgdesc="Default settings for e16" depends=('enlightenment') source=() diff --git a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.gradient.png b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.gradient.png Binary files differnew file mode 100644 index 0000000..8e41368 --- /dev/null +++ b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.gradient.png diff --git a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.png b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.png Binary files differindex 8e41368..112b46d 100644..100755 --- a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.png +++ b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.png diff --git a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.spot.png b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.spot.png Binary files differnew file mode 100644 index 0000000..86c18bd --- /dev/null +++ b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/artwork/backgrounds/lh-mv-bg-0.spot.png diff --git a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/init.cfg b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/init.cfg index 037d1c8..68455b1 100644 --- a/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/init.cfg +++ b/abs/core/e16_theme_settings/e16_config_dir/themes/Summer/init.cfg @@ -4,7 +4,7 @@ __E_CFG_VERSION 1 /* Maintained at themes.effx.us $Id: init.cfg 46 2009-04-13 05:25:03Z don $ */ -BEGIN_BACKGROUND(STARTUP_BACKGROUND) +BEGIN_BACKGROUND("STARTUP_BACKGROUND") SET_SOLID("0 114 188") //ADD_BACKGROUND_TILED_SCALED_VERTICALLY("artwork/backgrounds/back-startup.png") ADD_OVERLAY_IMAGE_ASPECT("graphics/startup-overlay.png") @@ -13,21 +13,21 @@ END_BACKGROUND __ICLASS __BGN __NAME STARTUP_BAR __NORMAL "artwork/init/init-basebar.png" - __EDGE_SCALING 1 1 1 1 + __EDGE_SCALING 0 0 0 0 __END __ICLASS __BGN __NAME PROGRESS_BAR /* normal used for text background */ - __NORMAL "artwork/init/init-textbar.png" - __EDGE_SCALING 6 22 1 1 + __NORMAL "artwork/init/init-basebar.png" + __EDGE_SCALING 0 0 0 0 /* used for numeric bg */ - __CLICKED "artwork/init/init-textbar.png" - __EDGE_SCALING 6 22 1 1 + __CLICKED "artwork/init/init-basebar.png" + __EDGE_SCALING 0 0 0 0 /* used for bar itself */ - __NORMAL_ACTIVE "artwork/init/init-progbar.png" - __EDGE_SCALING 6 22 1 1 - __PADDING 6 22 1 1 + __NORMAL_ACTIVE "artwork/init/init-basebar.png" + __EDGE_SCALING 0 0 0 0 + __PADDING 0 0 0 0 __END /* text class for text above progress bar */ @@ -35,7 +35,7 @@ __TCLASS __BGN __NAME PROGRESS_TEXT __JUSTIFICATION 0 __NORMAL "*font-init" - __FORGROUND_COLOR 0 0 0 + __FORGROUND_COLOR 0 114 188 __END /* number in % displayed next to text */ @@ -43,6 +43,6 @@ __TCLASS __BGN __NAME PROGRESS_TEXT_NUMBER __JUSTIFICATION 512 __NORMAL "*font-init" - __FORGROUND_COLOR 0 0 0 + __FORGROUND_COLOR 0 114 188 __END diff --git a/abs/core/func/PKGBUILD b/abs/core/func/PKGBUILD index a4844cb..1b7b000 100644 --- a/abs/core/func/PKGBUILD +++ b/abs/core/func/PKGBUILD @@ -1,6 +1,6 @@ pkgname=func pkgver=0.25 -pkgrel=16 +pkgrel=17 pkgdesc="fedora unifed network controller" url="" license="gpl" @@ -10,27 +10,26 @@ conflicts=() replaces=() backup=('etc/func/minion.conf') install=func.install -source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func fe_restart.py msg.py msg.cfg func_ssl_patch logrotate-func.conf) +source=($pkgname-$pkgver.tar.gz minion.conf power.py pacman.py failed_func fe_restart.py msg.py func_ssl_patch logrotate-func.conf) arch=('i686' 'x86_64') package() { moddir="$pkgdir/usr/lib/python2.7/site-packages/func/minion/modules/" - cd $srcdir/$pkgname-${pkgver} + cd $srcdir/$pkgname-${pkgver} patch -Np1 < $srcdir/func_ssl_patch - python2 setup.py build - python2 setup.py install --prefix=$pkgdir/usr - cd $srcdir - install -m755 -D minion.conf $pkgdir/etc/func/minion.conf - install -m755 -D $srcdir/$pkgname-$pkgver/etc/async_methods.conf $pkgdir/etc/func/async_methods.conf - install -m755 -D $srcdir/$pkgname-${pkgver}/etc/sample.acl $pkgdir/etc/func/minion-acl.d/sample.acl - install -m755 -D $srcdir/$pkgname-${pkgver}/etc/Test.conf $pkgdir/etc/func/modules/Test.conf - install -m755 -D $srcdir/power.py ${moddir}/power.py - install -m755 -D $srcdir/pacman.py ${moddir}/pacman.py - install -m755 -D $srcdir/msg.py ${moddir}/msg.py - install -m755 -D $srcdir/msg.cfg $pkgdir/usr/MythVantage/etc/msg.cfg - install -m755 -D $srcdir/fe_restart.py ${moddir}/fe_restart.py - install -m755 -D $srcdir/failed_func $pkgdir/usr/MythVantage/bin/failed_func - mkdir -p $pkgdir/var/log/func + python2 setup.py build + python2 setup.py install --prefix=$pkgdir/usr + cd $srcdir + install -m755 -D minion.conf $pkgdir/etc/func/minion.conf + install -m755 -D $srcdir/$pkgname-$pkgver/etc/async_methods.conf $pkgdir/etc/func/async_methods.conf + install -m755 -D $srcdir/$pkgname-${pkgver}/etc/sample.acl $pkgdir/etc/func/minion-acl.d/sample.acl + install -m755 -D $srcdir/$pkgname-${pkgver}/etc/Test.conf $pkgdir/etc/func/modules/Test.conf + install -m755 -D $srcdir/power.py ${moddir}/power.py + install -m755 -D $srcdir/pacman.py ${moddir}/pacman.py + install -m755 -D $srcdir/msg.py ${moddir}/msg.py + install -m755 -D $srcdir/fe_restart.py ${moddir}/fe_restart.py + install -m755 -D $srcdir/failed_func $pkgdir/usr/MythVantage/bin/failed_func + mkdir -p $pkgdir/var/log/func install -m644 -D ../logrotate-func.conf $pkgdir/etc/logrotate.d/func cd $pkgdir @@ -44,6 +43,5 @@ md5sums=('892252004f122c61bb58bb4607553ffe' 'c30f420c01628a08061270e8502115c5' 'b02a733b7a74569e57521bc3708724a5' '7b4266a8031cf7de485bf6b74e57bd74' - 'bdd37627c9effd745a051fd2d279975b' 'b816bdb222e646a7801b218c3a626b0e' '7d7c8a334f6b46ae1e5e483854b93924') diff --git a/abs/core/linhes-theme/LinHES/README b/abs/core/linhes-theme-old/LinHES/README index 7fcf653..7fcf653 100644 --- a/abs/core/linhes-theme/LinHES/README +++ b/abs/core/linhes-theme-old/LinHES/README diff --git a/abs/core/linhes-theme/LinHES/base.xml b/abs/core/linhes-theme-old/LinHES/base.xml index 93d8fc2..93d8fc2 100644 --- a/abs/core/linhes-theme/LinHES/base.xml +++ b/abs/core/linhes-theme-old/LinHES/base.xml diff --git a/abs/core/linhes-theme/LinHES/config-ui.xml b/abs/core/linhes-theme-old/LinHES/config-ui.xml index c4a3ed0..c4a3ed0 100644 --- a/abs/core/linhes-theme/LinHES/config-ui.xml +++ b/abs/core/linhes-theme-old/LinHES/config-ui.xml diff --git a/abs/core/linhes-theme/LinHES/cr-lines.png b/abs/core/linhes-theme-old/LinHES/cr-lines.png Binary files differindex 5edb06a..5edb06a 100644 --- a/abs/core/linhes-theme/LinHES/cr-lines.png +++ b/abs/core/linhes-theme-old/LinHES/cr-lines.png diff --git a/abs/core/linhes-theme/LinHES/cr-selectbar.png b/abs/core/linhes-theme-old/LinHES/cr-selectbar.png Binary files differindex 9c4b635..9c4b635 100644 --- a/abs/core/linhes-theme/LinHES/cr-selectbar.png +++ b/abs/core/linhes-theme-old/LinHES/cr-selectbar.png diff --git a/abs/core/linhes-theme/LinHES/htmls/progdetails_page1.html b/abs/core/linhes-theme-old/LinHES/htmls/progdetails_page1.html index 0ac7b5e..0ac7b5e 100644 --- a/abs/core/linhes-theme/LinHES/htmls/progdetails_page1.html +++ b/abs/core/linhes-theme-old/LinHES/htmls/progdetails_page1.html diff --git a/abs/core/linhes-theme/LinHES/htmls/progdetails_page2.html b/abs/core/linhes-theme-old/LinHES/htmls/progdetails_page2.html index ede4146..ede4146 100644 --- a/abs/core/linhes-theme/LinHES/htmls/progdetails_page2.html +++ b/abs/core/linhes-theme-old/LinHES/htmls/progdetails_page2.html diff --git a/abs/core/linhes-theme/LinHES/menu-ui.xml b/abs/core/linhes-theme-old/LinHES/menu-ui.xml index 3883b21..3883b21 100644 --- a/abs/core/linhes-theme/LinHES/menu-ui.xml +++ b/abs/core/linhes-theme-old/LinHES/menu-ui.xml diff --git a/abs/core/linhes-theme/LinHES/preview.jpg b/abs/core/linhes-theme-old/LinHES/preview.jpg Binary files differindex d89d8e5..d89d8e5 100644 --- a/abs/core/linhes-theme/LinHES/preview.jpg +++ b/abs/core/linhes-theme-old/LinHES/preview.jpg diff --git a/abs/core/linhes-theme/LinHES/qtlook.txt b/abs/core/linhes-theme-old/LinHES/qtlook.txt index 1e1a3d5..1e1a3d5 100644 --- a/abs/core/linhes-theme/LinHES/qtlook.txt +++ b/abs/core/linhes-theme-old/LinHES/qtlook.txt diff --git a/abs/core/linhes-theme/LinHES/themeinfo.xml b/abs/core/linhes-theme-old/LinHES/themeinfo.xml index 3ff2771..3ff2771 100755 --- a/abs/core/linhes-theme/LinHES/themeinfo.xml +++ b/abs/core/linhes-theme-old/LinHES/themeinfo.xml diff --git a/abs/core/linhes-theme/LinHES/ui.xml b/abs/core/linhes-theme-old/LinHES/ui.xml index 7857798..7857798 100644 --- a/abs/core/linhes-theme/LinHES/ui.xml +++ b/abs/core/linhes-theme-old/LinHES/ui.xml diff --git a/abs/core/linhes-theme/LinHES/ui/LinHESlogo.png b/abs/core/linhes-theme-old/LinHES/ui/LinHESlogo.png Binary files differindex b0ebf1a..b0ebf1a 100644 --- a/abs/core/linhes-theme/LinHES/ui/LinHESlogo.png +++ b/abs/core/linhes-theme-old/LinHES/ui/LinHESlogo.png diff --git a/abs/core/linhes-theme/LinHES/ui/background.png b/abs/core/linhes-theme-old/LinHES/ui/background.png Binary files differindex d948de7..d948de7 100644 --- a/abs/core/linhes-theme/LinHES/ui/background.png +++ b/abs/core/linhes-theme-old/LinHES/ui/background.png diff --git a/abs/core/linhes-theme/LinHES/ui/button_off.png b/abs/core/linhes-theme-old/LinHES/ui/button_off.png Binary files differindex 56d4c36..56d4c36 100644 --- a/abs/core/linhes-theme/LinHES/ui/button_off.png +++ b/abs/core/linhes-theme-old/LinHES/ui/button_off.png diff --git a/abs/core/linhes-theme/LinHES/ui/button_on.png b/abs/core/linhes-theme-old/LinHES/ui/button_on.png Binary files differindex 09c10f9..09c10f9 100755 --- a/abs/core/linhes-theme/LinHES/ui/button_on.png +++ b/abs/core/linhes-theme-old/LinHES/ui/button_on.png diff --git a/abs/core/linhes-theme/LinHES/ui/kmlogo.png b/abs/core/linhes-theme-old/LinHES/ui/kmlogo.png Binary files differindex 19ea6d5..19ea6d5 100755 --- a/abs/core/linhes-theme/LinHES/ui/kmlogo.png +++ b/abs/core/linhes-theme-old/LinHES/ui/kmlogo.png diff --git a/abs/core/linhes-theme/LinHES/ui/kmlogo1.png b/abs/core/linhes-theme-old/LinHES/ui/kmlogo1.png Binary files differindex 0550ef3..0550ef3 100755 --- a/abs/core/linhes-theme/LinHES/ui/kmlogo1.png +++ b/abs/core/linhes-theme-old/LinHES/ui/kmlogo1.png diff --git a/abs/core/linhes-theme/LinHES/watermark/appearance.png b/abs/core/linhes-theme-old/LinHES/watermark/appearance.png Binary files differindex 37b575e..37b575e 100644 --- a/abs/core/linhes-theme/LinHES/watermark/appearance.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/appearance.png diff --git a/abs/core/linhes-theme/LinHES/watermark/archive.png b/abs/core/linhes-theme-old/LinHES/watermark/archive.png Binary files differindex 0fd1dff..0fd1dff 100755 --- a/abs/core/linhes-theme/LinHES/watermark/archive.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/archive.png diff --git a/abs/core/linhes-theme/LinHES/watermark/backup.png b/abs/core/linhes-theme-old/LinHES/watermark/backup.png Binary files differindex a63ea36..a63ea36 100644 --- a/abs/core/linhes-theme/LinHES/watermark/backup.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/backup.png diff --git a/abs/core/linhes-theme/LinHES/watermark/blank.png b/abs/core/linhes-theme-old/LinHES/watermark/blank.png Binary files differindex 163a9ff..163a9ff 100644 --- a/abs/core/linhes-theme/LinHES/watermark/blank.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/blank.png diff --git a/abs/core/linhes-theme/LinHES/watermark/browser.png b/abs/core/linhes-theme-old/LinHES/watermark/browser.png Binary files differindex 0171ab6..0171ab6 100644 --- a/abs/core/linhes-theme/LinHES/watermark/browser.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/browser.png diff --git a/abs/core/linhes-theme/LinHES/watermark/categories.png b/abs/core/linhes-theme-old/LinHES/watermark/categories.png Binary files differindex e0fd57f..e0fd57f 100755 --- a/abs/core/linhes-theme/LinHES/watermark/categories.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/categories.png diff --git a/abs/core/linhes-theme/LinHES/watermark/cd.png b/abs/core/linhes-theme-old/LinHES/watermark/cd.png Binary files differindex 9f08c2f..9f08c2f 100644 --- a/abs/core/linhes-theme/LinHES/watermark/cd.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/cd.png diff --git a/abs/core/linhes-theme/LinHES/watermark/cd_rip.png b/abs/core/linhes-theme-old/LinHES/watermark/cd_rip.png Binary files differindex 92150bd..92150bd 100644 --- a/abs/core/linhes-theme/LinHES/watermark/cd_rip.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/cd_rip.png diff --git a/abs/core/linhes-theme/LinHES/watermark/checklist.png b/abs/core/linhes-theme-old/LinHES/watermark/checklist.png Binary files differindex 66fd8b2..66fd8b2 100644 --- a/abs/core/linhes-theme/LinHES/watermark/checklist.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/checklist.png diff --git a/abs/core/linhes-theme/LinHES/watermark/clock.png b/abs/core/linhes-theme-old/LinHES/watermark/clock.png Binary files differindex 621fec4..621fec4 100644 --- a/abs/core/linhes-theme/LinHES/watermark/clock.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/clock.png diff --git a/abs/core/linhes-theme/LinHES/watermark/delete.png b/abs/core/linhes-theme-old/LinHES/watermark/delete.png Binary files differindex d8b9e76..d8b9e76 100755 --- a/abs/core/linhes-theme/LinHES/watermark/delete.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/delete.png diff --git a/abs/core/linhes-theme/LinHES/watermark/dvd.png b/abs/core/linhes-theme-old/LinHES/watermark/dvd.png Binary files differindex be25627..be25627 100644 --- a/abs/core/linhes-theme/LinHES/watermark/dvd.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/dvd.png diff --git a/abs/core/linhes-theme/LinHES/watermark/dvd_rip.png b/abs/core/linhes-theme-old/LinHES/watermark/dvd_rip.png Binary files differindex 81b776c..81b776c 100644 --- a/abs/core/linhes-theme/LinHES/watermark/dvd_rip.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/dvd_rip.png diff --git a/abs/core/linhes-theme/LinHES/watermark/eject.png b/abs/core/linhes-theme-old/LinHES/watermark/eject.png Binary files differindex 871576d..871576d 100755 --- a/abs/core/linhes-theme/LinHES/watermark/eject.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/eject.png diff --git a/abs/core/linhes-theme/LinHES/watermark/gallery.png b/abs/core/linhes-theme-old/LinHES/watermark/gallery.png Binary files differindex ad5baa5..ad5baa5 100644 --- a/abs/core/linhes-theme/LinHES/watermark/gallery.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/gallery.png diff --git a/abs/core/linhes-theme/LinHES/watermark/gallery_settings.png b/abs/core/linhes-theme-old/LinHES/watermark/gallery_settings.png Binary files differindex 17f0c9a..17f0c9a 100644 --- a/abs/core/linhes-theme/LinHES/watermark/gallery_settings.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/gallery_settings.png diff --git a/abs/core/linhes-theme/LinHES/watermark/hardware_info.png b/abs/core/linhes-theme-old/LinHES/watermark/hardware_info.png Binary files differindex 0d7232d..0d7232d 100644 --- a/abs/core/linhes-theme/LinHES/watermark/hardware_info.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/hardware_info.png diff --git a/abs/core/linhes-theme/LinHES/watermark/hardware_settings.png b/abs/core/linhes-theme-old/LinHES/watermark/hardware_settings.png Binary files differindex 44dec7a..44dec7a 100644 --- a/abs/core/linhes-theme/LinHES/watermark/hardware_settings.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/hardware_settings.png diff --git a/abs/core/linhes-theme/LinHES/watermark/info.png b/abs/core/linhes-theme-old/LinHES/watermark/info.png Binary files differindex 41821ab..41821ab 100644 --- a/abs/core/linhes-theme/LinHES/watermark/info.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/info.png diff --git a/abs/core/linhes-theme/LinHES/watermark/joystick.png b/abs/core/linhes-theme-old/LinHES/watermark/joystick.png Binary files differindex e482e5d..e482e5d 100644 --- a/abs/core/linhes-theme/LinHES/watermark/joystick.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/joystick.png diff --git a/abs/core/linhes-theme/LinHES/watermark/keys.png b/abs/core/linhes-theme-old/LinHES/watermark/keys.png Binary files differindex fa8fecb..fa8fecb 100644 --- a/abs/core/linhes-theme/LinHES/watermark/keys.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/keys.png diff --git a/abs/core/linhes-theme/LinHES/watermark/movietime.png b/abs/core/linhes-theme-old/LinHES/watermark/movietime.png Binary files differindex df3bcb6..df3bcb6 100644 --- a/abs/core/linhes-theme/LinHES/watermark/movietime.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/movietime.png diff --git a/abs/core/linhes-theme/LinHES/watermark/multimedia.png b/abs/core/linhes-theme-old/LinHES/watermark/multimedia.png Binary files differindex 0e8e1dd..0e8e1dd 100644 --- a/abs/core/linhes-theme/LinHES/watermark/multimedia.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/multimedia.png diff --git a/abs/core/linhes-theme/LinHES/watermark/music.png b/abs/core/linhes-theme-old/LinHES/watermark/music.png Binary files differindex a97ba4c..a97ba4c 100644 --- a/abs/core/linhes-theme/LinHES/watermark/music.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/music.png diff --git a/abs/core/linhes-theme/LinHES/watermark/music_settings.png b/abs/core/linhes-theme-old/LinHES/watermark/music_settings.png Binary files differindex 9e65588..9e65588 100644 --- a/abs/core/linhes-theme/LinHES/watermark/music_settings.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/music_settings.png diff --git a/abs/core/linhes-theme/LinHES/watermark/news.png b/abs/core/linhes-theme-old/LinHES/watermark/news.png Binary files differindex 438a02d..438a02d 100644 --- a/abs/core/linhes-theme/LinHES/watermark/news.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/news.png diff --git a/abs/core/linhes-theme/LinHES/watermark/optical.png b/abs/core/linhes-theme-old/LinHES/watermark/optical.png Binary files differindex 1cdf3ea..1cdf3ea 100644 --- a/abs/core/linhes-theme/LinHES/watermark/optical.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/optical.png diff --git a/abs/core/linhes-theme/LinHES/watermark/phone.png b/abs/core/linhes-theme-old/LinHES/watermark/phone.png Binary files differindex c9abc2e..c9abc2e 100644 --- a/abs/core/linhes-theme/LinHES/watermark/phone.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/phone.png diff --git a/abs/core/linhes-theme/LinHES/watermark/play.png b/abs/core/linhes-theme-old/LinHES/watermark/play.png Binary files differindex e9c8b15..e9c8b15 100644 --- a/abs/core/linhes-theme/LinHES/watermark/play.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/play.png diff --git a/abs/core/linhes-theme/LinHES/watermark/previous.png b/abs/core/linhes-theme-old/LinHES/watermark/previous.png Binary files differindex 57363e8..57363e8 100755 --- a/abs/core/linhes-theme/LinHES/watermark/previous.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/previous.png diff --git a/abs/core/linhes-theme/LinHES/watermark/priority.png b/abs/core/linhes-theme-old/LinHES/watermark/priority.png Binary files differindex 9b00a35..9b00a35 100644 --- a/abs/core/linhes-theme/LinHES/watermark/priority.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/priority.png diff --git a/abs/core/linhes-theme/LinHES/watermark/record.png b/abs/core/linhes-theme-old/LinHES/watermark/record.png Binary files differindex 7c07dd9..7c07dd9 100644 --- a/abs/core/linhes-theme/LinHES/watermark/record.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/record.png diff --git a/abs/core/linhes-theme/LinHES/watermark/restore.png b/abs/core/linhes-theme-old/LinHES/watermark/restore.png Binary files differindex 6ed810c..6ed810c 100644 --- a/abs/core/linhes-theme/LinHES/watermark/restore.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/restore.png diff --git a/abs/core/linhes-theme/LinHES/watermark/search.png b/abs/core/linhes-theme-old/LinHES/watermark/search.png Binary files differindex 2371f90..2371f90 100644 --- a/abs/core/linhes-theme/LinHES/watermark/search.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/search.png diff --git a/abs/core/linhes-theme/LinHES/watermark/setup.png b/abs/core/linhes-theme-old/LinHES/watermark/setup.png Binary files differindex 4aaa062..4aaa062 100644 --- a/abs/core/linhes-theme/LinHES/watermark/setup.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/setup.png diff --git a/abs/core/linhes-theme/LinHES/watermark/smolt.png b/abs/core/linhes-theme-old/LinHES/watermark/smolt.png Binary files differindex 44dec7a..44dec7a 100644 --- a/abs/core/linhes-theme/LinHES/watermark/smolt.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/smolt.png diff --git a/abs/core/linhes-theme/LinHES/watermark/stream.png b/abs/core/linhes-theme-old/LinHES/watermark/stream.png Binary files differindex 493e5da..493e5da 100644 --- a/abs/core/linhes-theme/LinHES/watermark/stream.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/stream.png diff --git a/abs/core/linhes-theme/LinHES/watermark/tng.png b/abs/core/linhes-theme-old/LinHES/watermark/tng.png Binary files differindex ac0b685..ac0b685 100644 --- a/abs/core/linhes-theme/LinHES/watermark/tng.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/tng.png diff --git a/abs/core/linhes-theme/LinHES/watermark/tv.png b/abs/core/linhes-theme-old/LinHES/watermark/tv.png Binary files differindex e836592..e836592 100644 --- a/abs/core/linhes-theme/LinHES/watermark/tv.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/tv.png diff --git a/abs/core/linhes-theme/LinHES/watermark/upgrade.png b/abs/core/linhes-theme-old/LinHES/watermark/upgrade.png Binary files differindex c838a3d..c838a3d 100644 --- a/abs/core/linhes-theme/LinHES/watermark/upgrade.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/upgrade.png diff --git a/abs/core/linhes-theme/LinHES/watermark/video.png b/abs/core/linhes-theme-old/LinHES/watermark/video.png Binary files differindex bf07e27..bf07e27 100644 --- a/abs/core/linhes-theme/LinHES/watermark/video.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/video.png diff --git a/abs/core/linhes-theme/LinHES/watermark/video_settings.png b/abs/core/linhes-theme-old/LinHES/watermark/video_settings.png Binary files differindex a786c2c..a786c2c 100644 --- a/abs/core/linhes-theme/LinHES/watermark/video_settings.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/video_settings.png diff --git a/abs/core/linhes-theme/LinHES/watermark/weather.png b/abs/core/linhes-theme-old/LinHES/watermark/weather.png Binary files differindex 6ef59eb..6ef59eb 100644 --- a/abs/core/linhes-theme/LinHES/watermark/weather.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/weather.png diff --git a/abs/core/linhes-theme/LinHES/watermark/wizard.png b/abs/core/linhes-theme-old/LinHES/watermark/wizard.png Binary files differindex 3b7a184..3b7a184 100644 --- a/abs/core/linhes-theme/LinHES/watermark/wizard.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/wizard.png diff --git a/abs/core/linhes-theme/LinHES/watermark/zoneminder.png b/abs/core/linhes-theme-old/LinHES/watermark/zoneminder.png Binary files differindex b97dec2..b97dec2 100755 --- a/abs/core/linhes-theme/LinHES/watermark/zoneminder.png +++ b/abs/core/linhes-theme-old/LinHES/watermark/zoneminder.png diff --git a/abs/core/linhes-theme-old/PKGBUILD b/abs/core/linhes-theme-old/PKGBUILD new file mode 100644 index 0000000..75d2157 --- /dev/null +++ b/abs/core/linhes-theme-old/PKGBUILD @@ -0,0 +1,18 @@ +# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $ +# Maintainer: Cecil Watson<knoppmyth@gmail.com> + +pkgname=linhes-theme +pkgver=1.4 +pkgrel=4 +pkgdesc="Default LinHES theme." +arch=('i686' 'x86_64') +license=('GPL2') +url="http://linhes.org/" + +package() { + cd $srcdir/ + cp -a $startdir/LinHES $srcdir/ + mkdir -p $pkgdir/usr/share/mythtv/themes + cp -a LinHES $pkgdir/usr/share/mythtv/themes +} +md5sums=() diff --git a/abs/core/linhes-theme/LHLogo.png b/abs/core/linhes-theme/LHLogo.png Binary files differnew file mode 100755 index 0000000..9ff4fd2 --- /dev/null +++ b/abs/core/linhes-theme/LHLogo.png diff --git a/abs/core/linhes-theme/LHLogoAndText.png b/abs/core/linhes-theme/LHLogoAndText.png Binary files differnew file mode 100755 index 0000000..39504e7 --- /dev/null +++ b/abs/core/linhes-theme/LHLogoAndText.png diff --git a/abs/core/linhes-theme/PKGBUILD b/abs/core/linhes-theme/PKGBUILD index 75d2157..fb894fb 100644 --- a/abs/core/linhes-theme/PKGBUILD +++ b/abs/core/linhes-theme/PKGBUILD @@ -1,18 +1,71 @@ -# $Id: PKGBUILD 5936 2008-07-21 20:24:16Z thomas $ -# Maintainer: Cecil Watson<knoppmyth@gmail.com> - pkgname=linhes-theme -pkgver=1.4 -pkgrel=4 -pkgdesc="Default LinHES theme." +pkgver=8.1 +pkgrel=15 +pkgdesc="Default LinHES MythTV theme" arch=('i686' 'x86_64') license=('GPL2') url="http://linhes.org/" +patches=('readme.txt.patch' 'osd.xml.patch' 'base.xml.patch' + 'menu-ui-vert.xml.patch' 'recordings-ui.xml.patch' 'schedule-ui.xml.patch' + 'video-ui.xml.patch' 'config-ui.xml.patch') + +#The LinHES theme is based on TintedGlass by Harley Peters +source=("git://github.com/MythTV-Themes/TintedGlass.git#branch=fixes/0.27" + `echo ${patches[@]:0}` 'themeinfo.xml' 'install-ui.xml' + 'background.png' 'preview.png' 'qt-background.png' 'tux_thoughts.png' + 'LHLogo.png' 'LHLogoAndText.png') + package() { - cd $srcdir/ - cp -a $startdir/LinHES $srcdir/ - mkdir -p $pkgdir/usr/share/mythtv/themes - cp -a LinHES $pkgdir/usr/share/mythtv/themes + THEMEROOT=usr/share/mythtv/themes + + msg "Copying theme to package" + mkdir -p $pkgdir/$THEMEROOT/LinHES/ + rsync -arp --exclude .git* --delete-excluded $srcdir/TintedGlass/* $pkgdir/$THEMEROOT/LinHES/ + + msg "--------------------------applying patches------------------------------" + cd $pkgdir/$THEMEROOT/LinHES/ + for i in `echo ${patches[@]:0}` + do + echo applying $i + patch -N -i ${srcdir}/$i || return 1 + echo "-----------------------------" + done + cd $startdir + msg "--------------------------done applying patches-------------------------" + + msg "Copy *.xml and adding backgrounds and images for LinHES" + rsync -pL $srcdir/*.xml $pkgdir/$THEMEROOT/LinHES/ + rm -r $pkgdir/$THEMEROOT/LinHES/images/backgrounds/* + rsync -pL $srcdir/*background.png $pkgdir/$THEMEROOT/LinHES/images/backgrounds/ + rsync -pL $srcdir/preview.png $pkgdir/$THEMEROOT/LinHES/ + + #tux_thoughts.png is the thought bubble for the menu descriptions + rsync -pL $srcdir/tux_thoughts.png $pkgdir/$THEMEROOT/LinHES/images/ + rsync -pL $srcdir/LHLogo*.png $pkgdir/$THEMEROOT/LinHES/images/ + + msg "Modifying yellows and blue to LinHES yellow and blue" + #yellow + grep -lr '#d9d900' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#d9d900/\#ebb81c/g" + #darkyellow + grep -lr '#CCCC29' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#CCCC29/\#ebb81c/g" + #blue + grep -lr '#3a9ade' $pkgdir/$THEMEROOT/LinHES/ | xargs sed -i "s/\#3a9ade/\#0072bc/g" } -md5sums=() +md5sums=('SKIP' + '9c2fc68864cbedb6e449056972b457aa' + 'e061490fc869e0e14d4e144c17c3ec56' + 'e7af3675fc706a7cb4ea9d0c321219d5' + '9e4fcf840f14c6f17f30432e28edd885' + '33609e27406f00bdc0243a5ef840c6f9' + 'aff82cf901edc4baa058013d93610cfc' + 'e502da82e6d76b3f43dd7ddc20c1e2e7' + '78b64e567cd799df52045d9fc5a59cc0' + '7d7bc458a8f4af408700609f3e1f412e' + 'a0201e0aa1608eeab27ee754e4d2c1de' + 'cbe5f663ebb5d51abe811f81dafec303' + '4b1c27297bb5f8d9d7bbaf72b35130b5' + '12d26a786fde397348653128a6d7676a' + '2bd09b8049aaf5ba21db5baf3a0ce077' + 'b51ef0cbf8ed2d3a8c1a8257a89aceff' + '09ad14842f828b7a8d24070ec8214fe5') diff --git a/abs/core/linhes-theme/background.png b/abs/core/linhes-theme/background.png Binary files differnew file mode 100644 index 0000000..ffdf9ef --- /dev/null +++ b/abs/core/linhes-theme/background.png diff --git a/abs/core/linhes-theme/base.xml.patch b/abs/core/linhes-theme/base.xml.patch new file mode 100644 index 0000000..2ff8487 --- /dev/null +++ b/abs/core/linhes-theme/base.xml.patch @@ -0,0 +1,276 @@ +--- base.xml.orig 2013-11-22 18:52:58.956295819 +0000 ++++ base.xml 2013-12-17 16:44:18.909675491 +0000 +@@ -424,26 +424,26 @@ + + <!-- Base definition of a base popup backdrop --> + <shape name="base_popup_backdrop" from="base_backdrop"> +- <fill color="#0a0a0e" alpha="255" /> ++ <fill color="#0a0a0e" alpha="235" /> + </shape> + + <!-- Base definition of a heading group --> + <group name="base_heading_group"> + <area>0,0,1280,720</area> + <shape name="base_heading_backdrop" from="base_backdrop"> +- <area>500,-7,280,32</area> ++ <area>485,-7,310,32</area> + </shape> + <shape name="base_heading_backdrop_line" from="base_backdrop_line"> +- <area>500,-7,280,32</area> ++ <area>485,-7,310,32</area> + </shape> + <shape name="heading-left-line" from="base_highlight_vertical_line"> +- <area>501,0,2,22</area> ++ <area>486,0,2,22</area> + </shape> + <shape name="heading-right-line" from="base_highlight_vertical_line"> +- <area>777,0,2,22</area> ++ <area>792,0,2,22</area> + </shape> + <shape name="heading-bottom-line" from="base_highlight_line"> +- <area>501,22,278,2</area> ++ <area>486,22,308,2</area> + </shape> + </group> + +@@ -452,7 +452,7 @@ + <area>0,0,1280,720</area> + <imagetype name="background"> + <area>0,0,1280,720</area> +- <filename>images/backgrounds/background.png</filename> ++ <filename>images/backgrounds/qt-background.png</filename> + </imagetype> + <imagetype name="fanart"> + <area>0,0,1280,720</area> +@@ -463,25 +463,25 @@ + <!-- Base definition of a clock group --> + <group name="base_clock_backdrop_group"> + <shape name="base_clock_backdrop" from="base_backdrop"> +- <area>500,695,280,32</area> ++ <area>485,695,310,32</area> + </shape> + <shape name="base_clock_backdrop_line" from="base_backdrop_line"> +- <area>500,695,280,32</area> ++ <area>485,695,310,32</area> + </shape> + <shape name="base_clock_backdrop_top_line" from="base_highlight_line"> +- <area>501,696,278,2</area> ++ <area>486,696,308,2</area> + </shape> + <shape name="base_clock_backdrop_left_line" from="base_highlight_vertical_line"> +- <area>501,698,2,22</area> ++ <area>486,698,2,22</area> + </shape> + <shape name="clock_right_line" from="base_highlight_vertical_line"> +- <area>777,698,2,22</area> ++ <area>792,698,2,22</area> + </shape> + </group> + + <!-- Base denfinition of a clock --> + <clock name="base_clock"> +- <area>529,698,219,22</area> ++ <area>494,698,292,22</area> + <font>baseextrasmall</font> + <template>%DATE%, %TIME%</template> + <align>allcenter</align> +@@ -533,19 +533,19 @@ + + <!-- Base definition of a active button background --> + <shape name="base_button_background_active" from="base_button_background_selected"> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + </shape> + + <!-- Base definition of a active button list background --> + <shape name="base_button_list_background_active" from="base_button_background_selected"> +- <fill color="#CCCCCC" alpha="150" /> +- <line color="#CCCCCC" alpha="150" width="2" /> ++ <fill color="#000000" alpha="175" /> ++ <line color="#454545" alpha="180" width="2" /> + </shape> + + <!-- Base definition of a disabled button background --> + <shape name="base_button_background_disabled" from="base_button_background_selected"> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + </shape> + +@@ -563,7 +563,7 @@ + + <!-- Base definition of a inactve button background list style --> + <shape name="base_button_background_inactive_list_style" from="base_button_background_selected"> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + </shape> + +@@ -571,6 +571,7 @@ + <buttonlist name="base_button_list"> + <layout>vertical</layout> + <spacing>2</spacing> ++ <wrapstyle>selection</wrapstyle> + <drawfrombottom>yes</drawfrombottom> + <buttonarea>0,0,100%,100%</buttonarea> + <statetype name="buttonitem"> +@@ -579,7 +580,7 @@ + <area>0,0,100%,100%</area> + </shape> + <textarea name="buttontext"> +- <font>basesmallblack</font> ++ <font>basesmallgrey</font> + <cutdown>yes</cutdown> + <align>allcenter</align> + </textarea> +@@ -997,7 +998,7 @@ + <shape name="buttonbackground"> + <area>0,0,100%,100%</area> + <type>roundbox</type> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + <cornerradius>90</cornerradius> + </shape> +@@ -1064,7 +1065,7 @@ + <shape name="buttonbackground"> + <area>0,0,100%,100%</area> + <type>roundbox</type> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + <cornerradius>90</cornerradius> + </shape> +@@ -1117,7 +1118,7 @@ + <shape name="background"> + <area>0,0,100%,100%</area> + <type>roundbox</type> +- <fill color="#333333" alpha="175" /> ++ <fill color="#000000" alpha="175" /> + <line color="#454545" alpha="180" width="2" /> + <cornerradius>90</cornerradius> + </shape> +@@ -1228,22 +1229,20 @@ + + <imagetype name="background"> + <area>0,0,1280,720</area> +- <filename>images/backgrounds/background.png</filename> ++ <filename>images/backgrounds/qt-background.png</filename> + </imagetype> + + <group name="heading-backdrop" from="base_heading_group" /> + + <group name="clock-backdrop-group" from="base_clock_backdrop_group" /> + +- <clock name="time" from="base_clock"> +- <area>529,698,219,22</area> +- </clock> ++ <clock name="time" from="base_clock" /> + + </window> + + <!-- Popup Dialogue Box --> + <window name="MythPopupBox"> +- <area>-1,-1,400,463</area> ++ <area>-1,-1,602,488</area> + + <animation trigger="AboutToShow"> + <section> +@@ -1260,76 +1259,76 @@ + </animation> + + <shape name="popup-backdrop" from="base_popup_backdrop"> +- <area>0,0,400,463</area> ++ <area>0,0,602,488</area> + </shape> + + <shape name="popup-backdrop-line" from="base_backdrop_line"> +- <area>1,1,398,461</area> ++ <area>1,1,600,486</area> + </shape> + + <shape name="popup-first-line" from="base_highlight_line"> +- <area>2,2,396,2</area> ++ <area>2,2,596,2</area> + </shape> + + <shape name="popup-second-line" from="base_line"> +- <area>23,174,354,2</area> ++ <area>23,212,552,2</area> + </shape> + + <shape name="popup-third-line" from="base_highlight_line"> +- <area>2,459,396,2</area> ++ <area>2,484,596,2</area> + </shape> + + <shape name="popup-left-line" from="base_highlight_vertical_line"> +- <area>2,4,2,455</area> ++ <area>2,4,2,480</area> + </shape> + + <shape name="popup-right-line" from="base_highlight_vertical_line"> +- <area>396,4,2,455</area> ++ <area>598,4,2,480</area> + </shape> + + <textarea name="messagearea" from="basetextarea"> +- <area>16,8,368,162</area> ++ <area>10,8,582,196</area> + <font>basesmalldarkyellow</font> + <multiline>yes</multiline> + <align>allcenter</align> + </textarea> + + <buttonlist name="list" from="base_button_list"> +- <area>15,191,370,264</area> ++ <area>15,222,570,252</area> + <statetype name="buttonitem"> + <state name="active"> +- <area>0,0,370,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>8,0,354,40</area> ++ <area>8,0,570,34</area> + </textarea> + <imagetype name="buttonarrow"> +- <position>347,11</position> ++ <position>544,8</position> + </imagetype> + </state> + <state name="selectedactive"> +- <area>0,0,370,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>8,0,354,40</area> ++ <area>8,0,570,34</area> + </textarea> + <imagetype name="buttonarrow"> +- <position>347,11</position> ++ <position>544,8</position> + </imagetype> + </state> + <state name="selectedinactive"> +- <area>0,0,370,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>8,0,354,40</area> ++ <area>8,0,570,34</area> + </textarea> + <imagetype name="buttonarrow"> +- <position>347,11</position> ++ <position>544,8</position> + </imagetype> + </state> + </statetype> + <statetype name="upscrollarrow"> +- <position>0,255</position> ++ <position>0,251</position> + </statetype> + <statetype name="downscrollarrow"> +- <position>20,255</position> ++ <position>20,251</position> + </statetype> + </buttonlist> + </window> diff --git a/abs/core/linhes-theme/config-ui.xml.patch b/abs/core/linhes-theme/config-ui.xml.patch new file mode 100644 index 0000000..36d6b67 --- /dev/null +++ b/abs/core/linhes-theme/config-ui.xml.patch @@ -0,0 +1,200 @@ +--- config-ui.xml.orig 2013-12-14 17:21:38.882668570 +0000 ++++ config-ui.xml 2013-12-14 17:23:08.317851041 +0000 +@@ -347,6 +347,197 @@ + + </window> + ++ <window name="languageselection"> ++ ++ <textarea name="title" from="base_heading"> ++ <value>Language</value> ++ </textarea> ++ ++ <textarea name="countrylabel"> ++ <font>baselarge</font> ++ <area>40,20,580,40</area> ++ <value>Country</value> ++ <align>allcenter</align> ++ </textarea> ++ ++ <shape name="countrybackground" from="base_backdrop"> ++ <area>40,65,580,550</area> ++ </shape> ++ ++ <shape name="country-top-backdrop-line" from="base_backdrop_line"> ++ <area>41,66,578,548</area> ++ </shape> ++ ++ <shape name="country-top-line" from="base_highlight_line"> ++ <area>42,67,576,2</area> ++ </shape> ++ ++ <shape name="country-bottom-line" from="base_highlight_line"> ++ <area>42,613,576,2</area> ++ </shape> ++ ++ <shape name="country-left-line" from="base_highlight_vertical_line"> ++ <area>42,69,2,544</area> ++ </shape> ++ ++ <shape name="country-right-line" from="base_highlight_vertical_line"> ++ <area>616,69,2,544</area> ++ </shape> ++ ++ <shape name="country-arrows-backdrop" from="base_arrows_backdrop"> ++ <area>48,615,50,12</area> ++ </shape> ++ ++ <buttonlist name="countries" from="base_list"> ++ <area>50,78,560,530</area> ++ <scrollstyle>center</scrollstyle> ++ <statetype name="buttonitem"> ++ <state name="active"> ++ <area>0,0,100%,55</area> ++ <shape name="buttonbackground" from="base_select_bar_active"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ <imagetype name="buttonimage"> ++ <area>5,7,60,40</area> ++ </imagetype> ++ <textarea name="buttontext" from="basetextarea"> ++ <area>70,0,90%,30</area> ++ <font>basemediumgrey</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ <textarea name="nativecountry" from="basetextarea"> ++ <area>70,30,90%,20</area> ++ <font>basesmallgrey</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ </state> ++ <state name="inactive" from="active"/> ++ <state name="selectedactive" from="active"> ++ <shape name="buttonbackground" from="base_select_bar_selectedactive"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ <textarea name="buttontext" from="basetextarea"> ++ <area>70,0,90%,30</area> ++ <font>basemediumyellow</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ <textarea name="nativecountry" from="basetextarea"> ++ <area>70,30,90%,20</area> ++ <font>basesmall</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ </state> ++ <state name="selectedinactive" from="inactive"> ++ <shape name="buttonbackground" from="base_select_bar_selectedinactive"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ </state> ++ </statetype> ++ <statetype name="upscrollarrow"> ++ <position>5,539</position> ++ </statetype> ++ <statetype name="downscrollarrow"> ++ <position>25,539</position> ++ </statetype> ++ <helptext>Select the country where you reside.</helptext> ++ </buttonlist> ++ ++ <textarea name="languagelabel" from="countrylabel"> ++ <area>660,20,580,40</area> ++ <value>Language</value> ++ </textarea> ++ ++ <shape name="languagebackground" from="base_backdrop"> ++ <area>660,65,580,550</area> ++ </shape> ++ ++ <shape name="lang-top-backdrop-line" from="base_backdrop_line"> ++ <area>661,66,578,548</area> ++ </shape> ++ ++ <shape name="lang-top-line" from="base_highlight_line"> ++ <area>662,67,576,2</area> ++ </shape> ++ ++ <shape name="lang-bottom-line" from="base_highlight_line"> ++ <area>662,613,576,2</area> ++ </shape> ++ ++ <shape name="lang-left-line" from="base_highlight_vertical_line"> ++ <area>662,69,2,544</area> ++ </shape> ++ ++ <shape name="lang-right-line" from="base_highlight_vertical_line"> ++ <area>1236,69,2,544</area> ++ </shape> ++ ++ <shape name="lang-arrows-backdrop" from="base_arrows_backdrop"> ++ <area>668,615,50,12</area> ++ </shape> ++ ++ <buttonlist name="languages" from="countries"> ++ <area>670,78,560,530</area> ++ <statetype name="buttonitem"> ++ <state name="active"> ++ <area>0,0,100%,55</area> ++ <textarea name="buttontext" from="basetextarea"> ++ <area>10,0,90%,30</area> ++ <font>basemediumgrey</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ <textarea name="language" from="nativecountry"> ++ <position>10,30</position> ++ </textarea> ++ </state> ++ <state name="inactive" from="active" /> ++ <state name="selectedactive" from="active"> ++ <shape name="buttonbackground" from="base_select_bar_selectedactive"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ <textarea name="buttontext" from="basetextarea"> ++ <area>10,0,90%,30</area> ++ <font>basemediumyellow</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ <textarea name="language" from="nativecountry"> ++ <area>10,30,90%,20</area> ++ <font>basesmall</font> ++ <cutdown>yes</cutdown> ++ <align>left,vcenter</align> ++ </textarea> ++ </state> ++ <state name="selectedinactive" from="inactive"> ++ <shape name="buttonbackground" from="base_select_bar_selectedinactive"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ </state> ++ </statetype> ++ <helptext>Select your language.</helptext> ++ </buttonlist> ++ ++ <textarea name="helptext" from="basetextarea"> ++ <area>200,630,880,60</area> ++ <align>center</align> ++ </textarea> ++ ++ <button name="save" from="base_button"> ++ <position>1090,643</position> ++ <value>Save</value> ++ </button> ++ ++ <button name="cancel" from="base_button"> ++ <position>40,643</position> ++ <value>Cancel</value> ++ </button> ++ ++ </window> ++ + <window name="grabbersettings"> + <area>0,0,1280,720</area> + diff --git a/abs/core/linhes-theme/install-ui.xml b/abs/core/linhes-theme/install-ui.xml new file mode 100644 index 0000000..1c95ef3 --- /dev/null +++ b/abs/core/linhes-theme/install-ui.xml @@ -0,0 +1,85 @@ +<mythuitheme> + + <window name="welcome_screen"> + <textarea name="title" from="base_heading"> + <value>Welcome to LinHES!</value> + </textarea> + + <!--not used by mythinstall--> + <textarea name="time_text" from="basetextarea"/> + + <!--version info--> + <textarea name="date_text" from="basetextarea"> + <multiline>yes</multiline> + <font>baselarge</font> + <area>20,22,1240,100</area> + <value></value> + <align>allcenter</align> + </textarea> + + <!--not used by mythinstall--> + <textarea name="status_text" from="basetextarea"> + <multiline>yes</multiline> + <font>basemediumyellow</font> + <area>20,140,1240,60</area> + <value></value> + </textarea> + + <!--not used by mythinstall--> + <textarea name="recording_label" from="basetextarea"> + <font>baselarge</font> + <area>20,140,1240,30</area> + <value></value> + </textarea> + + <textarea name="recording_text" from="basetextarea"> + <multiline>yes</multiline> + <font>basemedium</font> + <area>20,170,1240,60</area> + <value>Press MENU for options</value> + <align>center</align> + </textarea> + + <!--not used by mythinstall--> + <textarea name="scheduled_label" from="basetextarea"> + <font>baselarge</font> + <area>20,320,1240,30</area> + <value></value> + </textarea> + + <textarea name="scheduled_text"> + <font>basemedium</font> + <area>20,230,1240,30</area> + <value></value> + <align>center</align> + </textarea> + + <textarea name="mythvantage_text"> + <multiline>no</multiline> + <font>basesmall</font> + <area>20,660,1240,20</area> + <value></value> + <align>center</align> + <cutdown>yes</cutdown> + </textarea> + + <imagetype name="LHLogo"> + <area>365,450,550,179</area> + <preserveaspect>true</preserveaspect> + <filename>images/LHLogoAndText.png</filename> + </imagetype> + + <imagetype name="logo"> + <area>107,465,150,150</area> + <preserveaspect>true</preserveaspect> + <filepattern low="1" high="6">/usr/MythVantage/logos/logo-%1.png</filepattern> + <delay>5000</delay> + </imagetype> + + <imagetype name="logo2" from="logo"> + <area>1022,465,150,150</area> + </imagetype> + + </window> + +</mythuitheme> diff --git a/abs/core/linhes-theme/menu-ui-horizontal.xml.patch b/abs/core/linhes-theme/menu-ui-horizontal.xml.patch new file mode 100644 index 0000000..c099db6 --- /dev/null +++ b/abs/core/linhes-theme/menu-ui-horizontal.xml.patch @@ -0,0 +1,67 @@ +--- menu-ui.xml.orig 2013-11-21 19:05:04.920817617 +0000 ++++ menu-ui.xml 2013-11-21 20:03:45.474172898 +0000 +@@ -9,16 +9,16 @@ + </textarea> + + <shape name="menuscroll-background" from="base_backdrop"> +- <area>0,525,1280,70</area> ++ <area>0,94,1280,70</area> + <type>box</type> + </shape> + + <shape name="menuscroll-top-line" from="base_line"> +- <area>0,526,1280,2</area> ++ <area>0,95,1280,2</area> + </shape> + + <shape name="menuscroll-bottom-line" from="base_line"> +- <area>0,592,1280,2</area> ++ <area>0,161,1280,2</area> + </shape> + + <statetype name="titles"> +@@ -135,7 +135,7 @@ + </statetype> + + <buttonlist name="menu"> +- <area>20,528,1240,64</area> ++ <area>20,98,1240,64</area> + <layout>horizontal</layout> + <spacing>20</spacing> + <scrollstyle>center</scrollstyle> +@@ -157,6 +157,14 @@ + <state name="selectedactive"> + <area>0,0,232,64</area> + <imagetype name="background" /> ++ ++ <shape name="menu-left-line" from="base_highlight_vertical_line"> ++ <area>-10,-2,2,66</area> ++ </shape> ++ <shape name="menu-right-line" from="base_highlight_vertical_line"> ++ <area>240,-2,2,66</area> ++ </shape> ++ + <textarea name="buttontext"> + <area>0,0,232,64</area> + <font>basemediumlargerdarkyellow</font> +@@ -168,6 +176,20 @@ + <cutdown>yes</cutdown> + <case>upper</case> + </textarea> ++ ++ <imagetype name="description_background"> ++ <area>-100,100,410,180</area> ++ <filename>images/tux_thoughts.png</filename> ++ </imagetype> ++ ++ <textarea name="description"> ++ <area>12,87,210,130</area> ++ <align>allcenter</align> ++ <font>basesmallyellow</font> ++ <alpha>225</alpha> ++ <multiline>yes</multiline> ++ </textarea> ++ + </state> + </statetype> + </buttonlist> diff --git a/abs/core/linhes-theme/menu-ui-vert.xml.patch b/abs/core/linhes-theme/menu-ui-vert.xml.patch new file mode 100644 index 0000000..fdff21e --- /dev/null +++ b/abs/core/linhes-theme/menu-ui-vert.xml.patch @@ -0,0 +1,134 @@ +--- menu-ui.xml.orig 2013-12-14 21:10:55.569721394 +0000 ++++ menu-ui.xml 2013-12-18 01:03:39.690460829 +0000 +@@ -3,24 +3,43 @@ + <mythuitheme> + + <window name="mainmenu"> ++ <area>0,0,1280,720</area> + + <textarea name="heading" from="base_heading"> + <value>Main Menu</value> + </textarea> + + <shape name="menuscroll-background" from="base_backdrop"> +- <area>0,525,1280,70</area> ++ <area>35,0,310,720</area> + <type>box</type> + </shape> + +- <shape name="menuscroll-top-line" from="base_line"> +- <area>0,526,1280,2</area> ++ <shape name="menuscroll-left-line" from="base_line"> ++ <area>36,0,2,1280</area> + </shape> + +- <shape name="menuscroll-bottom-line" from="base_line"> +- <area>0,592,1280,2</area> ++ <shape name="menuscroll-right-line" from="base_line"> ++ <area>342,0,2,1280</area> + </shape> + ++ <textarea name="description"> ++ <area>705,158,250,130</area> ++ <align>allcenter</align> ++ <font>basesmallyellow</font> ++ <multiline>yes</multiline> ++ <value>I have no idea</value> ++ </textarea> ++ ++ <imagetype name="description_background"> ++ <area>567,165,487,210</area> ++ <filename>images/tux_thoughts.png</filename> ++ </imagetype> ++ ++ <imagetype name="LHlogo"> ++ <area>492,348,638,207</area> ++ <filename>images/LHLogoAndText.png</filename> <!--851x277 3.072--> ++ </imagetype> ++ + <statetype name="titles"> + <loadondemand>true</loadondemand> + <state name="TV"> +@@ -110,7 +129,7 @@ + <value>Manage Recordings</value> + </textarea> + </state> +- <state name="LIBRARY"> ++ <state name="MENU_MEDIA_LIBRARY"> + <textarea name="heading" from="base_heading"> + <value>Media Library</value> + </textarea> +@@ -135,18 +154,20 @@ + </statetype> + + <buttonlist name="menu"> +- <area>20,528,1240,64</area> +- <layout>horizontal</layout> +- <spacing>20</spacing> +- <scrollstyle>center</scrollstyle> +- <wrapstyle>items</wrapstyle> +- <buttonarea>0,0,1240,64</buttonarea> ++ <area>35,62,310,596</area> ++ <layout>vertical</layout> ++ <spacing>4</spacing> ++ <scrollstyle>free</scrollstyle> ++ <wrapstyle>selection</wrapstyle> ++ <arrange>Stack</arrange> ++ <align>vcenter</align> ++ <buttonarea>0,0,100%,100%</buttonarea> + <statetype name="buttonitem"> + <state name="active"> +- <area>0,0,232,64</area> ++ <area>0,0,310,64</area> + <imagetype name="background" /> + <textarea name="buttontext"> +- <area>0,0,232,64</area> ++ <area>12,0,286,64</area> + <font>basemediumlightgrey</font> + <multiline>yes</multiline> + <align>allcenter</align> +@@ -155,10 +176,13 @@ + </textarea> + </state> + <state name="selectedactive"> +- <area>0,0,232,64</area> +- <imagetype name="background" /> ++ <area>-10,0,330,64</area> ++ <shape name="background" from="base_select_bar_selectedactive"> ++ <area>0,0,100%,100%</area> ++ </shape> ++ + <textarea name="buttontext"> +- <area>0,0,232,64</area> ++ <area>5,0,320,64</area> + <font>basemediumlargerdarkyellow</font> + <multiline>yes</multiline> + <!-- cpu usage is very high +@@ -170,6 +194,27 @@ + </textarea> + </state> + </statetype> ++ <statetype name="upscrollarrow"> ++ <position>147,0</position> ++ <showempty>yes</showempty> ++ <state type="full"> ++ <imagetype name="upon"> ++ <filename>images/lists_up_arrow.png</filename> ++ <alpha>200</alpha> ++ </imagetype> ++ </state> ++ </statetype> ++ <statetype name="downscrollarrow"> ++ <position>147,588</position> ++ <showempty>yes</showempty> ++ <state type="full"> ++ <imagetype name="dnon"> ++ <filename>images/lists_down_arrow.png</filename> ++ <alpha>200</alpha> ++ </imagetype> ++ </state> ++ </statetype> ++ + </buttonlist> + + </window> diff --git a/abs/core/linhes-theme/osd.xml.patch b/abs/core/linhes-theme/osd.xml.patch new file mode 100644 index 0000000..916e629 --- /dev/null +++ b/abs/core/linhes-theme/osd.xml.patch @@ -0,0 +1,66 @@ +--- osd.xml.orig 2013-11-29 21:53:21.351030883 +0000 ++++ osd.xml 2013-11-30 22:28:42.477439824 +0000 +@@ -440,7 +440,8 @@ + <area>90,658,1100,24</area> + <font>small</font> + <align>allcenter</align> +- <template>%DESCRIPTION% %VALUE%%UNITS%</template> ++ <template>%DESCRIPTION% ++ %(|REMAININGTIME|)%%(|BEHINDTIME|)%%VALUE%%UNITS%</template> + </textarea> + + <clock name="clock"> +@@ -980,6 +981,12 @@ + <align>allcenter</align> + </textarea> + ++ <textarea name="callsign"> ++ <font>large</font> ++ <area>68,634,162,46</area> ++ <align>allcenter</align> ++ </textarea> ++ + <imagetype name="iconpath"> + <area>84,536,130,98</area> + <preserveaspect>true</preserveaspect> +@@ -989,17 +996,11 @@ + + <!-- Commit 6216029d2 makes this show up in both recordings and video. --> + <!-- Since I only want it in video and there is no way to control it. I have no choice but to disable it. --> +-<!-- ++ + <imagetype name="coverart"> + <area>70,492,158,186</area> +- <alpha>225</alpha> ++ <alpha>255</alpha> + </imagetype> +---> +- <textarea name="callsign"> +- <font>large</font> +- <area>68,634,162,46</area> +- <align>allcenter</align> +- </textarea> + + <textarea name="category"> + <font>supersmallblue</font> +@@ -1604,6 +1605,11 @@ + <color>#808080</color> + </fontdef> + ++ <fontdef name="smallyellow" face="DejaVu Sans"> ++ <color>#d9d900</color> ++ <pixelsize>21</pixelsize> ++ </fontdef> ++ + <shape name="mythpopupbox-backdrop"> + <area>339,116,602,488</area> + <type>roundbox</type> +@@ -1665,7 +1671,7 @@ + + <textarea name="messagearea"> + <area>349,126,582,196</area> +- <font>small</font> ++ <font>smallyellow</font> + <multiline>yes</multiline> + <align>allcenter</align> + </textarea> diff --git a/abs/core/linhes-theme/preview.png b/abs/core/linhes-theme/preview.png Binary files differnew file mode 100644 index 0000000..506ab1d --- /dev/null +++ b/abs/core/linhes-theme/preview.png diff --git a/abs/core/linhes-theme/qt-background.png b/abs/core/linhes-theme/qt-background.png Binary files differnew file mode 100644 index 0000000..12544b2 --- /dev/null +++ b/abs/core/linhes-theme/qt-background.png diff --git a/abs/core/linhes-theme/readme.txt.patch b/abs/core/linhes-theme/readme.txt.patch new file mode 100644 index 0000000..e1894d0 --- /dev/null +++ b/abs/core/linhes-theme/readme.txt.patch @@ -0,0 +1,18 @@ +--- readme.txt.orig 2013-11-18 21:20:01.034553575 +0000 ++++ readme.txt 2013-11-18 21:20:30.387462546 +0000 +@@ -1,15 +1,3 @@ +-Backgrounds. +- +-If the default background is too light for you there is a darker version located +-in images/backgrounds/dark/. +- +-If the default background is too dark for you there is a lighter version located +-in images/backgrounds/light/. +- +-You can just copy them over to the images/backgrounds/ directory. +-I actually use the darker version myself as my tv is set pretty bright but it is too dark +-for computer monitors. +- + Alternate osd. + There is an alternate osd available for anybody that doesn't like the default. ( osd.xml.alt ) + I use the alternate osd myself. diff --git a/abs/core/linhes-theme/recordings-ui.xml.patch b/abs/core/linhes-theme/recordings-ui.xml.patch new file mode 100644 index 0000000..7855e5a --- /dev/null +++ b/abs/core/linhes-theme/recordings-ui.xml.patch @@ -0,0 +1,228 @@ +--- recordings-ui.xml.orig 2013-11-30 22:40:35.742466059 +0000 ++++ recordings-ui.xml 2013-11-30 22:29:06.554349302 +0000 +@@ -700,7 +700,7 @@ + </window> + + <window name="changeview"> +- <area>-1,-1,380,463</area> ++ <area>-1,-1,602,488</area> + + <animation trigger="AboutToShow"> + <section> +@@ -717,100 +717,100 @@ + </animation> + + <shape name="change-view-backdrop" from="base_popup_backdrop"> +- <area>0,0,380,463</area> ++ <area>0,0,602,488</area> + </shape> + + <shape name="change-view-backdrop-line" from="base_backdrop_line"> +- <area>1,1,378,461</area> ++ <area>1,1,600,486</area> + </shape> + + <shape name="change-view-top-line" from="base_highlight_line"> +- <area>2,2,376,2</area> ++ <area>2,2,596,2</area> + </shape> + + <shape name="change-view-bottom-line" from="base_highlight_line"> +- <area>2,459,376,2</area> ++ <area>2,484,596,2</area> + </shape> + + <shape name="change-view-left-line" from="base_highlight_vertical_line"> +- <area>2,4,2,455</area> ++ <area>2,4,2,480</area> + </shape> + + <shape name="change-view-right-line" from="base_highlight_vertical_line"> +- <area>376,4,2,455</area> ++ <area>598,4,2,480</area> + </shape> + + <shape name="change-view-seperator-top-line" from="base_line"> +- <area>23,74,334,2</area> ++ <area>23,50,552,2</area> + </shape> + + <shape name="change-view-seperator-bottom-line" from="base_line"> +- <area>23,407,334,2</area> ++ <area>23,435,552,2</area> + </shape> + + <textarea name="title" from="basetextarea"> +- <area>4,4,372,70</area> ++ <area>10,4,582,46</area> + <align>allcenter</align> + <font>basesmallyellow</font> + <value>Change View</value> + </textarea> + + <checkbox name="titles" from="base_checkbox"> +- <position>60,102</position> ++ <position>150,102</position> + </checkbox> + + <textarea name="titlelabel" from="basetextarea"> +- <area>110,105,300,30</area> ++ <area>200,105,300,30</area> + <value>Show Titles</value> + </textarea> + + <checkbox name="categories" from="base_checkbox"> +- <position>60,152</position> ++ <position>150,152</position> + </checkbox> + + <textarea name="catlabel" from="titlelabel"> +- <position>110,155</position> ++ <position>200,155</position> + <value>Show Categories</value> + </textarea> + + <checkbox name="recgroups" from="base_checkbox"> +- <position>60,202</position> ++ <position>150,202</position> + </checkbox> + + <textarea name="grouplabel" from="titlelabel"> +- <position>110,205</position> ++ <position>200,205</position> + <value>Show Recording Groups</value> + </textarea> + + <checkbox name="watchlist" from="base_checkbox"> +- <position>60,252</position> ++ <position>150,252</position> + </checkbox> + + <textarea name="watchlabel" from="titlelabel"> +- <position>110,255</position> ++ <position>200,255</position> + <value>Show Watch List</value> + </textarea> + + <checkbox name="searches" from="base_checkbox"> +- <position>60,302</position> ++ <position>150,302</position> + </checkbox> + + <textarea name="searchlabel" from="titlelabel"> +- <position>110,305</position> ++ <position>200,305</position> + <value>Show Searches</value> + </textarea> + + <checkbox name="livetv" from="base_checkbox"> +- <position>60,352</position> ++ <position>150,352</position> + </checkbox> + + <textarea name="livelabel" from="titlelabel"> +- <position>110,355</position> ++ <position>200,355</position> + <value>Show LiveTV</value> + </textarea> + +- <button name="save" from="base_medium_button"> +- <position>15,414</position> ++ <button name="save" from="base_wide_button"> ++ <position>60,440</position> + <value>Save</value> + </button> + +@@ -885,7 +885,7 @@ + </window> + + <window name="groupselector"> +- <area>-1,-1,380,463</area> ++ <area>-1,-1,602,488</area> + + <animation trigger="AboutToShow"> + <section> +@@ -902,67 +902,67 @@ + </animation> + + <shape name="group-selector-backdrop" from="base_popup_backdrop"> +- <area>0,0,380,463</area> ++ <area>0,0,602,488</area> + </shape> + + <shape name="group-selector-backdrop-line" from="base_backdrop_line"> +- <area>1,1,378,461</area> ++ <area>1,1,600,486</area> + </shape> + + <shape name="group-selector-top-line" from="base_highlight_line"> +- <area>2,2,376,2</area> ++ <area>2,2,596,2</area> + </shape> + + <shape name="group-selector-bottom-line" from="base_highlight_line"> +- <area>2,459,376,2</area> ++ <area>2,484,596,2</area> + </shape> + + <shape name="group-selector-left-line" from="base_highlight_vertical_line"> +- <area>2,4,2,455</area> ++ <area>2,4,2,480</area> + </shape> + + <shape name="group-selector-right-line" from="base_highlight_vertical_line"> +- <area>376,4,2,455</area> ++ <area>598,4,2,480</area> + </shape> + + <shape name="group-selector-seperator-first-line" from="base_line"> +- <area>23,173,334,2</area> ++ <area>23,50,552,2</area> + </shape> + + <textarea name="label" from="basetextarea"> +- <area>14,8,352,161</area> ++ <area>10,4,582,46</area> + <align>allcenter</align> + <font>basesmalldarkyellow</font> + </textarea> + + <buttonlist name="groups" from="base_button_list"> +- <area>16,189,349,264</area> ++ <area>15,76,570,398</area> + <drawfrombottom>yes</drawfrombottom> + <statetype name="buttonitem"> + <state name="active"> +- <area>0,0,349,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>15,7,319,24</area> ++ <area>8,0,570,34</area> + </textarea> + </state> + <state name="selectedactive"> +- <area>0,0,349,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>15,7,319,24</area> ++ <area>8,0,570,34</area> + </textarea> + </state> + <state name="selectedinactive"> + <area>0,0,349,40</area> + <textarea name="buttontext"> +- <area>15,7,319,24</area> ++ <area>8,0,570,34</area> + </textarea> + </state> + </statetype> + <statetype name="upscrollarrow"> +- <position>0,256</position> ++ <position>0,397</position> + </statetype> + <statetype name="downscrollarrow"> +- <position>20,256</position> ++ <position>20,397</position> + </statetype> + </buttonlist> + diff --git a/abs/core/linhes-theme/schedule-ui.xml.patch b/abs/core/linhes-theme/schedule-ui.xml.patch new file mode 100644 index 0000000..7032a67 --- /dev/null +++ b/abs/core/linhes-theme/schedule-ui.xml.patch @@ -0,0 +1,148 @@ +--- schedule-ui.xml.orig 2013-11-22 19:35:05.125862862 +0000 ++++ schedule-ui.xml 2013-11-25 22:17:02.323240208 +0000 +@@ -1471,7 +1471,7 @@ + + <textarea name="title_text" from="basetextarea"> + <area>10,4,480,46</area> +- <font>basemediumlargerdarkyellow</font> ++ <font>basemediumlarger</font> + <align>allcenter</align> + <value>Search Term</value> + </textarea> +@@ -1578,7 +1578,7 @@ + + <textarea name="title_text" from="basetextarea"> + <area>10,4,480,46</area> +- <font>basemediumlargerdarkyellow</font> ++ <font>basemediumlarger</font> + <align>allcenter</align> + <value>Select Search</value> + </textarea> +@@ -1681,7 +1681,7 @@ + + <textarea name="title_text" from="basetextarea"> + <area>10,4,480,46</area> +- <font>basemediumlargerdarkyellow</font> ++ <font>basemediumlarger</font> + <align>allcenter</align> + <value>Edit Power Search Fields</value> + </textarea> +@@ -3225,7 +3225,7 @@ + </window> + + <window name="schedulefiltereditor"> +- <area>-1,-1,500,500</area> ++ <area>-1,-1,602,488</area> + + <animation trigger="AboutToShow"> + <section> +@@ -3242,85 +3242,85 @@ + </animation> + + <shape name="schedule-filter-editor-backdrop" from="base_popup_backdrop"> +- <area>0,0,500,500</area> ++ <area>0,0,602,488</area> + </shape> + + <shape name="schedule-filter-editor-backdrop-line" from="base_backdrop_line"> +- <area>1,1,498,498</area> ++ <area>1,1,600,486</area> + </shape> + + <shape name="schedule-filter-editor-top-line" from="base_highlight_line"> +- <area>2,2,496,2</area> ++ <area>2,2,596,2</area> + </shape> + + <shape name="schedule-filter-editor-bottom-line" from="base_highlight_line"> +- <area>2,496,496,2</area> ++ <area>2,484,596,2</area> + </shape> + + <shape name="schedule-filter-editor-left-line" from="base_highlight_vertical_line"> +- <area>2,4,2,492</area> ++ <area>2,4,2,480</area> + </shape> + + <shape name="schedule-filter-editor-right-line" from="base_highlight_vertical_line"> +- <area>496,4,2,492</area> ++ <area>598,4,2,480</area> + </shape> + + <shape name="schedule-filter-editor-seperator-first-line" from="base_line"> +- <area>23,50,454,2</area> ++ <area>23,50,552,2</area> + </shape> + + <shape name="schedule-filter-editor-seperator-second-line" from="base_line"> +- <area>23,435,454,2</area> ++ <area>23,435,552,2</area> + </shape> + + <textarea name="title_text" from="basetextarea"> +- <area>10,4,480,46</area> +- <font>basemediumlargerdarkyellow</font> ++ <area>10,4,582,46</area> ++ <font>basemediumlarger</font> + <align>allcenter</align> + <value>Schedule Filter Editor</value> + </textarea> + + <buttonlist name="filters" from="base_button_list"> +- <area>20,75,460,360</area> ++ <area>15,60,570,360</area> + <statetype name="buttonitem"> + <state name="active"> +- <area>0,0,460,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>40,0,380,40</area> ++ <area>40,0,490,34</area> + </textarea> + <statetype name="buttoncheck"> +- <position>15,10</position> ++ <position>15,7</position> + </statetype> + </state> + <state name="selectedactive"> +- <area>0,0,460,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>40,0,380,40</area> ++ <area>40,0,490,34</area> + </textarea> + <statetype name="buttoncheck"> +- <position>15,10</position> ++ <position>15,7</position> + </statetype> + </state> + <state name="selectedinactive"> +- <area>0,0,460,40</area> ++ <area>0,0,100%,34</area> + <textarea name="buttontext"> +- <area>40,0,380,40</area> ++ <area>40,0,490,34</area> + </textarea> + <statetype name="buttoncheck"> +- <position>15,10</position> ++ <position>15,7</position> + </statetype> + </state> + </statetype> + <statetype name="upscrollarrow"> +- <position>0,343</position> ++ <position>0,359</position> + </statetype> + <statetype name="downscrollarrow"> +- <position>20,343</position> ++ <position>20,359</position> + </statetype> + </buttonlist> + +- <button name="back" from="base_medium_button"> +- <position>75,447</position> ++ <button name="back" from="base_wide_button"> ++ <position>60,440</position> + <value>Back</value> + </button> + diff --git a/abs/core/linhes-theme/themeinfo.xml b/abs/core/linhes-theme/themeinfo.xml new file mode 100644 index 0000000..3deae2c --- /dev/null +++ b/abs/core/linhes-theme/themeinfo.xml @@ -0,0 +1,59 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<!DOCTYPE mythuitheme SYSTEM "http://www.mythtv.org/schema/mythuitheme.xsd"> +<themeinfo> + <!-- The Theme Name (Required) --> + <name>LinHES</name> + + <!-- The Theme Types (Required) --> + <types> + <!-- Type. Legal Values are one or more of: UI, OSD and Menu --> + <type>UI</type> + <type>OSD</type> + </types> + + <!-- Aspect ratio of the theme. (Required) + Maybe be: 4:3, 5:4, 16:9 or 16:10 --> + <aspect>16:9</aspect> + + <!-- The base resolution of the theme before being scaled to the users + resolution (Required) + Usually 800x600 (4:3) or 1280x720 (16:9) --> + <baseres>1280x720</baseres> + + <!-- Theme Author Details (Optional)--> + <author> + <!-- Your name --> + <name>LinHES Dev</name> + + <!-- Your Email Address --> + <email>http://linhes.org</email> + </author> + + <!-- The Versioning Info (Required) --> + <version> + <!-- Major version changes mean the theme is no longer + compatible with earlier versions of mythtv --> + <major>8</major> + + <!-- Minor version changes are backwards compatible --> + <minor>1</minor> + </version> + + <!-- Theme Details (Required) --> + <detail> + <!-- At least one thumbnail image named "preview" must be included + with the theme. + There is no limit to the number of thumbnails. + Each thumbnail must be given a different name --> + <thumbnail name="preview">preview.png</thumbnail> + + <!-- A description of the theme, including general colours and + style. The description should include any details that + may help to locate your theme in a search. --> + <description>LinHES is a transparent theme based on TintedGlass.</description> + + <!-- Errata. A list of known faults, missing elements or unfinished + areas. e.g. "mythgallery not themed" --> + <errata>LinHES is based on TintedGlass. This version of TintedGlass is released under the GPLv2.</errata> + </detail> +</themeinfo> diff --git a/abs/core/linhes-theme/tux_thoughts.png b/abs/core/linhes-theme/tux_thoughts.png Binary files differnew file mode 100755 index 0000000..c36c7a6 --- /dev/null +++ b/abs/core/linhes-theme/tux_thoughts.png diff --git a/abs/core/linhes-theme/video-ui.xml.patch b/abs/core/linhes-theme/video-ui.xml.patch new file mode 100644 index 0000000..55fb750 --- /dev/null +++ b/abs/core/linhes-theme/video-ui.xml.patch @@ -0,0 +1,58 @@ +--- video-ui.xml.orig 2013-12-10 21:58:00.909431846 +0000 ++++ video-ui.xml 2013-12-10 21:57:48.940952773 +0000 +@@ -3116,15 +3116,15 @@ + <preserveaspect>false</preserveaspect> + </imagetype> + +- <button name="done_button" from="base_wide_button"> +- <area>25,443,390,40</area> ++ <button name="done_button" from="base_medium_button"> ++ <area>50,443,350,40</area> + <statetype name="buttonstate"> + <state name="active"> + <shape name="background" from="base_button_background_active"> +- <area>0,0,390,40</area> ++ <area>0,0,350,40</area> + </shape> + <textarea name="buttontext"> +- <area>10,5,370,30</area> ++ <area>10,5,330,30</area> + <align>allcenter</align> + <font>basesmall</font> + <value>Done</value> +@@ -3132,21 +3132,21 @@ + </state> + <state name="selected" from="active"> + <shape name="background" from="base_button_background_selected"> +- <area>0,0,390,40</area> ++ <area>0,0,350,40</area> + </shape> + </state> + </statetype> + </button> + +- <button name="play_button" from="base_wide_button"> +- <area>435,443,390,40</area> ++ <button name="play_button" from="base_medium_button"> ++ <area>450,443,350,40</area> + <statetype name="buttonstate"> + <state name="active"> + <shape name="background" from="base_button_background_active"> +- <area>0,0,390,40</area> ++ <area>0,0,350,40</area> + </shape> + <textarea name="buttontext"> +- <area>10,5,370,30</area> ++ <area>10,5,330,30</area> + <align>allcenter</align> + <font>basesmall</font> + <value>Play</value> +@@ -3154,7 +3154,7 @@ + </state> + <state name="selected" from="active"> + <shape name="background" from="base_button_background_selected"> +- <area>0,0,390,40</area> ++ <area>0,0,350,40</area> + </shape> + </state> + </statetype> diff --git a/abs/core/mesa/PKGBUILD b/abs/core/mesa/PKGBUILD index 7dd7dd2..7e54fe4 100644 --- a/abs/core/mesa/PKGBUILD +++ b/abs/core/mesa/PKGBUILD @@ -15,7 +15,7 @@ if [ "${_git}" = "true" ]; then else pkgver=8.0.4 fi -pkgrel=1 +pkgrel=2 arch=('i686' 'x86_64') makedepends=('glproto>=1.4.15' 'libdrm>=2.4.30' 'libxxf86vm>=1.1.1' 'libxdamage>=1.1.3' 'expat>=2.0.1' 'libx11>=1.4.99.1' 'libxt>=1.1.1' 'gcc-libs>=4.6.1' 'dri2proto>=2.6' 'python2' 'libxml2' 'imake' 'llvm' 'udev>=183') @@ -28,7 +28,7 @@ if [ "${_git}" = "true" ]; then #source=(${source[@]} 'ftp://ftp.archlinux.org/other/mesa/mesa-1ae00c5960af83bea9545a18a1754bad83d5cbd0.tar.bz2') source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-ef9f16f6322a89fb699fbe3da868b10f9acaef98.tar.bz2") else - source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/${pkgver}/MesaLib-${pkgver}.tar.bz2" + source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/older-versions/8.x/${pkgver}/MesaLib-${pkgver}.tar.bz2" #source=(${source[@]} "ftp://ftp.freedesktop.org/pub/mesa/8.0/MesaLib-8.0-rc2.tar.bz2" #source=(${source[@]} "MesaLib-git${_gitdate}.zip"::"http://cgit.freedesktop.org/mesa/mesa/snapshot/mesa-4464ee1a9aa3745109cee23531e3fb2323234d07.tar.bz2" ) @@ -223,6 +223,13 @@ package_mesa() { rm -f "${pkgdir}/usr/include/GL/glut.h" rm -rf ${pkgdir}/usr/include/{GLES,GLES2,EGL,KHR} + #remove glu files + rm -f "${pkgdir}/usr/include/GL/glu.h" + rm -f "${pkgdir}/usr/include/GL/glu_mangle.h" + rm -f "${pkgdir}/usr/lib/libGLU.so" + rm -f "${pkgdir}/usr/lib/libGLU.so.1" + rm -f "${pkgdir}/usr/lib/pkgconfig/glu.pc" + install -m755 -d "${pkgdir}/usr/share/licenses/mesa" install -m644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/mesa/" } diff --git a/abs/core/mplayer-wrapper/PKGBUILD b/abs/core/mplayer-wrapper/PKGBUILD index 6dad202..5fa1f99 100644 --- a/abs/core/mplayer-wrapper/PKGBUILD +++ b/abs/core/mplayer-wrapper/PKGBUILD @@ -1,21 +1,17 @@ pkgname=mplayer-wrapper pkgver=1 -pkgrel=10 +pkgrel=11 pkgdesc="wrapper for mplayer and mplayer derivatives" arch=('i686' 'x86_64') - depends=('perl' 'vdpauinfo') - source=(mplayer-wrapper.pl) - license=('GPL2') -build() { +package() { LH_ROOT=/usr/LH - mkdir -p $startdir/pkg/$LH_ROOT/bin/ + mkdir -p $pkgdir/$LH_ROOT/bin/ - cd $startdir # executables - install -m0755 -D *.pl $startdir/pkg/$LH_ROOT/bin/ + install -m0755 -D $srcdir/*.pl $pkgdir/$LH_ROOT/bin/ } -md5sums=('4ba1c0ed16d2331e9d86ab34f4c9eeb1') +md5sums=('da888009e5937e7e3046f5adcb2a604c') diff --git a/abs/core/mplayer-wrapper/mplayer-wrapper.pl b/abs/core/mplayer-wrapper/mplayer-wrapper.pl index a4c9d64..d938fbf 100644 --- a/abs/core/mplayer-wrapper/mplayer-wrapper.pl +++ b/abs/core/mplayer-wrapper/mplayer-wrapper.pl @@ -1,6 +1,6 @@ #!/usr/bin/perl -use Shell; +use CPAN::Shell; use strict; use POSIX qw(floor); diff --git a/abs/core/mythdb-initial/PKGBUILD b/abs/core/mythdb-initial/PKGBUILD index 28fe94e..d1566a5 100755 --- a/abs/core/mythdb-initial/PKGBUILD +++ b/abs/core/mythdb-initial/PKGBUILD @@ -1,5 +1,5 @@ pkgname=mythdb-initial -pkgver=8 +pkgver=8.1 pkgrel=1 pkgdesc="setup the initial mythtv database for linhes" url="" @@ -12,13 +12,14 @@ backup=() install=mythdb.install source=(mc.sql permissions.sql custom.sql ) arch=('i686' 'x86_64') -build() { - cd $startdir/src - mkdir -p $startdir/pkg/data/database - cp mc.sql $startdir/pkg/data/database/mc.sql.initial - cp permissions.sql $startdir/pkg/data/database/permissions.sql - cp custom.sql $startdir/pkg/data/database/custom.sql +package() { + cd $srcdir + mkdir -p $pkgdir/data/database + cp $srcdir/mc.sql $pkgdir/data/database/mc.sql.initial + cp $srcdir/permissions.sql $pkgdir/data/database/permissions.sql + cp $srcdir/custom.sql $pkgdir/data/database/custom.sql } -md5sums=('9dcf8c574e69fde6b1b2fa1eed95ded4' + +md5sums=('366c1fe7668739d2d5c1123f9f4ee110' 'ad0e57ac5e7c3677808a670e16634bba' - '0942cc7b228cb1049f12950f3e228e8b') + '8c5aa22be114fc20298891d37928cd2e') diff --git a/abs/core/mythdb-initial/custom.sql b/abs/core/mythdb-initial/custom.sql index 72a94f4..99a0452 100644 --- a/abs/core/mythdb-initial/custom.sql +++ b/abs/core/mythdb-initial/custom.sql @@ -45,6 +45,7 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES ('HaltCommand' ,'sudo /sbin/halt' , 'apheleia'), ('RebootCommand' ,'sudo /sbin/reboot' , 'apheleia'), ('Theme' ,'LinHES' , 'apheleia'), + ('ThemePainter' ,'auto' , 'apheleia'), ('LircSocket' ,'/var/run/lirc/lircd' , 'apheleia'); -- @@ -75,13 +76,13 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES -- MythVideo old local dir..replaced by storage groups /* INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES - ('ScreenShotPath' ,'/myth/video_stuff/screenshots' , 'apheleia'), + ('ScreenShotPath' ,'/myth/artwork/screenshots' , 'apheleia'), ('VideoStartupDir' ,'/myth/video' , 'apheleia'), - ('mythvideo.TrailersDir' ,'/myth/video_stuff/trailers' , 'apheleia'), - ('VideoArtworkDir' ,'/myth/video_stuff/coverart' , 'apheleia'), - ('mythvideo.screenshotDir' ,'/myth/video_stuff/screenshots' , 'apheleia'), - ('mythvideo.bannerDir' ,'/myth/video_stuff/banners' , 'apheleia'), - ('mythvideo.fanartDir' ,'/myth/video_stuff/fanart' , 'apheleia'); + ('mythvideo.TrailersDir' ,'/myth/artwork/trailers' , 'apheleia'), + ('VideoArtworkDir' ,'/myth/artwork/coverart' , 'apheleia'), + ('mythvideo.screenshotDir' ,'/myth/artwork/screenshots' , 'apheleia'), + ('mythvideo.bannerDir' ,'/myth/artwork/banners' , 'apheleia'), + ('mythvideo.fanartDir' ,'/myth/artwork/fanart' , 'apheleia'); */ @@ -89,12 +90,12 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES INSERT INTO `storagegroup` (`groupname`, `hostname`, `dirname`) VALUES -- ('Default' ,'apheleia' ,'/myth/tv/'), -- ('LiveTV' ,'apheleia' ,'/myth/tv/live/'), --- ('Screenshots' ,'apheleia' ,'/myth/video_stuff/screenshots/'), +-- ('Screenshots' ,'apheleia' ,'/myth/artwork/screenshots/'), -- ('Videos' ,'apheleia' ,'/myth/video/'), --- ('Coverart' ,'apheleia' ,'/myth/video_stuff/coverart/'), --- ('Banners' ,'apheleia' ,'/myth/video_stuff/banners/'), --- ('Fanart' ,'apheleia' ,'/myth/video_stuff/fanart/'), --- ('Trailers' ,'apheleia' ,'/myth/video_stuff/trailers/'), +-- ('Coverart' ,'apheleia' ,'/myth/artwork/coverart/'), +-- ('Banners' ,'apheleia' ,'/myth/artwork/banners/'), +-- ('Fanart' ,'apheleia' ,'/myth/artwork/fanart/'), +-- ('Trailers' ,'apheleia' ,'/myth/artwork/trailers/'), -- ('Streaming' ,'apheleia' ,'/myth/streaming'), ('DB Backups' ,'apheleia' ,'/data/storage/disk0/backup/mythtv_backups'); @@ -149,7 +150,7 @@ INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES ('HOSTOSsize', '5' , 'apheleia'), ('HOSTrootfstype', 'ext3' , 'apheleia'), ('HOSTHOMEsize', '3' , 'apheleia'), -('HOSTDatabasesize','5' , 'apheleia'), +('HOSTDatabasesize','2' , 'apheleia'), ('HostUseSWAP', '1' , 'apheleia'), ('HostUseALLdata', '1' , 'apheleia'), ('HOSTdatafstype', 'xfs' , 'apheleia'); diff --git a/abs/core/mythdb-initial/mc.sql b/abs/core/mythdb-initial/mc.sql index d3b1679..2174eda 100644 --- a/abs/core/mythdb-initial/mc.sql +++ b/abs/core/mythdb-initial/mc.sql @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.1.59, for unknown-linux-gnu (x86_64) +-- MySQL dump 10.13 Distrib 5.5.28, for Linux (x86_64) -- -- Host: localhost Database: mythconverg -- ------------------------------------------------------ --- Server version 5.1.59 +-- Server version 5.5.28 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -16,31 +16,6 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `callsignnetworkmap` --- - -DROP TABLE IF EXISTS `callsignnetworkmap`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `callsignnetworkmap` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `callsign` varchar(20) NOT NULL DEFAULT '', - `network` varchar(20) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - UNIQUE KEY `callsign` (`callsign`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `callsignnetworkmap` --- - -LOCK TABLES `callsignnetworkmap` WRITE; -/*!40000 ALTER TABLE `callsignnetworkmap` DISABLE KEYS */; -/*!40000 ALTER TABLE `callsignnetworkmap` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `capturecard` -- @@ -75,7 +50,7 @@ CREATE TABLE `capturecard` ( `diseqcid` int(10) unsigned DEFAULT NULL, `dvb_eitscan` tinyint(1) NOT NULL DEFAULT '1', PRIMARY KEY (`cardid`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -137,7 +112,7 @@ CREATE TABLE `channel` ( `sourceid` int(10) unsigned DEFAULT NULL, `callsign` varchar(20) NOT NULL DEFAULT '', `name` varchar(64) NOT NULL DEFAULT '', - `icon` varchar(255) NOT NULL DEFAULT 'none', + `icon` varchar(255) NOT NULL DEFAULT '', `finetune` int(11) DEFAULT NULL, `videofilters` varchar(255) NOT NULL DEFAULT '', `xmltvid` varchar(255) NOT NULL DEFAULT '', @@ -158,6 +133,7 @@ CREATE TABLE `channel` ( `last_record` datetime NOT NULL, `default_authority` varchar(32) NOT NULL DEFAULT '', `commmethod` int(11) NOT NULL DEFAULT '-1', + `iptvid` smallint(6) unsigned DEFAULT NULL, PRIMARY KEY (`chanid`), KEY `channel_src` (`channum`,`sourceid`), KEY `sourceid` (`sourceid`,`xmltvid`,`chanid`), @@ -218,7 +194,7 @@ CREATE TABLE `channelgroupnames` ( LOCK TABLES `channelgroupnames` WRITE; /*!40000 ALTER TABLE `channelgroupnames` DISABLE KEYS */; -INSERT INTO `channelgroupnames` (`grpid`, `name`) VALUES (1,'Favorites'); +INSERT INTO `channelgroupnames` VALUES (1,'Favorites'); /*!40000 ALTER TABLE `channelgroupnames` ENABLE KEYS */; UNLOCK TABLES; @@ -419,7 +395,7 @@ CREATE TABLE `customexample` ( LOCK TABLES `customexample` WRITE; /*!40000 ALTER TABLE `customexample` DISABLE KEYS */; -INSERT INTO `customexample` (`rulename`, `fromclause`, `whereclause`, `search`) VALUES ('New Flix','','program.category_type = \'movie\' AND program.airdate >= \n YEAR(DATE_SUB(NOW(), INTERVAL 1 YEAR)) \nAND program.stars > 0.5 ',1); +INSERT INTO `customexample` VALUES ('New Flix','','program.category_type = \'movie\' AND program.airdate >= \n YEAR(DATE_SUB(NOW(), INTERVAL 1 YEAR)) \nAND program.stars > 0.5 ',1); /*!40000 ALTER TABLE `customexample` ENABLE KEYS */; UNLOCK TABLES; @@ -603,7 +579,7 @@ CREATE TABLE `dtv_privatetypes` ( LOCK TABLES `dtv_privatetypes` WRITE; /*!40000 ALTER TABLE `dtv_privatetypes` DISABLE KEYS */; -INSERT INTO `dtv_privatetypes` (`sitype`, `networkid`, `private_type`, `private_value`) VALUES ('dvb',9018,'channel_numbers','131'),('dvb',9018,'guide_fixup','2'),('dvb',256,'guide_fixup','1'),('dvb',257,'guide_fixup','1'),('dvb',256,'tv_types','1,150,134,133'),('dvb',257,'tv_types','1,150,134,133'),('dvb',4100,'sdt_mapping','1'),('dvb',4101,'sdt_mapping','1'),('dvb',4102,'sdt_mapping','1'),('dvb',4103,'sdt_mapping','1'),('dvb',4104,'sdt_mapping','1'),('dvb',4105,'sdt_mapping','1'),('dvb',4106,'sdt_mapping','1'),('dvb',4107,'sdt_mapping','1'),('dvb',4097,'sdt_mapping','1'),('dvb',4098,'sdt_mapping','1'),('dvb',4100,'tv_types','1,145,154'),('dvb',4101,'tv_types','1,145,154'),('dvb',4102,'tv_types','1,145,154'),('dvb',4103,'tv_types','1,145,154'),('dvb',4104,'tv_types','1,145,154'),('dvb',4105,'tv_types','1,145,154'),('dvb',4106,'tv_types','1,145,154'),('dvb',4107,'tv_types','1,145,154'),('dvb',4097,'tv_types','1,145,154'),('dvb',4098,'tv_types','1,145,154'),('dvb',4100,'guide_fixup','1'),('dvb',4101,'guide_fixup','1'),('dvb',4102,'guide_fixup','1'),('dvb',4103,'guide_fixup','1'),('dvb',4104,'guide_fixup','1'),('dvb',4105,'guide_fixup','1'),('dvb',4106,'guide_fixup','1'),('dvb',4107,'guide_fixup','1'),('dvb',4096,'guide_fixup','5'),('dvb',4097,'guide_fixup','1'),('dvb',4098,'guide_fixup','1'),('dvb',94,'tv_types','1,128'),('atsc',1793,'guide_fixup','3'),('dvb',40999,'guide_fixup','4'),('dvb',70,'force_guide_present','yes'),('dvb',70,'guide_ranges','80,80,96,96'),('dvb',4112,'channel_numbers','131'),('dvb',4115,'channel_numbers','131'),('dvb',4116,'channel_numbers','131'),('dvb',12802,'channel_numbers','131'),('dvb',12803,'channel_numbers','131'),('dvb',12829,'channel_numbers','131'),('dvb',40999,'parse_subtitle_list','1070,1308,1041,1306,1307,1030,1016,1131,1068,1069'),('dvb',4096,'guide_fixup','5'); +INSERT INTO `dtv_privatetypes` VALUES ('dvb',9018,'channel_numbers','131'),('dvb',9018,'guide_fixup','2'),('dvb',256,'guide_fixup','1'),('dvb',257,'guide_fixup','1'),('dvb',256,'tv_types','1,150,134,133'),('dvb',257,'tv_types','1,150,134,133'),('dvb',4100,'sdt_mapping','1'),('dvb',4101,'sdt_mapping','1'),('dvb',4102,'sdt_mapping','1'),('dvb',4103,'sdt_mapping','1'),('dvb',4104,'sdt_mapping','1'),('dvb',4105,'sdt_mapping','1'),('dvb',4106,'sdt_mapping','1'),('dvb',4107,'sdt_mapping','1'),('dvb',4097,'sdt_mapping','1'),('dvb',4098,'sdt_mapping','1'),('dvb',4100,'tv_types','1,145,154'),('dvb',4101,'tv_types','1,145,154'),('dvb',4102,'tv_types','1,145,154'),('dvb',4103,'tv_types','1,145,154'),('dvb',4104,'tv_types','1,145,154'),('dvb',4105,'tv_types','1,145,154'),('dvb',4106,'tv_types','1,145,154'),('dvb',4107,'tv_types','1,145,154'),('dvb',4097,'tv_types','1,145,154'),('dvb',4098,'tv_types','1,145,154'),('dvb',4100,'guide_fixup','1'),('dvb',4101,'guide_fixup','1'),('dvb',4102,'guide_fixup','1'),('dvb',4103,'guide_fixup','1'),('dvb',4104,'guide_fixup','1'),('dvb',4105,'guide_fixup','1'),('dvb',4106,'guide_fixup','1'),('dvb',4107,'guide_fixup','1'),('dvb',4096,'guide_fixup','5'),('dvb',4097,'guide_fixup','1'),('dvb',4098,'guide_fixup','1'),('dvb',94,'tv_types','1,128'),('atsc',1793,'guide_fixup','3'),('dvb',40999,'guide_fixup','4'),('dvb',70,'force_guide_present','yes'),('dvb',70,'guide_ranges','80,80,96,96'),('dvb',4112,'channel_numbers','131'),('dvb',4115,'channel_numbers','131'),('dvb',4116,'channel_numbers','131'),('dvb',12802,'channel_numbers','131'),('dvb',12803,'channel_numbers','131'),('dvb',12829,'channel_numbers','131'),('dvb',40999,'parse_subtitle_list','1070,1308,1041,1306,1307,1030,1016,1131,1068,1069'),('dvb',4096,'guide_fixup','5'); /*!40000 ALTER TABLE `dtv_privatetypes` ENABLE KEYS */; UNLOCK TABLES; @@ -622,6 +598,7 @@ CREATE TABLE `dvdbookmark` ( `subtitlenum` tinyint(4) NOT NULL DEFAULT '-1', `framenum` bigint(20) NOT NULL DEFAULT '0', `timestamp` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `dvdstate` varchar(1024) NOT NULL DEFAULT '', PRIMARY KEY (`serialid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -661,7 +638,7 @@ CREATE TABLE `dvdinput` ( LOCK TABLES `dvdinput` WRITE; /*!40000 ALTER TABLE `dvdinput` DISABLE KEYS */; -INSERT INTO `dvdinput` (`intid`, `hsize`, `vsize`, `ar_num`, `ar_denom`, `fr_code`, `letterbox`, `v_format`) VALUES (1,720,480,16,9,1,1,'ntsc'),(2,720,480,16,9,1,0,'ntsc'),(3,720,480,4,3,1,1,'ntsc'),(4,720,480,4,3,1,0,'ntsc'),(5,720,576,16,9,3,1,'pal'),(6,720,576,16,9,3,0,'pal'),(7,720,576,4,3,3,1,'pal'),(8,720,576,4,3,3,0,'pal'); +INSERT INTO `dvdinput` VALUES (1,720,480,16,9,1,1,'ntsc'),(2,720,480,16,9,1,0,'ntsc'),(3,720,480,4,3,1,1,'ntsc'),(4,720,480,4,3,1,0,'ntsc'),(5,720,576,16,9,3,1,'pal'),(6,720,576,16,9,3,0,'pal'),(7,720,576,4,3,3,1,'pal'),(8,720,576,4,3,3,0,'pal'); /*!40000 ALTER TABLE `dvdinput` ENABLE KEYS */; UNLOCK TABLES; @@ -709,7 +686,7 @@ CREATE TABLE `dvdtranscode` ( LOCK TABLES `dvdtranscode` WRITE; /*!40000 ALTER TABLE `dvdtranscode` DISABLE KEYS */; -INSERT INTO `dvdtranscode` (`intid`, `input`, `name`, `sync_mode`, `use_yv12`, `cliptop`, `clipbottom`, `clipleft`, `clipright`, `f_resize_h`, `f_resize_w`, `hq_resize_h`, `hq_resize_w`, `grow_h`, `grow_w`, `clip2top`, `clip2bottom`, `clip2left`, `clip2right`, `codec`, `codec_param`, `bitrate`, `a_sample_r`, `a_bitrate`, `two_pass`, `tc_param`) VALUES (1,1,'Good',2,1,16,16,0,0,2,0,0,0,0,0,32,32,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(2,2,'Excellent',2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL),(3,2,'Good',2,1,0,0,8,8,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(4,2,'Medium',2,1,0,0,8,8,5,5,0,0,0,0,0,0,0,0,'divx5',NULL,1200,NULL,NULL,0,NULL),(5,3,'Good',2,1,0,0,0,0,0,0,0,0,2,0,80,80,8,8,'divx5',NULL,0,NULL,NULL,0,NULL),(6,4,'Excellent',2,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL),(7,4,'Good',2,1,0,0,8,8,0,2,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(8,5,'Good',1,1,16,16,0,0,5,0,0,0,0,0,40,40,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(9,6,'Good',1,1,0,0,16,16,5,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(10,7,'Good',1,1,0,0,0,0,1,0,0,0,0,0,76,76,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(11,8,'Good',1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL); +INSERT INTO `dvdtranscode` VALUES (1,1,'Good',2,1,16,16,0,0,2,0,0,0,0,0,32,32,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(2,2,'Excellent',2,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL),(3,2,'Good',2,1,0,0,8,8,0,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(4,2,'Medium',2,1,0,0,8,8,5,5,0,0,0,0,0,0,0,0,'divx5',NULL,1200,NULL,NULL,0,NULL),(5,3,'Good',2,1,0,0,0,0,0,0,0,0,2,0,80,80,8,8,'divx5',NULL,0,NULL,NULL,0,NULL),(6,4,'Excellent',2,1,0,0,0,0,0,0,0,0,2,0,0,0,0,0,'divx5',NULL,0,NULL,NULL,1,NULL),(7,4,'Good',2,1,0,0,8,8,0,2,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(8,5,'Good',1,1,16,16,0,0,5,0,0,0,0,0,40,40,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(9,6,'Good',1,1,0,0,16,16,5,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL),(10,7,'Good',1,1,0,0,0,0,1,0,0,0,0,0,76,76,8,8,'divx5',NULL,1618,NULL,NULL,0,NULL),(11,8,'Good',1,1,0,0,0,0,1,0,0,0,0,0,0,0,0,0,'divx5',NULL,1618,NULL,NULL,0,NULL); /*!40000 ALTER TABLE `dvdtranscode` ENABLE KEYS */; UNLOCK TABLES; @@ -773,9 +750,10 @@ DROP TABLE IF EXISTS `housekeeping`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `housekeeping` ( - `tag` varchar(64) NOT NULL DEFAULT '', + `tag` varchar(64) NOT NULL, + `hostname` varchar(64) DEFAULT NULL, `lastrun` datetime DEFAULT NULL, - PRIMARY KEY (`tag`) + UNIQUE KEY `task` (`tag`,`hostname`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -785,6 +763,7 @@ CREATE TABLE `housekeeping` ( LOCK TABLES `housekeeping` WRITE; /*!40000 ALTER TABLE `housekeeping` DISABLE KEYS */; +INSERT INTO `housekeeping` VALUES ('BackupDB',NULL,'2013-11-25 09:32:43'); /*!40000 ALTER TABLE `housekeeping` ENABLE KEYS */; UNLOCK TABLES; @@ -922,6 +901,32 @@ LOCK TABLES `inuseprograms` WRITE; UNLOCK TABLES; -- +-- Table structure for table `iptv_channel` +-- + +DROP TABLE IF EXISTS `iptv_channel`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `iptv_channel` ( + `iptvid` smallint(6) unsigned NOT NULL AUTO_INCREMENT, + `chanid` int(10) unsigned NOT NULL, + `url` text NOT NULL, + `type` set('data','rfc2733-1','rfc2733-2','rfc5109-1','rfc5109-2','smpte2022-1','smpte2022-2') DEFAULT NULL, + `bitrate` int(10) unsigned NOT NULL, + PRIMARY KEY (`iptvid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `iptv_channel` +-- + +LOCK TABLES `iptv_channel` WRITE; +/*!40000 ALTER TABLE `iptv_channel` DISABLE KEYS */; +/*!40000 ALTER TABLE `iptv_channel` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `jobqueue` -- @@ -1004,7 +1009,7 @@ CREATE TABLE `keybindings` ( LOCK TABLES `keybindings` WRITE; /*!40000 ALTER TABLE `keybindings` DISABLE KEYS */; -INSERT INTO `keybindings` (`context`, `action`, `description`, `keylist`, `hostname`) VALUES ('Global','UP','Up Arrow','Up','apheleia'),('Global','DOWN','Down Arrow','Down','apheleia'),('Global','LEFT','Left Arrow','Left','apheleia'),('Global','RIGHT','Right Arrow','Right','apheleia'),('Global','NEXT','Move to next widget','Tab','apheleia'),('Global','PREVIOUS','Move to preview widget','Backtab','apheleia'),('Global','SELECT','Select','Return,Enter,Space','apheleia'),('Global','BACKSPACE','Backspace','Backspace','apheleia'),('Global','ESCAPE','Escape','Esc','apheleia'),('Global','MENU','Pop-up menu','M','apheleia'),('Global','INFO','More information','I','apheleia'),('Global','DELETE','Delete','D','apheleia'),('Global','EDIT','Edit','E','apheleia'),('Global','SCREENSHOT','Save screenshot','','apheleia'),('Global','HANDLEMEDIA','Play a media resource','','apheleia'),('Global','PAGEUP','Page Up','PgUp','apheleia'),('Global','PAGEDOWN','Page Down','PgDown','apheleia'),('Global','PAGETOP','Page to top of list','','apheleia'),('Global','PAGEMIDDLE','Page to middle of list','','apheleia'),('Global','PAGEBOTTOM','Page to bottom of list','','apheleia'),('Global','PREVVIEW','Previous View','Home','apheleia'),('Global','NEXTVIEW','Next View','End','apheleia'),('Global','HELP','Help','F1','apheleia'),('Global','EJECT','Eject Removable Media','','apheleia'),('Global','CUT','Cut text from textedit','Ctrl+X','apheleia'),('Global','COPY','Copy text from textedit','Ctrl+C','apheleia'),('Global','PASTE','Paste text into textedit','Ctrl+V','apheleia'),('Global','UNDO','Undo','Ctrl+Z','apheleia'),('Global','REDO','Redo','Ctrl+Y','apheleia'),('Global','SEARCH','Show incremental search dialog','Ctrl+S','apheleia'),('Global','0','0','0','apheleia'),('Global','1','1','1','apheleia'),('Global','2','2','2','apheleia'),('Global','3','3','3','apheleia'),('Global','4','4','4','apheleia'),('Global','5','5','5','apheleia'),('Global','6','6','6','apheleia'),('Global','7','7','7','apheleia'),('Global','8','8','8','apheleia'),('Global','9','9','9','apheleia'),('Global','TVPOWERON','Turn the display on','','apheleia'),('Global','TVPOWEROFF','Turn the display off','','apheleia'),('Global','SYSEVENT01','Trigger System Key Event #1','','apheleia'),('Global','SYSEVENT02','Trigger System Key Event #2','','apheleia'),('Global','SYSEVENT03','Trigger System Key Event #3','','apheleia'),('Global','SYSEVENT04','Trigger System Key Event #4','','apheleia'),('Global','SYSEVENT05','Trigger System Key Event #5','','apheleia'),('Global','SYSEVENT06','Trigger System Key Event #6','','apheleia'),('Global','SYSEVENT07','Trigger System Key Event #7','','apheleia'),('Global','SYSEVENT08','Trigger System Key Event #8','','apheleia'),('Global','SYSEVENT09','Trigger System Key Event #9','','apheleia'),('Global','SYSEVENT10','Trigger System Key Event #10','','apheleia'),('Browser','ZOOMIN','Zoom in on browser window','.,>','apheleia'),('Browser','ZOOMOUT','Zoom out on browser window',',,<','apheleia'),('Browser','TOGGLEINPUT','Toggle where keyboard input goes to','F1','apheleia'),('Browser','MOUSEUP','Move mouse pointer up','2','apheleia'),('Browser','MOUSEDOWN','Move mouse pointer down','8','apheleia'),('Browser','MOUSELEFT','Move mouse pointer left','4','apheleia'),('Browser','MOUSERIGHT','Move mouse pointer right','6','apheleia'),('Browser','MOUSELEFTBUTTON','Mouse Left button click','5','apheleia'),('Browser','PAGEDOWN','Scroll down half a page','9','apheleia'),('Browser','PAGEUP','Scroll up half a page','3','apheleia'),('Browser','PAGELEFT','Scroll left half a page','7','apheleia'),('Browser','PAGERIGHT','Scroll right half a page','1','apheleia'),('Browser','NEXTLINK','Move selection to next link','Z','apheleia'),('Browser','PREVIOUSLINK','Move selection to previous link','Q','apheleia'),('Browser','FOLLOWLINK','Follow selected link','Return,Space,Enter','apheleia'),('Browser','HISTORYBACK','Go back to previous page','R,Backspace','apheleia'),('Browser','HISTORYFORWARD','Go forward to previous page','F','apheleia'),('Main Menu','EXITPROMPT','Display System Exit Prompt','Esc','apheleia'),('Main Menu','EXIT','System Exit','','apheleia'); +INSERT INTO `keybindings` VALUES ('Global','UP','Up Arrow','Up','apheleia'),('Global','DOWN','Down Arrow','Down','apheleia'),('Global','LEFT','Left Arrow','Left','apheleia'),('Global','RIGHT','Right Arrow','Right','apheleia'),('Global','NEXT','Move to next widget','Tab','apheleia'),('Global','PREVIOUS','Move to preview widget','Backtab','apheleia'),('Global','SELECT','Select','Return,Enter,Space','apheleia'),('Global','BACKSPACE','Backspace','Backspace','apheleia'),('Global','ESCAPE','Escape','Esc','apheleia'),('Global','MENU','Pop-up menu','M','apheleia'),('Global','INFO','More information','I','apheleia'),('Global','DELETE','Delete','D','apheleia'),('Global','EDIT','Edit','E','apheleia'),('Global','SCREENSHOT','Save screenshot','','apheleia'),('Global','HANDLEMEDIA','Play a media resource','','apheleia'),('Global','PAGEUP','Page Up','PgUp','apheleia'),('Global','PAGEDOWN','Page Down','PgDown','apheleia'),('Global','PAGETOP','Page to top of list','','apheleia'),('Global','PAGEMIDDLE','Page to middle of list','','apheleia'),('Global','PAGEBOTTOM','Page to bottom of list','','apheleia'),('Global','PREVVIEW','Previous View','Home','apheleia'),('Global','NEXTVIEW','Next View','End','apheleia'),('Global','HELP','Help','F1','apheleia'),('Global','EJECT','Eject Removable Media','','apheleia'),('Global','CUT','Cut text from textedit','Ctrl+X','apheleia'),('Global','COPY','Copy text from textedit','Ctrl+C','apheleia'),('Global','PASTE','Paste text into textedit','Ctrl+V','apheleia'),('Global','NEWLINE','Insert newline into textedit','Ctrl+Return','apheleia'),('Global','UNDO','Undo','Ctrl+Z','apheleia'),('Global','REDO','Redo','Ctrl+Y','apheleia'),('Global','SEARCH','Show incremental search dialog','Ctrl+S','apheleia'),('Global','0','0','0','apheleia'),('Global','1','1','1','apheleia'),('Global','2','2','2','apheleia'),('Global','3','3','3','apheleia'),('Global','4','4','4','apheleia'),('Global','5','5','5','apheleia'),('Global','6','6','6','apheleia'),('Global','7','7','7','apheleia'),('Global','8','8','8','apheleia'),('Global','9','9','9','apheleia'),('Global','TVPOWERON','Turn the display on','','apheleia'),('Global','TVPOWEROFF','Turn the display off','','apheleia'),('Global','SYSEVENT01','Trigger System Key Event #1','','apheleia'),('Global','SYSEVENT02','Trigger System Key Event #2','','apheleia'),('Global','SYSEVENT03','Trigger System Key Event #3','','apheleia'),('Global','SYSEVENT04','Trigger System Key Event #4','','apheleia'),('Global','SYSEVENT05','Trigger System Key Event #5','','apheleia'),('Global','SYSEVENT06','Trigger System Key Event #6','','apheleia'),('Global','SYSEVENT07','Trigger System Key Event #7','','apheleia'),('Global','SYSEVENT08','Trigger System Key Event #8','','apheleia'),('Global','SYSEVENT09','Trigger System Key Event #9','','apheleia'),('Global','SYSEVENT10','Trigger System Key Event #10','','apheleia'),('Browser','ZOOMIN','Zoom in on browser window','.,>','apheleia'),('Browser','ZOOMOUT','Zoom out on browser window',',,<','apheleia'),('Browser','TOGGLEINPUT','Toggle where keyboard input goes to','F1','apheleia'),('Browser','MOUSEUP','Move mouse pointer up','2','apheleia'),('Browser','MOUSEDOWN','Move mouse pointer down','8','apheleia'),('Browser','MOUSELEFT','Move mouse pointer left','4','apheleia'),('Browser','MOUSERIGHT','Move mouse pointer right','6','apheleia'),('Browser','MOUSELEFTBUTTON','Mouse Left button click','5','apheleia'),('Browser','PAGEDOWN','Scroll down half a page','9','apheleia'),('Browser','PAGEUP','Scroll up half a page','3','apheleia'),('Browser','PAGELEFT','Scroll left half a page','7','apheleia'),('Browser','PAGERIGHT','Scroll right half a page','1','apheleia'),('Browser','NEXTLINK','Move selection to next link','Z','apheleia'),('Browser','PREVIOUSLINK','Move selection to previous link','Q','apheleia'),('Browser','FOLLOWLINK','Follow selected link','Return,Space,Enter','apheleia'),('Browser','HISTORYBACK','Go back to previous page','R,Backspace','apheleia'),('Browser','HISTORYFORWARD','Go forward to previous page','F','apheleia'),('Main Menu','EXITPROMPT','Display System Exit Prompt','Esc','apheleia'),('Main Menu','EXIT','System Exit','','apheleia'); /*!40000 ALTER TABLE `keybindings` ENABLE KEYS */; UNLOCK TABLES; @@ -1101,7 +1106,7 @@ CREATE TABLE `logging` ( KEY `host` (`host`,`application`,`pid`,`msgtime`), KEY `msgtime` (`msgtime`), KEY `level` (`level`) -) ENGINE=MyISAM AUTO_INCREMENT=61 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1110,7 +1115,6 @@ CREATE TABLE `logging` ( LOCK TABLES `logging` WRITE; /*!40000 ALTER TABLE `logging` DISABLE KEYS */; -INSERT INTO `logging` (`id`, `host`, `application`, `pid`, `tid`, `thread`, `filename`, `line`, `function`, `msgtime`, `level`, `message`) VALUES (1,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2534,'ConfigureLogging','2012-08-22 15:20:42',2,'mythtv-setup version: fixes/0.25 [v0.25.2-15-g46cab93] www.mythtv.org'),(2,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2536,'ConfigureLogging','2012-08-22 15:20:42',2,'Qt version: compile: 4.8.2, runtime: 4.8.2'),(3,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2538,'ConfigureLogging','2012-08-22 15:20:42',5,'Enabled verbose msgs: general'),(4,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',1176,'logStart','2012-08-22 15:20:42',5,'Setting Log Level to LOG_INFO'),(5,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',229,'FileLogger','2012-08-22 15:20:42',6,'Added logging to the console'),(6,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',425,'DatabaseLogger','2012-08-22 15:20:42',6,'Added database logging to table logging'),(7,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',1215,'logStart','2012-08-22 15:20:42',5,'Setting up SIGHUP handler'),(8,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdirs.cpp',51,'InitializeMythDirs','2012-08-22 15:20:42',5,'Using runtime prefix = /usr'),(9,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdirs.cpp',64,'InitializeMythDirs','2012-08-22 15:20:42',5,'Using configuration directory = /root/.mythtv'),(10,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',227,'Init','2012-08-22 15:20:42',6,'Assumed character encoding: en_US.UTF-8'),(11,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdb.cpp',866,'LoadDatabaseParamsFromDisk','2012-08-22 15:20:42',3,'Unable to read configuration file mysql.txt'),(12,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcontext.cpp',477,'LoadDatabaseSettings','2012-08-22 15:20:42',5,'Empty LocalHostName.'),(13,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcontext.cpp',481,'LoadDatabaseSettings','2012-08-22 15:20:42',6,'Using localhost value of apheleia'),(14,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',1354,'InitLocale','2012-08-22 15:20:42',5,'Setting QT default locale to en_US'),(15,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',1387,'SaveLocaleDefaults','2012-08-22 15:20:42',6,'Current locale en_US'),(16,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythlocale.cpp',121,'LoadDefaultsFromXML','2012-08-22 15:20:42',5,'Reading locale defaults from /usr/share/mythtv//locales/en_us.xml'),(17,'apheleia','mythtv-setup',1971,1978,'SystemIOHandlerW','system-unix.cpp',90,'run','2012-08-22 15:20:42',6,'Starting IO manager (write)'),(18,'apheleia','mythtv-setup',1971,1977,'SystemIOHandlerR','system-unix.cpp',90,'run','2012-08-22 15:20:42',6,'Starting IO manager (read)'),(19,'apheleia','mythtv-setup',1971,1976,'SystemSignalManager','system-unix.cpp',485,'run','2012-08-22 15:20:42',6,'Starting process signal handler'),(20,'apheleia','mythtv-setup',1971,1975,'SystemManager','system-unix.cpp',263,'run','2012-08-22 15:20:42',6,'Starting process manager'),(21,'apheleia','mythtv-setup',1971,1971,'CoreContext','screensaver-x11.cpp',82,'ScreenSaverX11Private','2012-08-22 15:20:42',6,'ScreenSaverX11Private: DPMS is disabled.'),(22,'apheleia','mythtv-setup',1971,1971,'CoreContext','DisplayRes.cpp',64,'Initialize','2012-08-22 15:20:42',5,'Desktop video mode: 800x600 60.000 Hz'),(23,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythtranslation.cpp',66,'load','2012-08-22 15:20:42',6,'Loading en_us translation for module mythfrontend'),(24,'apheleia','mythtv-setup',1971,1971,'CoreContext','lirc.cpp',208,'Init','2012-08-22 15:20:42',3,'LIRC: Failed to connect to Unix socket \'/var/run/lirc/lircd\'\n eno: No such file or directory (2)'),(25,'apheleia','mythtv-setup',1971,1971,'CoreContext','jsmenu.cpp',91,'Init','2012-08-22 15:20:42',3,'JoystickMenuThread: Joystick disabled - Failed to read /root/.mythtv/joystickmenurc'),(26,'apheleia','mythtv-setup',1971,1971,'CoreContext','cecadapter.cpp',146,'Open','2012-08-22 15:20:42',3,'CECAdapter: Failed to find any CEC devices.'),(27,'apheleia','mythtv-setup',1971,1971,'CoreContext','cecadapter.cpp',216,'Close','2012-08-22 15:20:42',6,'CECAdapter: Closing down CEC.'),(28,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 127.0.0.1:0'),(29,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 192.168.1.244:0'),(30,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP [::1]:0'),(31,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP [fe80::20c:29ff:feb1:f445%eth0]:0'),(32,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 192.168.1.255:0'),(33,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',948,'Init','2012-08-22 15:20:42',6,'Using Frameless Window'),(34,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',961,'Init','2012-08-22 15:20:42',6,'Using Full Screen Window'),(35,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',1051,'Init','2012-08-22 15:20:42',6,'Using the Qt painter'),(36,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 6\n Name: \'basesmall\' Type: \'fontdef\''),(37,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 11\n Name: \'basemedium\' Type: \'fontdef\''),(38,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 15\n Name: \'baselarge\' Type: \'fontdef\''),(39,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 19\n Name: \'baseextralarge\' Type: \'fontdef\''),(40,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 28\n Name: \'basesmallbrown\' Type: \'fontdef\''),(41,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 32\n Name: \'basesmallgrey\' Type: \'fontdef\''),(42,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 36\n Name: \'basesmallpurple\' Type: \'fontdef\''),(43,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 40\n Name: \'basesmallblack\' Type: \'fontdef\''),(44,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 44\n Name: \'basesmallyellow\' Type: \'fontdef\''),(45,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 48\n Name: \'basesmallgreen\' Type: \'fontdef\''),(46,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 52\n Name: \'basesmallblue\' Type: \'fontdef\''),(47,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 56\n Name: \'basesmallred\' Type: \'fontdef\''),(48,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 60\n Name: \'basemediumgrey\' Type: \'fontdef\''),(49,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 64\n Name: \'basemediumgreen\' Type: \'fontdef\''),(50,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 68\n Name: \'basemediumred\' Type: \'fontdef\''),(51,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 72\n Name: \'basemediumpurple\' Type: \'fontdef\''),(52,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 76\n Name: \'basemediumbrown\' Type: \'fontdef\''),(53,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 80\n Name: \'baselargebrown\' Type: \'fontdef\''),(54,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 666\n Name: \'datefont\' Type: \'fontdef\''),(55,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 670\n Name: \'timefont\' Type: \'fontdef\''),(56,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 11\n Name: \'basetiny\' Type: \'fontdef\''),(57,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 36\n Name: \'basetinyred\' Type: \'fontdef\''),(58,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 80\n Name: \'basemediumyellow\' Type: \'fontdef\''),(59,'apheleia','mythtv-setup',1971,1971,'CoreContext','schemawizard.cpp',117,'Compare','2012-08-22 15:20:42',6,'Current MythTV Schema Version (DBSchemaVer): 1299'),(60,'apheleia','mythtv-setup',1971,1971,'CoreContext','checksetup.cpp',68,'checkStoragePaths','2012-08-22 15:21:00',3,'No Storage Group directories are defined. You must add at least one directory to the Default Storage Group where new recordings will be stored.'); /*!40000 ALTER TABLE `logging` ENABLE KEYS */; UNLOCK TABLES; @@ -1145,31 +1149,6 @@ LOCK TABLES `mythlog` WRITE; UNLOCK TABLES; -- --- Table structure for table `networkiconmap` --- - -DROP TABLE IF EXISTS `networkiconmap`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `networkiconmap` ( - `id` int(11) NOT NULL AUTO_INCREMENT, - `network` varchar(20) NOT NULL DEFAULT '', - `url` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`id`), - UNIQUE KEY `network` (`network`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `networkiconmap` --- - -LOCK TABLES `networkiconmap` WRITE; -/*!40000 ALTER TABLE `networkiconmap` DISABLE KEYS */; -/*!40000 ALTER TABLE `networkiconmap` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `oldfind` -- @@ -1232,8 +1211,8 @@ CREATE TABLE `oldrecorded` ( `season` smallint(5) NOT NULL, `episode` smallint(5) NOT NULL, `category` varchar(64) NOT NULL DEFAULT '', - `seriesid` varchar(40) NOT NULL DEFAULT '', - `programid` varchar(40) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, `inetref` varchar(40) NOT NULL, `findid` int(11) NOT NULL DEFAULT '0', `recordid` int(11) NOT NULL DEFAULT '0', @@ -1340,7 +1319,7 @@ CREATE TABLE `playgroup` ( LOCK TABLES `playgroup` WRITE; /*!40000 ALTER TABLE `playgroup` DISABLE KEYS */; -INSERT INTO `playgroup` (`name`, `titlematch`, `skipahead`, `skipback`, `timestretch`, `jump`) VALUES ('Default','',30,5,100,0); +INSERT INTO `playgroup` VALUES ('Default','',30,5,100,0); /*!40000 ALTER TABLE `playgroup` ENABLE KEYS */; UNLOCK TABLES; @@ -1393,7 +1372,7 @@ CREATE TABLE `profilegroups` ( LOCK TABLES `profilegroups` WRITE; /*!40000 ALTER TABLE `profilegroups` DISABLE KEYS */; -INSERT INTO `profilegroups` (`id`, `name`, `cardtype`, `is_default`, `hostname`) VALUES (1,'Software Encoders (v4l based)','V4L',1,NULL),(2,'IVTV MPEG-2 Encoders','MPEG',1,NULL),(3,'Hardware MJPEG Encoders (Matrox G200-TV, Miro DC10, etc)','MJPEG',1,NULL),(4,'Hardware HDTV','HDTV',1,NULL),(5,'Hardware DVB Encoders','DVB',1,NULL),(6,'Transcoders','TRANSCODE',1,NULL),(7,'FireWire Input','FIREWIRE',1,NULL),(8,'USB Mpeg-4 Encoder (Plextor ConvertX, etc)','GO7007',1,NULL),(14,'Import Recorder','IMPORT',1,NULL),(10,'Freebox Input','Freebox',1,NULL),(11,'HDHomeRun Recorders','HDHOMERUN',1,NULL),(12,'CRC IP Recorders','CRC_IP',1,NULL),(13,'HD-PVR Recorders','HDPVR',1,NULL),(15,'ASI Recorder (DVEO)','ASI',1,NULL),(16,'OCUR Recorder (CableLabs)','OCUR',1,NULL),(17,'Ceton Recorder','CETON',1,NULL); +INSERT INTO `profilegroups` VALUES (1,'Software Encoders (v4l based)','V4L',1,NULL),(2,'IVTV MPEG-2 Encoders','MPEG',1,NULL),(3,'Hardware MJPEG Encoders (Matrox G200-TV, Miro DC10, etc)','MJPEG',1,NULL),(4,'Hardware HDTV','HDTV',1,NULL),(5,'Hardware DVB Encoders','DVB',1,NULL),(6,'Transcoders','TRANSCODE',1,NULL),(7,'FireWire Input','FIREWIRE',1,NULL),(8,'USB Mpeg-4 Encoder (Plextor ConvertX, etc)','GO7007',1,NULL),(14,'Import Recorder','IMPORT',1,NULL),(10,'Freebox Input','Freebox',1,NULL),(11,'HDHomeRun Recorders','HDHOMERUN',1,NULL),(12,'CRC IP Recorders','CRC_IP',1,NULL),(13,'HD-PVR Recorders','HDPVR',1,NULL),(15,'ASI Recorder (DVEO)','ASI',1,NULL),(16,'OCUR Recorder (CableLabs)','OCUR',1,NULL),(17,'Ceton Recorder','CETON',1,NULL); /*!40000 ALTER TABLE `profilegroups` ENABLE KEYS */; UNLOCK TABLES; @@ -1439,7 +1418,6 @@ CREATE TABLE `program` ( `videoprop` set('HDTV','WIDESCREEN','AVC') NOT NULL, PRIMARY KEY (`chanid`,`starttime`,`manualid`), KEY `endtime` (`endtime`), - KEY `title` (`title`), KEY `title_pronounce` (`title_pronounce`), KEY `seriesid` (`seriesid`), KEY `id_start_end` (`chanid`,`starttime`,`endtime`), @@ -1448,7 +1426,8 @@ CREATE TABLE `program` ( KEY `programid` (`programid`,`starttime`), KEY `starttime` (`starttime`), KEY `subtitle` (`subtitle`), - KEY `description` (`description`(255)) + KEY `description` (`description`(255)), + KEY `title_subtitle_start` (`title`,`subtitle`,`starttime`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1568,8 +1547,8 @@ CREATE TABLE `record` ( `dupmethod` int(11) NOT NULL DEFAULT '6', `dupin` int(11) NOT NULL DEFAULT '15', `station` varchar(20) NOT NULL DEFAULT '', - `seriesid` varchar(40) NOT NULL DEFAULT '', - `programid` varchar(40) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, `inetref` varchar(40) NOT NULL, `search` int(10) unsigned NOT NULL DEFAULT '0', `autotranscode` tinyint(1) NOT NULL DEFAULT '0', @@ -1601,7 +1580,7 @@ CREATE TABLE `record` ( KEY `maxepisodes` (`maxepisodes`), KEY `search` (`search`), KEY `type` (`type`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1610,6 +1589,7 @@ CREATE TABLE `record` ( LOCK TABLES `record` WRITE; /*!40000 ALTER TABLE `record` DISABLE KEYS */; +INSERT INTO `record` VALUES (1,11,0,'21:57:44','2012-08-11','21:57:44','2012-08-11','Default (Template)','','',0,0,'Default','Default',0,0,0,0,0,0,'Default',6,15,'','','','',0,0,1,0,0,0,0,1,-1,'00:00:00',735091,0,0,0,'Default',0,'0000-00-00 00:00:00','0000-00-00 00:00:00','0000-00-00 00:00:00','Default',100,0); /*!40000 ALTER TABLE `record` ENABLE KEYS */; UNLOCK TABLES; @@ -1638,8 +1618,8 @@ CREATE TABLE `recorded` ( `commflagged` int(10) unsigned NOT NULL DEFAULT '0', `recgroup` varchar(32) NOT NULL DEFAULT 'Default', `recordid` int(11) DEFAULT NULL, - `seriesid` varchar(40) NOT NULL DEFAULT '', - `programid` varchar(40) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, + `programid` varchar(64) DEFAULT NULL, `inetref` varchar(40) NOT NULL, `lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `filesize` bigint(20) NOT NULL DEFAULT '0', @@ -1826,12 +1806,12 @@ CREATE TABLE `recordedprogram` ( `closecaptioned` tinyint(1) NOT NULL DEFAULT '0', `partnumber` int(11) NOT NULL DEFAULT '0', `parttotal` int(11) NOT NULL DEFAULT '0', - `seriesid` varchar(40) NOT NULL DEFAULT '', + `seriesid` varchar(64) DEFAULT NULL, `originalairdate` date DEFAULT NULL, `showtype` varchar(30) NOT NULL DEFAULT '', `colorcode` varchar(20) NOT NULL DEFAULT '', `syndicatedepisodenumber` varchar(20) NOT NULL DEFAULT '', - `programid` varchar(40) NOT NULL DEFAULT '', + `programid` varchar(64) DEFAULT NULL, `manualid` int(10) unsigned NOT NULL DEFAULT '0', `generic` tinyint(1) DEFAULT '0', `listingsource` int(11) NOT NULL DEFAULT '0', @@ -1933,7 +1913,7 @@ CREATE TABLE `recordfilter` ( LOCK TABLES `recordfilter` WRITE; /*!40000 ALTER TABLE `recordfilter` DISABLE KEYS */; -INSERT INTO `recordfilter` (`filterid`, `description`, `clause`, `newruledefault`) VALUES (0,'New episode','program.previouslyshown = 0',0),(1,'Identifiable episode','program.generic = 0',0),(2,'First showing','program.first > 0',0),(3,'Prime time','HOUR(program.starttime) >= 19 AND HOUR(program.starttime) < 23',0),(4,'Commercial free','channel.commmethod = -2',0),(5,'High definition','program.hdtv > 0',0),(6,'This episode','(RECTABLE.programid <> \'\' AND program.programid = RECTABLE.programid) OR (RECTABLE.programid = \'\' AND program.subtitle = RECTABLE.subtitle AND program.description = RECTABLE.description)',0),(7,'This series','(RECTABLE.seriesid <> \'\' AND program.seriesid = RECTABLE.seriesid)',0); +INSERT INTO `recordfilter` VALUES (0,'New episode','program.previouslyshown = 0',0),(1,'Identifiable episode','program.generic = 0',0),(2,'First showing','program.first > 0',0),(3,'Prime time','HOUR(CONVERT_TZ(program.starttime, \'Etc/UTC\', \'SYSTEM\')) >= 19 AND HOUR(CONVERT_TZ(program.starttime, \'Etc/UTC\', \'SYSTEM\')) < 22',0),(4,'Commercial free','channel.commmethod = -2',0),(5,'High definition','program.hdtv > 0',0),(6,'This episode','(RECTABLE.programid <> \'\' AND program.programid = RECTABLE.programid) OR (RECTABLE.programid = \'\' AND program.subtitle = RECTABLE.subtitle AND program.description = RECTABLE.description)',0),(7,'This series','(RECTABLE.seriesid <> \'\' AND program.seriesid = RECTABLE.seriesid)',0),(8,'This time','ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), \'Etc/UTC\', \'SYSTEM\'), CONVERT_TZ(program.starttime, \'Etc/UTC\', \'SYSTEM\'))) MOD 1440 <= 10',0),(9,'This day and time','ABS(TIMESTAMPDIFF(MINUTE, CONVERT_TZ( ADDTIME(RECTABLE.startdate, RECTABLE.starttime), \'Etc/UTC\', \'SYSTEM\'), CONVERT_TZ(program.starttime, \'Etc/UTC\', \'SYSTEM\'))) MOD 10080 <= 10',0),(10,'This channel','channel.callsign = RECTABLE.station',0); /*!40000 ALTER TABLE `recordfilter` ENABLE KEYS */; UNLOCK TABLES; @@ -1961,7 +1941,7 @@ CREATE TABLE `recordingprofiles` ( LOCK TABLES `recordingprofiles` WRITE; /*!40000 ALTER TABLE `recordingprofiles` DISABLE KEYS */; -INSERT INTO `recordingprofiles` (`id`, `name`, `videocodec`, `audiocodec`, `profilegroup`) VALUES (1,'Default',NULL,NULL,1),(2,'Live TV',NULL,NULL,1),(3,'High Quality',NULL,NULL,1),(4,'Low Quality',NULL,NULL,1),(5,'Default',NULL,NULL,2),(6,'Live TV',NULL,NULL,2),(7,'High Quality',NULL,NULL,2),(8,'Low Quality',NULL,NULL,2),(9,'Default',NULL,NULL,3),(10,'Live TV',NULL,NULL,3),(11,'High Quality',NULL,NULL,3),(12,'Low Quality',NULL,NULL,3),(13,'Default',NULL,NULL,4),(14,'Live TV',NULL,NULL,4),(15,'High Quality',NULL,NULL,4),(16,'Low Quality',NULL,NULL,4),(17,'Default',NULL,NULL,5),(18,'Live TV',NULL,NULL,5),(19,'High Quality',NULL,NULL,5),(20,'Low Quality',NULL,NULL,5),(21,'RTjpeg/MPEG4',NULL,NULL,6),(22,'MPEG2',NULL,NULL,6),(23,'Default',NULL,NULL,8),(24,'Live TV',NULL,NULL,8),(25,'High Quality',NULL,NULL,8),(26,'Low Quality',NULL,NULL,8),(27,'High Quality',NULL,NULL,6),(28,'Medium Quality',NULL,NULL,6),(29,'Low Quality',NULL,NULL,6),(30,'Default',NULL,NULL,10),(31,'Live TV',NULL,NULL,10),(32,'High Quality',NULL,NULL,10),(33,'Low Quality',NULL,NULL,10),(34,'Default',NULL,NULL,11),(35,'Live TV',NULL,NULL,11),(36,'High Quality',NULL,NULL,11),(37,'Low Quality',NULL,NULL,11),(38,'Default',NULL,NULL,12),(39,'Live TV',NULL,NULL,12),(40,'High Quality',NULL,NULL,12),(41,'Low Quality',NULL,NULL,12),(42,'Default',NULL,NULL,7),(43,'Live TV',NULL,NULL,7),(44,'High Quality',NULL,NULL,7),(45,'Low Quality',NULL,NULL,7),(46,'Default',NULL,NULL,9),(47,'Live TV',NULL,NULL,9),(48,'High Quality',NULL,NULL,9),(49,'Low Quality',NULL,NULL,9),(50,'Default',NULL,NULL,13),(51,'Live TV',NULL,NULL,13),(52,'High Quality',NULL,NULL,13),(53,'Low Quality',NULL,NULL,13),(54,'Default',NULL,NULL,14),(55,'Live TV',NULL,NULL,14),(56,'High Quality',NULL,NULL,14),(57,'Low Quality',NULL,NULL,14),(58,'Default',NULL,NULL,15),(59,'Live TV',NULL,NULL,15),(60,'High Quality',NULL,NULL,15),(61,'Low Quality',NULL,NULL,15),(62,'Default',NULL,NULL,16),(63,'Live TV',NULL,NULL,16),(64,'High Quality',NULL,NULL,16),(65,'Low Quality',NULL,NULL,16),(66,'Default',NULL,NULL,17),(67,'Live TV',NULL,NULL,17),(68,'High Quality',NULL,NULL,17),(69,'Low Quality',NULL,NULL,17); +INSERT INTO `recordingprofiles` VALUES (1,'Default',NULL,NULL,1),(2,'Live TV',NULL,NULL,1),(3,'High Quality',NULL,NULL,1),(4,'Low Quality',NULL,NULL,1),(5,'Default',NULL,NULL,2),(6,'Live TV',NULL,NULL,2),(7,'High Quality',NULL,NULL,2),(8,'Low Quality',NULL,NULL,2),(9,'Default',NULL,NULL,3),(10,'Live TV',NULL,NULL,3),(11,'High Quality',NULL,NULL,3),(12,'Low Quality',NULL,NULL,3),(13,'Default',NULL,NULL,4),(14,'Live TV',NULL,NULL,4),(15,'High Quality',NULL,NULL,4),(16,'Low Quality',NULL,NULL,4),(17,'Default',NULL,NULL,5),(18,'Live TV',NULL,NULL,5),(19,'High Quality',NULL,NULL,5),(20,'Low Quality',NULL,NULL,5),(21,'RTjpeg/MPEG4',NULL,NULL,6),(22,'MPEG2',NULL,NULL,6),(23,'Default',NULL,NULL,8),(24,'Live TV',NULL,NULL,8),(25,'High Quality',NULL,NULL,8),(26,'Low Quality',NULL,NULL,8),(27,'High Quality',NULL,NULL,6),(28,'Medium Quality',NULL,NULL,6),(29,'Low Quality',NULL,NULL,6),(30,'Default',NULL,NULL,10),(31,'Live TV',NULL,NULL,10),(32,'High Quality',NULL,NULL,10),(33,'Low Quality',NULL,NULL,10),(34,'Default',NULL,NULL,11),(35,'Live TV',NULL,NULL,11),(36,'High Quality',NULL,NULL,11),(37,'Low Quality',NULL,NULL,11),(38,'Default',NULL,NULL,12),(39,'Live TV',NULL,NULL,12),(40,'High Quality',NULL,NULL,12),(41,'Low Quality',NULL,NULL,12),(42,'Default',NULL,NULL,7),(43,'Live TV',NULL,NULL,7),(44,'High Quality',NULL,NULL,7),(45,'Low Quality',NULL,NULL,7),(46,'Default',NULL,NULL,9),(47,'Live TV',NULL,NULL,9),(48,'High Quality',NULL,NULL,9),(49,'Low Quality',NULL,NULL,9),(50,'Default',NULL,NULL,13),(51,'Live TV',NULL,NULL,13),(52,'High Quality',NULL,NULL,13),(53,'Low Quality',NULL,NULL,13),(54,'Default',NULL,NULL,14),(55,'Live TV',NULL,NULL,14),(56,'High Quality',NULL,NULL,14),(57,'Low Quality',NULL,NULL,14),(58,'Default',NULL,NULL,15),(59,'Live TV',NULL,NULL,15),(60,'High Quality',NULL,NULL,15),(61,'Low Quality',NULL,NULL,15),(62,'Default',NULL,NULL,16),(63,'Live TV',NULL,NULL,16),(64,'High Quality',NULL,NULL,16),(65,'Low Quality',NULL,NULL,16),(66,'Default',NULL,NULL,17),(67,'Live TV',NULL,NULL,17),(68,'High Quality',NULL,NULL,17),(69,'Low Quality',NULL,NULL,17); /*!40000 ALTER TABLE `recordingprofiles` ENABLE KEYS */; UNLOCK TABLES; @@ -1981,8 +1961,10 @@ CREATE TABLE `recordmatch` ( `recduplicate` tinyint(1) DEFAULT NULL, `findduplicate` tinyint(1) DEFAULT NULL, `oldrecstatus` int(11) DEFAULT NULL, + `findid` int(11) NOT NULL DEFAULT '0', UNIQUE KEY `recordid` (`recordid`,`chanid`,`starttime`), - KEY `chanid` (`chanid`,`starttime`,`manualid`) + KEY `chanid` (`chanid`,`starttime`,`manualid`), + KEY `recordid_2` (`recordid`,`findid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1996,24 +1978,54 @@ LOCK TABLES `recordmatch` WRITE; UNLOCK TABLES; -- --- Table structure for table `schemalock` +-- Table structure for table `scannerfile` +-- + +DROP TABLE IF EXISTS `scannerfile`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `scannerfile` ( + `fileid` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `filesize` bigint(20) unsigned NOT NULL DEFAULT '0', + `filehash` varchar(64) NOT NULL DEFAULT '', + `added` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP, + PRIMARY KEY (`fileid`), + UNIQUE KEY `filehash` (`filehash`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `scannerfile` +-- + +LOCK TABLES `scannerfile` WRITE; +/*!40000 ALTER TABLE `scannerfile` DISABLE KEYS */; +/*!40000 ALTER TABLE `scannerfile` ENABLE KEYS */; +UNLOCK TABLES; + +-- +-- Table structure for table `scannerpath` -- -DROP TABLE IF EXISTS `schemalock`; +DROP TABLE IF EXISTS `scannerpath`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `schemalock` ( - `schemalock` int(1) DEFAULT NULL +CREATE TABLE `scannerpath` ( + `fileid` bigint(20) unsigned NOT NULL, + `hostname` varchar(64) NOT NULL DEFAULT 'localhost', + `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', + `filename` varchar(255) NOT NULL DEFAULT '', + PRIMARY KEY (`fileid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `schemalock` +-- Dumping data for table `scannerpath` -- -LOCK TABLES `schemalock` WRITE; -/*!40000 ALTER TABLE `schemalock` DISABLE KEYS */; -/*!40000 ALTER TABLE `schemalock` ENABLE KEYS */; +LOCK TABLES `scannerpath` WRITE; +/*!40000 ALTER TABLE `scannerpath` DISABLE KEYS */; +/*!40000 ALTER TABLE `scannerpath` ENABLE KEYS */; UNLOCK TABLES; -- @@ -2037,7 +2049,7 @@ CREATE TABLE `settings` ( LOCK TABLES `settings` WRITE; /*!40000 ALTER TABLE `settings` DISABLE KEYS */; -INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES ('mythfilldatabaseLastRunStart','',NULL),('mythfilldatabaseLastRunEnd','',NULL),('mythfilldatabaseLastRunStatus','',NULL),('DataDirectMessage','',NULL),('HaveRepeats','0',NULL),('DBSchemaVer','1299',NULL),('DefaultTranscoder','0',NULL),('FreqTable','us-bcast',NULL),('ISO639Language0','eng',NULL),('ISO639Language1','eng',NULL),('TVFormat','NTSC',NULL),('VbiFormat','NTSC Closed Caption',NULL),('Country','US','apheleia'),('DateFormat','ddd MMM d yyyy','apheleia'),('Language','en_US','apheleia'),('MythArchiveDateFormat','%a %b %d %Y','apheleia'),('MythArchiveTimeFormat','%I:%M %p','apheleia'),('MythArchiveVideoFormat','NTSC','apheleia'),('ShortDateFormat','M/d','apheleia'),('TimeFormat','h:mm AP','apheleia'),('BackendServerIP','127.0.0.1','apheleia'),('BackendServerIP6','::1','apheleia'),('BackendServerPort','6543','apheleia'),('BackendStatusPort','6544','apheleia'),('MasterServerIP','127.0.0.1',NULL),('MasterServerPort','6543',NULL),('TimeOffset','None',NULL),('MasterBackendOverride','1',NULL),('DeletesFollowLinks','0',NULL),('TruncateDeletesSlowly','0','apheleia'),('HDRingbufferSize','9400',NULL),('StorageScheduler','BalancedFreeSpace',NULL),('UPnP/WMPSource','0',NULL),('DisableAutomaticBackup','0',NULL),('DisableFirewireReset','0','apheleia'),('EITTransportTimeout','5',NULL),('EITCrawIdleStart','60',NULL),('blockSDWUwithoutClient','1',NULL),('idleWaitForRecordingTime','15',NULL),('StartupSecsBeforeRecording','120',NULL),('WakeupTimeFormat','hh:mm yyyy-MM-dd',NULL),('ServerHaltCommand','sudo /sbin/halt -p',NULL),('WOLbackendConnectRetry','5',NULL),('BackendStopCommand','killall mythbackend',NULL),('BackendStartCommand','mythbackend',NULL),('JobQueueMaxSimultaneousJobs','1','apheleia'),('JobQueueCheckFrequency','60','apheleia'),('JobQueueWindowStart','00:00','apheleia'),('JobQueueWindowEnd','23:59','apheleia'),('JobQueueCPU','0','apheleia'),('JobAllowMetadata','1','apheleia'),('JobAllowCommFlag','1','apheleia'),('JobAllowTranscode','1','apheleia'),('JobAllowUserJob1','0','apheleia'),('JobAllowUserJob2','0','apheleia'),('JobAllowUserJob3','0','apheleia'),('JobAllowUserJob4','0','apheleia'),('JobsRunOnRecordHost','0',NULL),('AutoCommflagWhileRecording','0',NULL),('JobQueueCommFlagCommand','mythcommflag',NULL),('JobQueueTranscodeCommand','mythtranscode',NULL),('AutoTranscodeBeforeAutoCommflag','0',NULL),('SaveTranscoding','0',NULL),('UserJobDesc1','User Job #1',NULL),('UserJobDesc2','User Job #2',NULL),('UserJobDesc3','User Job #3',NULL),('UserJobDesc4','User Job #4',NULL),('MythFillEnabled','1',NULL),('MythFillDatabasePath','mythfilldatabase',NULL),('MythFillMaxHour','23',NULL),('MythFillGrabberSuggestsTime','1',NULL),('WOLbackendReconnectWaitTime','5',NULL); +INSERT INTO `settings` VALUES ('mythfilldatabaseLastRunStart','',NULL),('mythfilldatabaseLastRunEnd','',NULL),('mythfilldatabaseLastRunStatus','',NULL),('DataDirectMessage','',NULL),('HaveRepeats','0',NULL),('DBSchemaVer','1317',NULL),('DefaultTranscoder','0',NULL),('WebBrowserZoomLevel','1','apheleia'),('Language','en_US',NULL),('Country','US',NULL),('FreqTable','us-bcast',NULL),('ISO639Language0','eng',NULL),('ISO639Language1','eng',NULL),('TVFormat','NTSC',NULL),('VbiFormat','NTSC Closed Caption',NULL),('DateFormat','ddd MMM d yyyy','apheleia'),('MythArchiveDateFormat','%a %b %d %Y','apheleia'),('MythArchiveTimeFormat','%I:%M %p','apheleia'),('MythArchiveVideoFormat','NTSC','apheleia'),('ShortDateFormat','M/d','apheleia'),('TimeFormat','h:mm AP','apheleia'),('BackupDBLastRunStart','2013-11-25 09:32:42',NULL),('BackupDBLastRunEnd','2013-11-25 09:32:43',NULL),('HardwareProfileEnabled','0',NULL),('BackendServerIP','127.0.0.1','apheleia'),('BackendServerIP6','::1','apheleia'),('AllowLinkLocal','1','apheleia'),('BackendServerPort','6543','apheleia'),('BackendStatusPort','6544','apheleia'),('MasterServerIP','127.0.0.1',NULL),('MasterServerPort','6543',NULL),('MasterBackendOverride','1',NULL),('DeletesFollowLinks','0',NULL),('TruncateDeletesSlowly','0','apheleia'),('HDRingbufferSize','9400',NULL),('StorageScheduler','BalancedFreeSpace',NULL),('UPnP/WMPSource','0',NULL),('DisableAutomaticBackup','0',NULL),('DisableFirewireReset','0','apheleia'),('EITTransportTimeout','5',NULL),('EITCrawIdleStart','60',NULL),('blockSDWUwithoutClient','1',NULL),('idleWaitForRecordingTime','15',NULL),('StartupSecsBeforeRecording','120',NULL),('WakeupTimeFormat','hh:mm yyyy-MM-dd',NULL),('ServerHaltCommand','sudo /sbin/halt -p',NULL),('WOLbackendConnectRetry','5',NULL),('BackendStopCommand','killall mythbackend',NULL),('BackendStartCommand','mythbackend',NULL),('JobQueueMaxSimultaneousJobs','1','apheleia'),('JobQueueCheckFrequency','60','apheleia'),('JobQueueWindowStart','00:00','apheleia'),('JobQueueWindowEnd','23:59','apheleia'),('JobQueueCPU','0','apheleia'),('JobAllowMetadata','1','apheleia'),('JobAllowCommFlag','1','apheleia'),('JobAllowTranscode','1','apheleia'),('JobAllowUserJob1','0','apheleia'),('JobAllowUserJob2','0','apheleia'),('JobAllowUserJob3','0','apheleia'),('JobAllowUserJob4','0','apheleia'),('JobsRunOnRecordHost','0',NULL),('AutoCommflagWhileRecording','0',NULL),('JobQueueCommFlagCommand','mythcommflag',NULL),('JobQueueTranscodeCommand','mythtranscode',NULL),('AutoTranscodeBeforeAutoCommflag','0',NULL),('SaveTranscoding','0',NULL),('UserJobDesc1','User Job #1',NULL),('UserJobDesc2','User Job #2',NULL),('UserJobDesc3','User Job #3',NULL),('UserJobDesc4','User Job #4',NULL),('MythFillEnabled','1',NULL),('MythFillDatabasePath','mythfilldatabase',NULL),('MythFillMaxHour','23',NULL),('MythFillGrabberSuggestsTime','1',NULL); /*!40000 ALTER TABLE `settings` ENABLE KEYS */; UNLOCK TABLES; @@ -2423,6 +2435,30 @@ LOCK TABLES `videometadatagenre` WRITE; UNLOCK TABLES; -- +-- Table structure for table `videopart` +-- + +DROP TABLE IF EXISTS `videopart`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videopart` ( + `fileid` bigint(20) unsigned NOT NULL, + `videoid` int(10) unsigned NOT NULL, + `order` smallint(5) unsigned NOT NULL DEFAULT '1', + PRIMARY KEY (`videoid`,`order`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `videopart` +-- + +LOCK TABLES `videopart` WRITE; +/*!40000 ALTER TABLE `videopart` DISABLE KEYS */; +/*!40000 ALTER TABLE `videopart` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `videopathinfo` -- @@ -2503,7 +2539,7 @@ CREATE TABLE `videotypes` ( LOCK TABLES `videotypes` WRITE; /*!40000 ALTER TABLE `videotypes` DISABLE KEYS */; -INSERT INTO `videotypes` (`intid`, `extension`, `playcommand`, `f_ignore`, `use_default`) VALUES (1,'txt','',1,0),(2,'log','',1,0),(3,'mpg','Internal',0,0),(4,'avi','',0,1),(5,'vob','Internal',0,0),(6,'mpeg','Internal',0,0),(8,'iso','Internal',0,0),(9,'img','Internal',0,0),(10,'mkv','Internal',0,0),(11,'mp4','Internal',0,0),(12,'m2ts','Internal',0,0),(13,'evo','Internal',0,0),(14,'divx','Internal',0,0),(15,'mov','Internal',0,0),(16,'qt','Internal',0,0),(17,'wmv','Internal',0,0),(18,'3gp','Internal',0,0),(19,'asf','Internal',0,0),(20,'ogg','Internal',0,0),(21,'ogm','Internal',0,0),(22,'flv','Internal',0,0),(23,'ogv','Internal',0,0),(25,'nut','Internal',0,0),(26,'mxf','Internal',0,0),(27,'m4v','Internal',0,0),(28,'rm','Internal',0,0),(29,'ts','Internal',0,0),(30,'swf','Internal',0,0),(31,'f4v','Internal',0,0),(32,'nuv','Internal',0,0); +INSERT INTO `videotypes` VALUES (1,'txt','',1,0),(2,'log','',1,0),(3,'mpg','Internal',0,0),(4,'avi','',0,1),(5,'vob','Internal',0,0),(6,'mpeg','Internal',0,0),(8,'iso','Internal',0,0),(9,'img','Internal',0,0),(10,'mkv','Internal',0,0),(11,'mp4','Internal',0,0),(12,'m2ts','Internal',0,0),(13,'evo','Internal',0,0),(14,'divx','Internal',0,0),(15,'mov','Internal',0,0),(16,'qt','Internal',0,0),(17,'wmv','Internal',0,0),(18,'3gp','Internal',0,0),(19,'asf','Internal',0,0),(20,'ogg','Internal',0,0),(21,'ogm','Internal',0,0),(22,'flv','Internal',0,0),(23,'ogv','Internal',0,0),(25,'nut','Internal',0,0),(26,'mxf','Internal',0,0),(27,'m4v','Internal',0,0),(28,'rm','Internal',0,0),(29,'ts','Internal',0,0),(30,'swf','Internal',0,0),(31,'f4v','Internal',0,0),(32,'nuv','Internal',0,0); /*!40000 ALTER TABLE `videotypes` ENABLE KEYS */; UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; @@ -2516,4 +2552,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2012-08-22 15:37:35 +-- Dump completed on 2013-11-25 9:33:39 diff --git a/abs/core/mythdb-initial/mc.sql.24 b/abs/core/mythdb-initial/mc.sql.R8 index 54bf0ec..d3b1679 100644 --- a/abs/core/mythdb-initial/mc.sql.24 +++ b/abs/core/mythdb-initial/mc.sql.R8 @@ -1,8 +1,8 @@ --- MySQL dump 10.13 Distrib 5.1.52, for pc-linux-gnu (i686) +-- MySQL dump 10.13 Distrib 5.1.59, for unknown-linux-gnu (x86_64) -- -- Host: localhost Database: mythconverg -- ------------------------------------------------------ --- Server version 5.1.52 +-- Server version 5.1.59 /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */; /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */; @@ -16,46 +16,6 @@ /*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */; -- --- Table structure for table `archiveitems` --- - -DROP TABLE IF EXISTS `archiveitems`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `archiveitems` ( - `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `type` set('Recording','Video','File') CHARACTER SET latin1 DEFAULT NULL, - `title` varchar(128) DEFAULT NULL, - `subtitle` varchar(128) DEFAULT NULL, - `description` text, - `startdate` varchar(30) DEFAULT NULL, - `starttime` varchar(30) DEFAULT NULL, - `size` bigint(20) unsigned NOT NULL, - `filename` text NOT NULL, - `hascutlist` tinyint(1) NOT NULL DEFAULT '0', - `cutlist` text, - `duration` int(10) unsigned NOT NULL DEFAULT '0', - `cutduration` int(10) unsigned NOT NULL DEFAULT '0', - `videowidth` int(10) unsigned NOT NULL DEFAULT '0', - `videoheight` int(10) unsigned NOT NULL DEFAULT '0', - `filecodec` varchar(50) NOT NULL DEFAULT '', - `videocodec` varchar(50) NOT NULL DEFAULT '', - `encoderprofile` varchar(50) NOT NULL DEFAULT 'NONE', - PRIMARY KEY (`intid`), - KEY `title` (`title`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `archiveitems` --- - -LOCK TABLES `archiveitems` WRITE; -/*!40000 ALTER TABLE `archiveitems` DISABLE KEYS */; -/*!40000 ALTER TABLE `archiveitems` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `callsignnetworkmap` -- @@ -140,12 +100,16 @@ CREATE TABLE `cardinput` ( `sourceid` int(10) unsigned NOT NULL DEFAULT '0', `inputname` varchar(32) NOT NULL DEFAULT '', `externalcommand` varchar(128) DEFAULT NULL, + `changer_device` varchar(128) DEFAULT NULL, + `changer_model` varchar(128) DEFAULT NULL, `tunechan` varchar(10) DEFAULT NULL, `startchan` varchar(10) DEFAULT NULL, `displayname` varchar(64) NOT NULL DEFAULT '', `dishnet_eit` tinyint(1) NOT NULL DEFAULT '0', `recpriority` int(11) NOT NULL DEFAULT '0', `quicktune` tinyint(4) NOT NULL DEFAULT '0', + `schedorder` int(10) unsigned NOT NULL DEFAULT '0', + `livetvorder` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`cardinputid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -176,7 +140,7 @@ CREATE TABLE `channel` ( `icon` varchar(255) NOT NULL DEFAULT 'none', `finetune` int(11) DEFAULT NULL, `videofilters` varchar(255) NOT NULL DEFAULT '', - `xmltvid` varchar(64) NOT NULL DEFAULT '', + `xmltvid` varchar(255) NOT NULL DEFAULT '', `recpriority` int(10) NOT NULL DEFAULT '0', `contrast` int(11) DEFAULT '32768', `brightness` int(11) DEFAULT '32768', @@ -418,7 +382,7 @@ CREATE TABLE `credits` ( `person` mediumint(8) unsigned NOT NULL DEFAULT '0', `chanid` int(10) unsigned NOT NULL DEFAULT '0', `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') CHARACTER SET latin1 NOT NULL DEFAULT '', + `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') NOT NULL DEFAULT '', UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`), KEY `person` (`person`,`role`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -534,7 +498,7 @@ CREATE TABLE `displayprofilegroups` ( `profilegroupid` int(10) unsigned NOT NULL AUTO_INCREMENT, PRIMARY KEY (`name`,`hostname`), UNIQUE KEY `profilegroupid` (`profilegroupid`) -) ENGINE=MyISAM AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -543,7 +507,6 @@ CREATE TABLE `displayprofilegroups` ( LOCK TABLES `displayprofilegroups` WRITE; /*!40000 ALTER TABLE `displayprofilegroups` DISABLE KEYS */; -INSERT INTO `displayprofilegroups` (`name`, `hostname`, `profilegroupid`) VALUES ('CPU++','larch5',1),('CPU+','larch5',2),('CPU--','larch5',3),('High Quality','larch5',4),('Normal','larch5',5),('Slim','larch5',6),('VDPAU High Quality','larch5',7),('VDPAU Normal','larch5',8),('VDPAU Slim','larch5',9); /*!40000 ALTER TABLE `displayprofilegroups` ENABLE KEYS */; UNLOCK TABLES; @@ -562,7 +525,7 @@ CREATE TABLE `displayprofiles` ( KEY `profilegroupid` (`profilegroupid`), KEY `profileid` (`profileid`,`value`), KEY `profileid_2` (`profileid`) -) ENGINE=MyISAM AUTO_INCREMENT=29 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -571,7 +534,6 @@ CREATE TABLE `displayprofiles` ( LOCK TABLES `displayprofiles` WRITE; /*!40000 ALTER TABLE `displayprofiles` DISABLE KEYS */; -INSERT INTO `displayprofiles` (`profilegroupid`, `profileid`, `value`, `data`) VALUES (1,1,'pref_priority','1'),(1,1,'pref_cmp0','> 0 0'),(1,1,'pref_decoder','ffmpeg'),(1,1,'pref_max_cpus','1'),(1,1,'pref_videorenderer','xv-blit'),(1,1,'pref_osdrenderer','softblend'),(1,1,'pref_osdfade','1'),(1,1,'pref_deint0','bobdeint'),(1,1,'pref_deint1','linearblend'),(1,1,'pref_filters',''),(1,2,'pref_priority','2'),(1,2,'pref_cmp0','> 0 0'),(1,2,'pref_decoder','ffmpeg'),(1,2,'pref_max_cpus','1'),(1,2,'pref_videorenderer','quartz-blit'),(1,2,'pref_osdrenderer','softblend'),(1,2,'pref_osdfade','1'),(1,2,'pref_deint0','linearblend'),(1,2,'pref_deint1','linearblend'),(1,2,'pref_filters',''),(2,3,'pref_priority','1'),(2,3,'pref_cmp0','<= 720 576'),(2,3,'pref_cmp1','> 0 0'),(2,3,'pref_decoder','ffmpeg'),(2,3,'pref_max_cpus','1'),(2,3,'pref_videorenderer','xv-blit'),(2,3,'pref_osdrenderer','softblend'),(2,3,'pref_osdfade','1'),(2,3,'pref_deint0','bobdeint'),(2,3,'pref_deint1','linearblend'),(2,3,'pref_filters',''),(2,4,'pref_priority','2'),(2,4,'pref_cmp0','<= 1280 720'),(2,4,'pref_cmp1','> 720 576'),(2,4,'pref_decoder','xvmc'),(2,4,'pref_max_cpus','1'),(2,4,'pref_videorenderer','xvmc-blit'),(2,4,'pref_osdrenderer','opengl'),(2,4,'pref_osdfade','1'),(2,4,'pref_deint0','bobdeint'),(2,4,'pref_deint1','onefield'),(2,4,'pref_filters',''),(2,5,'pref_priority','3'),(2,5,'pref_cmp0','<= 1280 720'),(2,5,'pref_cmp1','> 720 576'),(2,5,'pref_decoder','libmpeg2'),(2,5,'pref_max_cpus','1'),(2,5,'pref_videorenderer','xv-blit'),(2,5,'pref_osdrenderer','softblend'),(2,5,'pref_osdfade','1'),(2,5,'pref_deint0','bobdeint'),(2,5,'pref_deint1','onefield'),(2,5,'pref_filters',''),(2,6,'pref_priority','4'),(2,6,'pref_cmp0','> 0 0'),(2,6,'pref_decoder','xvmc'),(2,6,'pref_max_cpus','1'),(2,6,'pref_videorenderer','xvmc-blit'),(2,6,'pref_osdrenderer','ia44blend'),(2,6,'pref_osdfade','0'),(2,6,'pref_deint0','bobdeint'),(2,6,'pref_deint1','onefield'),(2,6,'pref_filters',''),(2,7,'pref_priority','5'),(2,7,'pref_cmp0','> 0 0'),(2,7,'pref_decoder','libmpeg2'),(2,7,'pref_max_cpus','1'),(2,7,'pref_videorenderer','xv-blit'),(2,7,'pref_osdrenderer','chromakey'),(2,7,'pref_osdfade','0'),(2,7,'pref_deint0','bobdeint'),(2,7,'pref_deint1','onefield'),(2,7,'pref_filters',''),(3,8,'pref_priority','1'),(3,8,'pref_cmp0','<= 720 576'),(3,8,'pref_cmp1','> 0 0'),(3,8,'pref_decoder','ivtv'),(3,8,'pref_max_cpus','1'),(3,8,'pref_videorenderer','ivtv'),(3,8,'pref_osdrenderer','ivtv'),(3,8,'pref_osdfade','1'),(3,8,'pref_deint0','none'),(3,8,'pref_deint1','none'),(3,8,'pref_filters',''),(3,9,'pref_priority','2'),(3,9,'pref_cmp0','<= 720 576'),(3,9,'pref_cmp1','> 0 0'),(3,9,'pref_decoder','xvmc'),(3,9,'pref_max_cpus','1'),(3,9,'pref_videorenderer','xvmc-blit'),(3,9,'pref_osdrenderer','ia44blend'),(3,9,'pref_osdfade','0'),(3,9,'pref_deint0','bobdeint'),(3,9,'pref_deint1','onefield'),(3,9,'pref_filters',''),(3,10,'pref_priority','3'),(3,10,'pref_cmp0','<= 1280 720'),(3,10,'pref_cmp1','> 720 576'),(3,10,'pref_decoder','xvmc'),(3,10,'pref_max_cpus','1'),(3,10,'pref_videorenderer','xvmc-blit'),(3,10,'pref_osdrenderer','ia44blend'),(3,10,'pref_osdfade','0'),(3,10,'pref_deint0','bobdeint'),(3,10,'pref_deint1','onefield'),(3,10,'pref_filters',''),(3,11,'pref_priority','4'),(3,11,'pref_cmp0','> 0 0'),(3,11,'pref_decoder','xvmc'),(3,11,'pref_max_cpus','1'),(3,11,'pref_videorenderer','xvmc-blit'),(3,11,'pref_osdrenderer','ia44blend'),(3,11,'pref_osdfade','0'),(3,11,'pref_deint0','bobdeint'),(3,11,'pref_deint1','onefield'),(3,11,'pref_filters',''),(3,12,'pref_priority','5'),(3,12,'pref_cmp0','> 0 0'),(3,12,'pref_decoder','libmpeg2'),(3,12,'pref_max_cpus','1'),(3,12,'pref_videorenderer','xv-blit'),(3,12,'pref_osdrenderer','chromakey'),(3,12,'pref_osdfade','0'),(3,12,'pref_deint0','none'),(3,12,'pref_deint1','none'),(3,12,'pref_filters',''),(4,13,'pref_priority','1'),(4,13,'pref_cmp0','>= 1920 1080'),(4,13,'pref_decoder','ffmpeg'),(4,13,'pref_max_cpus','2'),(4,13,'pref_videorenderer','xv-blit'),(4,13,'pref_osdrenderer','softblend'),(4,13,'pref_osdfade','1'),(4,13,'pref_deint0','linearblend'),(4,13,'pref_deint1','linearblend'),(4,13,'pref_filters',''),(4,14,'pref_priority','2'),(4,14,'pref_cmp0','> 0 0'),(4,14,'pref_decoder','ffmpeg'),(4,14,'pref_max_cpus','1'),(4,14,'pref_videorenderer','xv-blit'),(4,14,'pref_osdrenderer','softblend'),(4,14,'pref_osdfade','1'),(4,14,'pref_deint0','yadifdoubleprocessdeint'),(4,14,'pref_deint1','yadifdeint'),(4,14,'pref_filters',''),(4,15,'pref_priority','3'),(4,15,'pref_cmp0','>= 1920 1080'),(4,15,'pref_decoder','ffmpeg'),(4,15,'pref_max_cpus','2'),(4,15,'pref_videorenderer','quartz-blit'),(4,15,'pref_osdrenderer','softblend'),(4,15,'pref_osdfade','1'),(4,15,'pref_deint0','linearblend'),(4,15,'pref_deint1','linearblend'),(4,15,'pref_filters',''),(4,16,'pref_priority','4'),(4,16,'pref_cmp0','> 0 0'),(4,16,'pref_decoder','ffmpeg'),(4,16,'pref_max_cpus','1'),(4,16,'pref_videorenderer','quartz-blit'),(4,16,'pref_osdrenderer','softblend'),(4,16,'pref_osdfade','1'),(4,16,'pref_deint0','yadifdoubleprocessdeint'),(4,16,'pref_deint1','yadifdeint'),(4,16,'pref_filters',''),(5,17,'pref_priority','1'),(5,17,'pref_cmp0','>= 1280 720'),(5,17,'pref_decoder','ffmpeg'),(5,17,'pref_max_cpus','1'),(5,17,'pref_videorenderer','xv-blit'),(5,17,'pref_osdrenderer','softblend'),(5,17,'pref_osdfade','0'),(5,17,'pref_deint0','linearblend'),(5,17,'pref_deint1','linearblend'),(5,17,'pref_filters',''),(5,18,'pref_priority','2'),(5,18,'pref_cmp0','> 0 0'),(5,18,'pref_decoder','ffmpeg'),(5,18,'pref_max_cpus','1'),(5,18,'pref_videorenderer','xv-blit'),(5,18,'pref_osdrenderer','softblend'),(5,18,'pref_osdfade','1'),(5,18,'pref_deint0','greedyhdoubleprocessdeint'),(5,18,'pref_deint1','kerneldeint'),(5,18,'pref_filters',''),(5,19,'pref_priority','3'),(5,19,'pref_cmp0','>= 1280 720'),(5,19,'pref_decoder','ffmpeg'),(5,19,'pref_max_cpus','1'),(5,19,'pref_videorenderer','quartz-blit'),(5,19,'pref_osdrenderer','softblend'),(5,19,'pref_osdfade','0'),(5,19,'pref_deint0','linearblend'),(5,19,'pref_deint1','linearblend'),(5,19,'pref_filters',''),(5,20,'pref_priority','4'),(5,20,'pref_cmp0','> 0 0'),(5,20,'pref_decoder','ffmpeg'),(5,20,'pref_max_cpus','1'),(5,20,'pref_videorenderer','quartz-blit'),(5,20,'pref_osdrenderer','softblend'),(5,20,'pref_osdfade','1'),(5,20,'pref_deint0','greedyhdoubleprocessdeint'),(5,20,'pref_deint1','kerneldeint'),(5,20,'pref_filters',''),(6,21,'pref_priority','1'),(6,21,'pref_cmp0','>= 1280 720'),(6,21,'pref_decoder','ffmpeg'),(6,21,'pref_max_cpus','1'),(6,21,'pref_videorenderer','xv-blit'),(6,21,'pref_osdrenderer','softblend'),(6,21,'pref_osdfade','0'),(6,21,'pref_deint0','onefield'),(6,21,'pref_deint1','onefield'),(6,21,'pref_filters',''),(6,22,'pref_priority','2'),(6,22,'pref_cmp0','> 0 0'),(6,22,'pref_decoder','ffmpeg'),(6,22,'pref_max_cpus','1'),(6,22,'pref_videorenderer','xv-blit'),(6,22,'pref_osdrenderer','softblend'),(6,22,'pref_osdfade','1'),(6,22,'pref_deint0','linearblend'),(6,22,'pref_deint1','linearblend'),(6,22,'pref_filters',''),(6,23,'pref_priority','3'),(6,23,'pref_cmp0','>= 1280 720'),(6,23,'pref_decoder','ffmpeg'),(6,23,'pref_max_cpus','1'),(6,23,'pref_videorenderer','quartz-blit'),(6,23,'pref_osdrenderer','softblend'),(6,23,'pref_osdfade','0'),(6,23,'pref_deint0','onefield'),(6,23,'pref_deint1','onefield'),(6,23,'pref_filters',''),(6,24,'pref_priority','4'),(6,24,'pref_cmp0','> 0 0'),(6,24,'pref_decoder','ffmpeg'),(6,24,'pref_max_cpus','1'),(6,24,'pref_videorenderer','quartz-blit'),(6,24,'pref_osdrenderer','softblend'),(6,24,'pref_osdfade','1'),(6,24,'pref_deint0','linearblend'),(6,24,'pref_deint1','linearblend'),(6,24,'pref_filters',''),(7,25,'pref_priority','1'),(7,25,'pref_cmp0','> 0 0'),(7,25,'pref_decoder','vdpau'),(7,25,'pref_max_cpus','1'),(7,25,'pref_videorenderer','vdpau'),(7,25,'pref_osdrenderer','vdpau'),(7,25,'pref_osdfade','1'),(7,25,'pref_deint0','vdpauadvanceddoublerate'),(7,25,'pref_deint1','vdpauadvanced'),(7,25,'pref_filters',''),(8,26,'pref_priority','1'),(8,26,'pref_cmp0','>= 0 720'),(8,26,'pref_decoder','vdpau'),(8,26,'pref_max_cpus','1'),(8,26,'pref_videorenderer','vdpau'),(8,26,'pref_osdrenderer','vdpau'),(8,26,'pref_osdfade','1'),(8,26,'pref_deint0','vdpaubasicdoublerate'),(8,26,'pref_deint1','vdpaubasic'),(8,26,'pref_filters',''),(8,27,'pref_priority','2'),(8,27,'pref_cmp0','> 0 0'),(8,27,'pref_decoder','vdpau'),(8,27,'pref_max_cpus','1'),(8,27,'pref_videorenderer','vdpau'),(8,27,'pref_osdrenderer','vdpau'),(8,27,'pref_osdfade','1'),(8,27,'pref_deint0','vdpauadvanceddoublerate'),(8,27,'pref_deint1','vdpauadvanced'),(8,27,'pref_filters',''),(9,28,'pref_priority','1'),(9,28,'pref_cmp0','> 0 0'),(9,28,'pref_decoder','vdpau'),(9,28,'pref_max_cpus','1'),(9,28,'pref_videorenderer','vdpau'),(9,28,'pref_osdrenderer','vdpau'),(9,28,'pref_osdfade','0'),(9,28,'pref_deint0','vdpaubobdeint'),(9,28,'pref_deint1','vdpauonefield'),(9,28,'pref_filters','vdpauskipchroma'); /*!40000 ALTER TABLE `displayprofiles` ENABLE KEYS */; UNLOCK TABLES; @@ -804,104 +766,6 @@ LOCK TABLES `filemarkup` WRITE; UNLOCK TABLES; -- --- Table structure for table `gallerymetadata` --- - -DROP TABLE IF EXISTS `gallerymetadata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gallerymetadata` ( - `image` varchar(255) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL, - `angle` int(11) NOT NULL, - PRIMARY KEY (`image`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `gallerymetadata` --- - -LOCK TABLES `gallerymetadata` WRITE; -/*!40000 ALTER TABLE `gallerymetadata` DISABLE KEYS */; -/*!40000 ALTER TABLE `gallerymetadata` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `gamemetadata` --- - -DROP TABLE IF EXISTS `gamemetadata`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gamemetadata` ( - `system` varchar(128) NOT NULL DEFAULT '', - `romname` varchar(128) NOT NULL DEFAULT '', - `gamename` varchar(128) NOT NULL DEFAULT '', - `genre` varchar(128) NOT NULL DEFAULT '', - `year` varchar(10) NOT NULL DEFAULT '', - `publisher` varchar(128) NOT NULL DEFAULT '', - `favorite` tinyint(1) DEFAULT NULL, - `rompath` varchar(255) NOT NULL DEFAULT '', - `screenshot` varchar(255) NOT NULL, - `fanart` varchar(255) NOT NULL, - `plot` text NOT NULL, - `boxart` varchar(255) NOT NULL, - `gametype` varchar(64) NOT NULL DEFAULT '', - `diskcount` tinyint(1) NOT NULL DEFAULT '1', - `country` varchar(128) NOT NULL DEFAULT '', - `crc_value` varchar(64) NOT NULL DEFAULT '', - `inetref` text, - `display` tinyint(1) NOT NULL DEFAULT '1', - `version` varchar(64) NOT NULL DEFAULT '', - KEY `system` (`system`), - KEY `year` (`year`), - KEY `romname` (`romname`), - KEY `gamename` (`gamename`), - KEY `genre` (`genre`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `gamemetadata` --- - -LOCK TABLES `gamemetadata` WRITE; -/*!40000 ALTER TABLE `gamemetadata` DISABLE KEYS */; -/*!40000 ALTER TABLE `gamemetadata` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `gameplayers` --- - -DROP TABLE IF EXISTS `gameplayers`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `gameplayers` ( - `gameplayerid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `playername` varchar(64) NOT NULL DEFAULT '', - `workingpath` varchar(255) NOT NULL DEFAULT '', - `rompath` varchar(255) NOT NULL DEFAULT '', - `screenshots` varchar(255) NOT NULL DEFAULT '', - `commandline` text NOT NULL, - `gametype` varchar(64) NOT NULL DEFAULT '', - `extensions` varchar(128) NOT NULL DEFAULT '', - `spandisks` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`gameplayerid`), - UNIQUE KEY `playername` (`playername`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `gameplayers` --- - -LOCK TABLES `gameplayers` WRITE; -/*!40000 ALTER TABLE `gameplayers` DISABLE KEYS */; -/*!40000 ALTER TABLE `gameplayers` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `housekeeping` -- @@ -921,7 +785,6 @@ CREATE TABLE `housekeeping` ( LOCK TABLES `housekeeping` WRITE; /*!40000 ALTER TABLE `housekeeping` DISABLE KEYS */; -INSERT INTO `housekeeping` (`tag`, `lastrun`) VALUES ('BackupDB','2010-11-29 17:02:27'),('MythFillDB','2010-05-23 00:32:23'),('DailyCleanup','2010-05-23 00:32:23'),('JobQueueRecover-larch5','2010-05-23 00:32:23'),('DBCleanup','2010-05-23 00:32:23'); /*!40000 ALTER TABLE `housekeeping` ENABLE KEYS */; UNLOCK TABLES; @@ -963,7 +826,7 @@ CREATE TABLE `internetcontent` ( `description` text NOT NULL, `commandline` text NOT NULL, `version` double NOT NULL, - `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `updated` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `search` tinyint(1) NOT NULL, `tree` tinyint(1) NOT NULL, `podcast` tinyint(1) NOT NULL, @@ -1002,7 +865,7 @@ CREATE TABLE `internetcontentarticles` ( `thumbnail` text NOT NULL, `mediaURL` text NOT NULL, `author` varchar(255) NOT NULL, - `date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, + `date` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', `time` int(11) NOT NULL, `rating` varchar(255) NOT NULL, `filesize` bigint(20) NOT NULL, @@ -1115,7 +978,6 @@ CREATE TABLE `jumppoints` ( LOCK TABLES `jumppoints` WRITE; /*!40000 ALTER TABLE `jumppoints` DISABLE KEYS */; -INSERT INTO `jumppoints` (`destination`, `description`, `keylist`, `hostname`) VALUES ('Reload Theme','','','larch5'),('Main Menu','','','larch5'),('Program Guide','','','larch5'),('Program Finder','','','larch5'),('Manage Recordings / Fix Conflicts','','','larch5'),('Program Recording Priorities','','','larch5'),('Channel Recording Priorities','','','larch5'),('TV Recording Playback','','','larch5'),('TV Recording Deletion','','','larch5'),('Live TV','','','larch5'),('Live TV In Guide','','','larch5'),('Manual Record Scheduling','','','larch5'),('Status Screen','','','larch5'),('Previously Recorded','','','larch5'),('Netflix Browser','Browse Netflix titles','','larch5'),('Netflix Queue','Administer Netflix Queue','','larch5'),('Netflix History','View Netflix History','','larch5'),('MythGallery','Image viewer / slideshow','','larch5'),('MythGame','Game frontend','','larch5'),('Play music','','','larch5'),('Select music playlists','','','larch5'),('Rip CD','','','larch5'),('Scan music','','','larch5'),('Show Music Miniplayer','','','larch5'),('MythNews','RSS News feed reader','','larch5'),('MythVideo','The MythVideo default view','','larch5'),('Video Manager','The MythVideo video manager','','larch5'),('Video Browser','The MythVideo video browser','','larch5'),('Video Listings','The MythVideo video listings','','larch5'),('Video Gallery','The MythVideo video gallery','','larch5'),('Play DVD','Play a DVD','','larch5'),('Play VCD','Play a VCD','','larch5'),('Rip DVD','Import a DVD into your MythVideo database','','larch5'),('MythWeather','Weather forecasts','','larch5'),('Manage Recording Rules','','','larch5'),('ScreenShot','','','larch5'),('Create DVD','','','larch5'),('Create Archive','','','larch5'),('Import Archive','','','larch5'),('View Archive Log','','','larch5'),('Play Created DVD','','','larch5'),('Burn DVD','','','larch5'),('MythSmolt','Hardware profiler','Ctrl+Alt+p','larch5'); /*!40000 ALTER TABLE `jumppoints` ENABLE KEYS */; UNLOCK TABLES; @@ -1142,7 +1004,7 @@ CREATE TABLE `keybindings` ( LOCK TABLES `keybindings` WRITE; /*!40000 ALTER TABLE `keybindings` DISABLE KEYS */; -INSERT INTO `keybindings` (`context`, `action`, `description`, `keylist`, `hostname`) VALUES ('Global','UP','Up Arrow','Up','larch5'),('Global','DOWN','Down Arrow','Down','larch5'),('Global','LEFT','Left Arrow','Left','larch5'),('Global','RIGHT','Right Arrow','Right','larch5'),('Global','SELECT','Select','Return,Enter,Space','larch5'),('Global','ESCAPE','Escape','Esc','larch5'),('Global','MENU','Pop-up menu','M','larch5'),('Global','INFO','More information','I','larch5'),('Global','PAGEUP','Page Up','PgUp','larch5'),('Global','PAGEDOWN','Page Down','PgDown','larch5'),('Global','PREVVIEW','Previous View','Home','larch5'),('Global','NEXTVIEW','Next View','End','larch5'),('Global','HELP','Help','F1','larch5'),('Global','EJECT','Eject Removable Media','','larch5'),('Global','0','0','0','larch5'),('Global','1','1','1','larch5'),('Global','2','2','2','larch5'),('Global','3','3','3','larch5'),('Global','4','4','4','larch5'),('Global','5','5','5','larch5'),('Global','6','6','6','larch5'),('Global','7','7','7','larch5'),('Global','8','8','8','larch5'),('Global','9','9','9','larch5'),('TV Playback','CREATEPBPVIEW','Create Picture-by-Picture view','','larch5'),('TV Playback','CREATEPIPVIEW','Create Picture-in-Picture view','','larch5'),('TV Playback','NEXTPIPWINDOW','Toggle active PIP/PBP window','B','larch5'),('TV Frontend','PLAYBACK','Play Program','P','larch5'),('TV Frontend','TOGGLERECORD','Toggle recording status of current program','R','larch5'),('TV Frontend','DAYLEFT','Page the program guide back one day','Home,7','larch5'),('TV Frontend','DAYRIGHT','Page the program guide forward one day','End,1','larch5'),('TV Frontend','PAGELEFT','Page the program guide left',',,<','larch5'),('TV Frontend','PAGERIGHT','Page the program guide right','>,.','larch5'),('TV Frontend','TOGGLEFAV','Toggle the current channel as a favorite','?','larch5'),('TV Frontend','TOGGLEEPGORDER','Reverse the channel order in the program guide','0','larch5'),('TV Frontend','GUIDE','Show the Program Guide','S','larch5'),('TV Frontend','FINDER','Show the Program Finder','#','larch5'),('TV Frontend','NEXTFAV','Cycle through channel groups and all channels in the program guide.','/','larch5'),('TV Frontend','CHANUPDATE','Switch channels without exiting guide in Live TV mode.','X','larch5'),('TV Frontend','VOLUMEDOWN','Volume down','[,{,F10,Volume Down','larch5'),('TV Frontend','VOLUMEUP','Volume up','],},F11,Volume Up','larch5'),('TV Frontend','MUTE','Mute','|,\\,F9,Volume Mute','larch5'),('TV Frontend','RANKINC','Increase program or channel rank','Right','larch5'),('TV Frontend','RANKDEC','Decrease program or channel rank','Left','larch5'),('TV Frontend','UPCOMING','List upcoming episodes','O','larch5'),('TV Frontend','DETAILS','Show program details','U','larch5'),('TV Frontend','VIEWCARD','Switch Capture Card view','Y','larch5'),('TV Frontend','VIEWINPUT','Switch Capture Card view','C','larch5'),('TV Frontend','CHANGERECGROUP','Change Recording Group','','larch5'),('TV Frontend','CHANGEGROUPVIEW','Change Group View','','larch5'),('TV Playback','CLEAROSD','Clear OSD','Backspace','larch5'),('TV Playback','PAUSE','Pause','P','larch5'),('TV Playback','SEEKFFWD','Fast Forward','Right','larch5'),('TV Playback','SEEKRWND','Rewind','Left','larch5'),('TV Playback','ARBSEEK','Arbitrary Seek','*','larch5'),('TV Playback','CHANNELUP','Channel up','Up','larch5'),('TV Playback','CHANNELDOWN','Channel down','Down','larch5'),('TV Playback','NEXTFAV','Switch to the next favorite channel','/','larch5'),('TV Playback','PREVCHAN','Switch to the previous channel','H','larch5'),('TV Playback','JUMPFFWD','Jump ahead','PgDown','larch5'),('TV Playback','JUMPRWND','Jump back','PgUp','larch5'),('TV Playback','JUMPBKMRK','Jump to bookmark','K','larch5'),('TV Playback','FFWDSTICKY','Fast Forward (Sticky) or Forward one frame while paused','>,.','larch5'),('TV Playback','RWNDSTICKY','Rewind (Sticky) or Rewind one frame while paused',',,<','larch5'),('TV Playback','NEXTSOURCE','Next Video Source','Y','larch5'),('TV Playback','PREVSOURCE','Previous Video Source','Ctrl+Y','larch5'),('TV Playback','NEXTINPUT','Next Input','C','larch5'),('TV Playback','NEXTCARD','Next Card','','larch5'),('TV Playback','SKIPCOMMERCIAL','Skip Commercial','Z,End','larch5'),('TV Playback','SKIPCOMMBACK','Skip Commercial (Reverse)','Q,Home','larch5'),('TV Playback','JUMPSTART','Jump to the start of the recording.','Ctrl+B','larch5'),('TV Playback','TOGGLEBROWSE','Toggle channel browse mode','O','larch5'),('TV Playback','TOGGLERECORD','Toggle recording status of current program','R','larch5'),('TV Playback','TOGGLEFAV','Toggle the current channel as a favorite','?','larch5'),('TV Playback','VOLUMEDOWN','Volume down','[,{,F10,Volume Down','larch5'),('TV Playback','VOLUMEUP','Volume up','],},F11,Volume Up','larch5'),('TV Playback','MUTE','Mute','|,\\,F9,Volume Mute','larch5'),('TV Playback','TOGGLEPIPMODE','Toggle Picture-in-Picture view','V','larch5'),('TV Playback','TOGGLEPIPWINDOW','Toggle active PiP window','B','larch5'),('TV Playback','SWAPPIP','Swap PBP/PIP Windows','N','larch5'),('TV Playback','TOGGLEASPECT','Toggle the video aspect ratio','Ctrl+W','larch5'),('TV Playback','TOGGLEFILL','Next Preconfigured Zoom mode','W','larch5'),('TV Playback','TOGGLECC','Toggle any captions','T','larch5'),('TV Playback','TOGGLETTC','Toggle Teletext Captions','','larch5'),('TV Playback','TOGGLESUBTITLE','Toggle Subtitles','','larch5'),('TV Playback','TOGGLECC608','Toggle VBI CC','','larch5'),('TV Playback','TOGGLECC708','Toggle ATSC CC','','larch5'),('TV Playback','TOGGLETTM','Toggle Teletext Menu','','larch5'),('TV Playback','SELECTAUDIO_0','Play audio track 1','','larch5'),('TV Playback','SELECTAUDIO_1','Play audio track 2','','larch5'),('TV Playback','SELECTSUBTITLE_0','Display subtitle 1','','larch5'),('TV Playback','SELECTSUBTITLE_1','Display subtitle 2','','larch5'),('TV Playback','SELECTCC608_0','Display VBI CC1','','larch5'),('TV Playback','SELECTCC608_1','Display VBI CC2','','larch5'),('TV Playback','SELECTCC608_2','Display VBI CC3','','larch5'),('TV Playback','SELECTCC608_3','Display VBI CC4','','larch5'),('TV Playback','SELECTCC708_0','Display ATSC CC1','','larch5'),('TV Playback','SELECTCC708_1','Display ATSC CC2','','larch5'),('TV Playback','SELECTCC708_2','Display ATSC CC3','','larch5'),('TV Playback','SELECTCC708_3','Display ATSC CC4','','larch5'),('TV Playback','NEXTAUDIO','Next audio track','+','larch5'),('TV Playback','PREVAUDIO','Previous audio track','-','larch5'),('TV Playback','NEXTSUBTITLE','Next subtitle track','','larch5'),('TV Playback','PREVSUBTITLE','Previous subtitle track','','larch5'),('TV Playback','NEXTCC608','Next VBI CC track','','larch5'),('TV Playback','PREVCC608','Previous VBI CC track','','larch5'),('TV Playback','NEXTCC708','Next ATSC CC track','','larch5'),('TV Playback','PREVCC708','Previous ATSC CC track','','larch5'),('TV Playback','NEXTCC','Next of any captions','','larch5'),('TV Playback','NEXTSCAN','Next video scan overidemode','','larch5'),('TV Playback','QUEUETRANSCODE','Queue the current recording for transcoding','X','larch5'),('TV Playback','SPEEDINC','Increase the playback speed','U','larch5'),('TV Playback','SPEEDDEC','Decrease the playback speed','J','larch5'),('TV Playback','ADJUSTSTRETCH','Turn on time stretch control','A','larch5'),('TV Playback','STRETCHINC','Increase time stretch speed','','larch5'),('TV Playback','STRETCHDEC','Decrease time stretch speed','','larch5'),('TV Playback','TOGGLESTRETCH','Toggle time stretch speed','','larch5'),('TV Playback','TOGGLEAUDIOSYNC','Turn on audio sync adjustment controls','','larch5'),('TV Playback','TOGGLEPICCONTROLS','Playback picture adjustments','F','larch5'),('TV Playback','TOGGLECHANCONTROLS','Recording picture adjustments for this channel','Ctrl+G','larch5'),('TV Playback','TOGGLERECCONTROLS','Recording picture adjustments for this recorder','G','larch5'),('TV Playback','TOGGLEPBPMODE','Toggle Picture-by-Picture view','Ctrl+V','larch5'),('TV Playback','CYCLECOMMSKIPMODE','Cycle Commercial Skip mode','','larch5'),('TV Playback','GUIDE','Show the Program Guide','S','larch5'),('TV Playback','FINDER','Show the Program Finder','#','larch5'),('TV Playback','TOGGLESLEEP','Toggle the Sleep Timer','F8','larch5'),('TV Playback','PLAY','Play','Ctrl+P','larch5'),('TV Playback','JUMPPREV','Jump to previously played recording','','larch5'),('TV Playback','JUMPREC','Display menu of recorded programs to jump to','','larch5'),('TV Playback','VIEWSCHEDULED','Display scheduled recording list','','larch5'),('TV Playback','SIGNALMON','Monitor Signal Quality','Alt+F7','larch5'),('TV Playback','JUMPTODVDROOTMENU','Jump to the DVD Root Menu','','larch5'),('TV Playback','EXITSHOWNOPROMPTS','Exit Show without any prompts','','larch5'),('TV Playback','SCREENSHOT','Save screenshot of current video frame','','larch5'),('TV Playback','MENURED','Menu Red','F2','larch5'),('TV Playback','MENUGREEN','Menu Green','F3','larch5'),('TV Playback','MENUYELLOW','Menu Yellow','F4','larch5'),('TV Playback','MENUBLUE','Menu Blue','F5','larch5'),('TV Playback','TEXTEXIT','Menu Exit','F6','larch5'),('TV Playback','MENUTEXT','Menu Text','F7','larch5'),('TV Playback','MENUEPG','Menu EPG','F12','larch5'),('TV Editing','CLEARMAP','Clear editing cut points','C,Q,Home','larch5'),('TV Editing','INVERTMAP','Invert Begin/End cut points','I','larch5'),('TV Editing','LOADCOMMSKIP','Load cut list from commercial skips','Z,End','larch5'),('TV Editing','NEXTCUT','Jump to the next cut point','PgDown','larch5'),('TV Editing','PREVCUT','Jump to the previous cut point','PgUp','larch5'),('TV Editing','BIGJUMPREW','Jump back 10x the normal amount',',,<','larch5'),('TV Editing','BIGJUMPFWD','Jump forward 10x the normal amount','>,.','larch5'),('Teletext Menu','NEXTPAGE','Next Page','Down','larch5'),('Teletext Menu','PREVPAGE','Previous Page','Up','larch5'),('Teletext Menu','NEXTSUBPAGE','Next Subpage','Right','larch5'),('Teletext Menu','PREVSUBPAGE','Previous Subpage','Left','larch5'),('Teletext Menu','TOGGLETT','Toggle Teletext','T','larch5'),('Teletext Menu','MENURED','Menu Red','F2','larch5'),('Teletext Menu','MENUGREEN','Menu Green','F3','larch5'),('Teletext Menu','MENUYELLOW','Menu Yellow','F4','larch5'),('Teletext Menu','MENUBLUE','Menu Blue','F5','larch5'),('Teletext Menu','MENUWHITE','Menu White','F6','larch5'),('Teletext Menu','TOGGLEBACKGROUND','Toggle Background','F7','larch5'),('Teletext Menu','REVEAL','Reveal hidden Text','F8','larch5'),('Archive','TOGGLECUT','Toggle use cut list state for selected program','C','larch5'),('NetFlix','MOVETOTOP','Moves movie to top of queue','1','larch5'),('Video','DOWNLOADDATA','Download metadata for current item','W','larch5'),('Gallery','PLAY','Start/Stop Slideshow','P','larch5'),('Gallery','HOME','Go to the first image in thumbnail view','Home','larch5'),('Gallery','END','Go to the last image in thumbnail view','End','larch5'),('Gallery','MENU','Toggle activating menu in thumbnail view','M','larch5'),('Gallery','SLIDESHOW','Start Slideshow in thumbnail view','S','larch5'),('Gallery','RANDOMSHOW','Start Random Slideshow in thumbnail view','R','larch5'),('Gallery','ROTRIGHT','Rotate image right 90 degrees','],3','larch5'),('Gallery','ROTLEFT','Rotate image left 90 degrees','[,1','larch5'),('Gallery','ZOOMOUT','Zoom image out','7','larch5'),('Gallery','ZOOMIN','Zoom image in','9','larch5'),('Gallery','SCROLLUP','Scroll image up','2','larch5'),('Gallery','SCROLLLEFT','Scroll image left','4','larch5'),('Gallery','SCROLLRIGHT','Scroll image right','6','larch5'),('Gallery','SCROLLDOWN','Scroll image down','8','larch5'),('Gallery','RECENTER','Recenter image','5','larch5'),('Gallery','FULLSIZE','Full-size (un-zoom) image','0','larch5'),('Gallery','UPLEFT','Go to the upper-left corner of the image','PgUp','larch5'),('Gallery','LOWRIGHT','Go to the lower-right corner of the image','PgDown','larch5'),('Gallery','INFO','Toggle Showing Information about Image','I','larch5'),('Video','INCSEARCH','Show Incremental Search Dialog','Ctrl+S','larch5'),('Gallery','MARK','Mark image','T','larch5'),('Gallery','FULLSCREEN','Toggle scale to fullscreen/scale to fit','W','larch5'),('Game','TOGGLEFAV','Toggle the current game as a favorite','?,/','larch5'),('Game','INCSEARCH','Show incremental search dialog','Ctrl+S','larch5'),('Game','INCSEARCHNEXT','Incremental search find next match','Ctrl+N','larch5'),('Music','NEXTTRACK','Move to the next track','>,.,Z,End','larch5'),('Music','PREVTRACK','Move to the previous track',',,<,Q,Home','larch5'),('Music','FFWD','Fast forward','PgDown','larch5'),('Music','RWND','Rewind','PgUp','larch5'),('Music','PAUSE','Pause/Start playback','P','larch5'),('Music','PLAY','Start playback','','larch5'),('Music','STOP','Stop playback','O','larch5'),('Music','VOLUMEDOWN','Volume down','[,{,F10,Volume Down','larch5'),('Music','VOLUMEUP','Volume up','],},F11,Volume Up','larch5'),('Music','MUTE','Mute','|,\\,F9,Volume Mute','larch5'),('Music','CYCLEVIS','Cycle visualizer mode','6','larch5'),('Music','BLANKSCR','Blank screen','5','larch5'),('Music','THMBUP','Increase rating','9','larch5'),('Music','THMBDOWN','Decrease rating','7','larch5'),('Music','REFRESH','Refresh music tree','8','larch5'),('Music','FILTER','Filter All My Music','F','larch5'),('Music','INCSEARCH','Show incremental search dialog','Ctrl+S','larch5'),('Music','INCSEARCHNEXT','Incremental search find next match','Ctrl+N','larch5'),('Music','SPEEDUP','Increase Play Speed','W','larch5'),('Music','SPEEDDOWN','Decrease Play Speed','X','larch5'),('News','RETRIEVENEWS','Update news items','I','larch5'),('News','FORCERETRIEVE','Force update news items','M','larch5'),('News','CANCEL','Cancel news item updating','C','larch5'),('Phone','0','0','0','larch5'),('Phone','1','1','1','larch5'),('Phone','2','2','2','larch5'),('Phone','3','3','3','larch5'),('Phone','4','4','4','larch5'),('Phone','5','5','5','larch5'),('Phone','6','6','6','larch5'),('Phone','7','7','7','larch5'),('Phone','8','8','8','larch5'),('Phone','9','9','9','larch5'),('Phone','HASH','HASH','#','larch5'),('Phone','STAR','STAR','*','larch5'),('Phone','Up','Up','Up','larch5'),('Phone','Down','Down','Down','larch5'),('Phone','Left','Left','Left','larch5'),('Phone','Right','Right','Right','larch5'),('Phone','VOLUMEDOWN','Volume down','[,{,F10,Volume Down','larch5'),('Phone','VOLUMEUP','Volume up','],},F11,Volume Up','larch5'),('Phone','MUTE','Mute','|,\\,F9,Volume Mute','larch5'),('Phone','ZOOMIN','Zoom the video window in','>,.,Z,End','larch5'),('Phone','ZOOMOUT','Zoom the video window out',',,<,Q,Home','larch5'),('Phone','FULLSCRN','Show received video full-screen','P','larch5'),('Phone','HANGUP','Hangup an active call','O','larch5'),('Phone','LOOPBACK','Loopback Video','L','larch5'),('Video','FILTER','Open video filter dialog','F','larch5'),('Video','PLAYALT','Play selected item in alternate player','ALT+P','larch5'),('Video','BROWSE','Change browsable in video manager','B','larch5'),('Video','INCPARENT','Increase Parental Level','],},F11','larch5'),('Video','DECPARENT','Decrease Parental Level','[,{,F10','larch5'),('Video','HOME','Go to the first video','Home','larch5'),('Video','END','Go to the last video','End','larch5'),('Weather','PAUSE','Pause current page','P','larch5'),('Weather','SEARCH','Search List','/','larch5'),('Weather','NEXTSEARCH','Search List','n','larch5'),('Weather','UPDATE','Search List','u','larch5'),('Global','NEXT','Move to next widget','Tab','larch5'),('Global','PREVIOUS','Move to preview widget','Backtab','larch5'),('Global','BACKSPACE','Backspace','Backspace','larch5'),('Global','DELETE','Delete','D','larch5'),('Global','EDIT','Edit','E','larch5'),('Global','PAGETOP','Page to top of list','','larch5'),('Global','PAGEMIDDLE','Page to middle of list','','larch5'),('Global','PAGEBOTTOM','Page to bottom of list','','larch5'),('Browser','ZOOMIN','Zoom in on browser window','.,>','larch5'),('Browser','ZOOMOUT','Zoom out on browser window',',,<','larch5'),('Browser','TOGGLEINPUT','Toggle where keyboard input goes to','F1','larch5'),('Browser','MOUSEUP','Move mouse pointer up','2','larch5'),('Browser','MOUSEDOWN','Move mouse pointer down','8','larch5'),('Browser','MOUSELEFT','Move mouse pointer left','4','larch5'),('Browser','MOUSERIGHT','Move mouse pointer right','6','larch5'),('Browser','MOUSELEFTBUTTON','Mouse Left button click','5','larch5'),('Browser','PAGEDOWN','Scroll down half a page','9','larch5'),('Browser','PAGEUP','Scroll up half a page','3','larch5'),('Browser','PAGELEFT','Scroll left half a page','7','larch5'),('Browser','PAGERIGHT','Scroll right half a page','1','larch5'),('Browser','NEXTLINK','Move selection to next link','Z','larch5'),('Browser','PREVIOUSLINK','Move selection to previous link','Q','larch5'),('Browser','FOLLOWLINK','Follow selected link','Return,Space,Enter','larch5'),('Browser','HISTORYBACK','Go back to previous page','R,Backspace','larch5'),('Browser','HISTORYFORWARD','Go forward to previous page','F','larch5'),('Welcome','STARTXTERM','Open an Xterm window','F12','larch5'),('Welcome','SHOWSETTINGS','Show Mythshutdown settings','F11','larch5'),('TV Playback','TOGGLEPIPSTATE','Change PxP view','','larch5'),('Browser','NEXTTAB','Move to next browser tab','P','larch5'),('Browser','PREVTAB','Move to previous browser tab','','larch5'),('Video','ITEMDETAIL','Display Item Detail Popup','','larch5'),('Global','CUT','Cut text from textedit','Ctrl+X','larch5'),('Global','COPY','Copy text from textedit','Ctrl+C','larch5'),('Global','PASTE','Paste text into textedit','Ctrl+V','larch5'),('Global','SYSEVENT01','Trigger System Key Event #1','','larch5'),('Global','SYSEVENT02','Trigger System Key Event #2','','larch5'),('Global','SYSEVENT03','Trigger System Key Event #3','','larch5'),('Global','SYSEVENT04','Trigger System Key Event #4','','larch5'),('Global','SYSEVENT05','Trigger System Key Event #5','','larch5'),('Global','SYSEVENT06','Trigger System Key Event #6','','larch5'),('Global','SYSEVENT07','Trigger System Key Event #7','','larch5'),('Global','SYSEVENT08','Trigger System Key Event #8','','larch5'),('Global','SYSEVENT09','Trigger System Key Event #9','','larch5'),('Global','SYSEVENT10','Trigger System Key Event #10','','larch5'),('TV Frontend','CUSTOMEDIT','Edit Custom Record Rule','','larch5'),('TV Playback','TOGGLEUPMIX','Toggle audio upmixer','Ctrl+U','larch5'),('Music','TOGGLEUPMIX','Toggle audio upmixer','Ctrl+U','larch5'),('Main Menu','EXIT','System Exit','Esc','larch5'),('TV Frontend','CYCLEAUDIOCHAN','Cycle audio channels','','larch5'),('TV Playback','BACK','Exit or return to DVD menu','','larch5'),('TV Playback','CYCLEAUDIOCHAN','Cycle audio channels','','larch5'),('TV Playback','TOGGLETEXT','Toggle External Subtitles','','larch5'),('TV Playback','TOGGLERAWTEXT','Toggle Text Subtitles','','larch5'),('TV Playback','SELECTRAWTEXT_0','Display Text Subtitle 1','','larch5'),('TV Playback','NEXTRAWTEXT','Next Text track','','larch5'),('TV Playback','PREVRAWTEXT','Previous Text track','','larch5'),('TV Editing','SAVEMAP','Save cut list','','larch5'),('Game','DOWNLOADDATA','Download metadata for current item','W','larch5'); +INSERT INTO `keybindings` (`context`, `action`, `description`, `keylist`, `hostname`) VALUES ('Global','UP','Up Arrow','Up','apheleia'),('Global','DOWN','Down Arrow','Down','apheleia'),('Global','LEFT','Left Arrow','Left','apheleia'),('Global','RIGHT','Right Arrow','Right','apheleia'),('Global','NEXT','Move to next widget','Tab','apheleia'),('Global','PREVIOUS','Move to preview widget','Backtab','apheleia'),('Global','SELECT','Select','Return,Enter,Space','apheleia'),('Global','BACKSPACE','Backspace','Backspace','apheleia'),('Global','ESCAPE','Escape','Esc','apheleia'),('Global','MENU','Pop-up menu','M','apheleia'),('Global','INFO','More information','I','apheleia'),('Global','DELETE','Delete','D','apheleia'),('Global','EDIT','Edit','E','apheleia'),('Global','SCREENSHOT','Save screenshot','','apheleia'),('Global','HANDLEMEDIA','Play a media resource','','apheleia'),('Global','PAGEUP','Page Up','PgUp','apheleia'),('Global','PAGEDOWN','Page Down','PgDown','apheleia'),('Global','PAGETOP','Page to top of list','','apheleia'),('Global','PAGEMIDDLE','Page to middle of list','','apheleia'),('Global','PAGEBOTTOM','Page to bottom of list','','apheleia'),('Global','PREVVIEW','Previous View','Home','apheleia'),('Global','NEXTVIEW','Next View','End','apheleia'),('Global','HELP','Help','F1','apheleia'),('Global','EJECT','Eject Removable Media','','apheleia'),('Global','CUT','Cut text from textedit','Ctrl+X','apheleia'),('Global','COPY','Copy text from textedit','Ctrl+C','apheleia'),('Global','PASTE','Paste text into textedit','Ctrl+V','apheleia'),('Global','UNDO','Undo','Ctrl+Z','apheleia'),('Global','REDO','Redo','Ctrl+Y','apheleia'),('Global','SEARCH','Show incremental search dialog','Ctrl+S','apheleia'),('Global','0','0','0','apheleia'),('Global','1','1','1','apheleia'),('Global','2','2','2','apheleia'),('Global','3','3','3','apheleia'),('Global','4','4','4','apheleia'),('Global','5','5','5','apheleia'),('Global','6','6','6','apheleia'),('Global','7','7','7','apheleia'),('Global','8','8','8','apheleia'),('Global','9','9','9','apheleia'),('Global','TVPOWERON','Turn the display on','','apheleia'),('Global','TVPOWEROFF','Turn the display off','','apheleia'),('Global','SYSEVENT01','Trigger System Key Event #1','','apheleia'),('Global','SYSEVENT02','Trigger System Key Event #2','','apheleia'),('Global','SYSEVENT03','Trigger System Key Event #3','','apheleia'),('Global','SYSEVENT04','Trigger System Key Event #4','','apheleia'),('Global','SYSEVENT05','Trigger System Key Event #5','','apheleia'),('Global','SYSEVENT06','Trigger System Key Event #6','','apheleia'),('Global','SYSEVENT07','Trigger System Key Event #7','','apheleia'),('Global','SYSEVENT08','Trigger System Key Event #8','','apheleia'),('Global','SYSEVENT09','Trigger System Key Event #9','','apheleia'),('Global','SYSEVENT10','Trigger System Key Event #10','','apheleia'),('Browser','ZOOMIN','Zoom in on browser window','.,>','apheleia'),('Browser','ZOOMOUT','Zoom out on browser window',',,<','apheleia'),('Browser','TOGGLEINPUT','Toggle where keyboard input goes to','F1','apheleia'),('Browser','MOUSEUP','Move mouse pointer up','2','apheleia'),('Browser','MOUSEDOWN','Move mouse pointer down','8','apheleia'),('Browser','MOUSELEFT','Move mouse pointer left','4','apheleia'),('Browser','MOUSERIGHT','Move mouse pointer right','6','apheleia'),('Browser','MOUSELEFTBUTTON','Mouse Left button click','5','apheleia'),('Browser','PAGEDOWN','Scroll down half a page','9','apheleia'),('Browser','PAGEUP','Scroll up half a page','3','apheleia'),('Browser','PAGELEFT','Scroll left half a page','7','apheleia'),('Browser','PAGERIGHT','Scroll right half a page','1','apheleia'),('Browser','NEXTLINK','Move selection to next link','Z','apheleia'),('Browser','PREVIOUSLINK','Move selection to previous link','Q','apheleia'),('Browser','FOLLOWLINK','Follow selected link','Return,Space,Enter','apheleia'),('Browser','HISTORYBACK','Go back to previous page','R,Backspace','apheleia'),('Browser','HISTORYFORWARD','Go forward to previous page','F','apheleia'),('Main Menu','EXITPROMPT','Display System Exit Prompt','Esc','apheleia'),('Main Menu','EXIT','System Exit','','apheleia'); /*!40000 ALTER TABLE `keybindings` ENABLE KEYS */; UNLOCK TABLES; @@ -1170,324 +1032,86 @@ LOCK TABLES `keyword` WRITE; UNLOCK TABLES; -- --- Table structure for table `music_albumart` --- - -DROP TABLE IF EXISTS `music_albumart`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_albumart` ( - `albumart_id` int(20) NOT NULL AUTO_INCREMENT, - `filename` varchar(255) NOT NULL DEFAULT '', - `directory_id` int(20) NOT NULL DEFAULT '0', - `imagetype` tinyint(3) NOT NULL DEFAULT '0', - `song_id` int(11) NOT NULL DEFAULT '0', - `embedded` tinyint(1) NOT NULL DEFAULT '0', - PRIMARY KEY (`albumart_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_albumart` --- - -LOCK TABLES `music_albumart` WRITE; -/*!40000 ALTER TABLE `music_albumart` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_albumart` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_albums` --- - -DROP TABLE IF EXISTS `music_albums`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_albums` ( - `album_id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `artist_id` int(11) unsigned NOT NULL DEFAULT '0', - `album_name` varchar(255) NOT NULL DEFAULT '', - `year` smallint(6) NOT NULL DEFAULT '0', - `compilation` tinyint(1) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`album_id`), - KEY `idx_album_name` (`album_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_albums` --- - -LOCK TABLES `music_albums` WRITE; -/*!40000 ALTER TABLE `music_albums` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_albums` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_artists` --- - -DROP TABLE IF EXISTS `music_artists`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_artists` ( - `artist_id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `artist_name` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`artist_id`), - KEY `idx_artist_name` (`artist_name`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_artists` --- - -LOCK TABLES `music_artists` WRITE; -/*!40000 ALTER TABLE `music_artists` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_artists` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_directories` --- - -DROP TABLE IF EXISTS `music_directories`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_directories` ( - `directory_id` int(20) NOT NULL AUTO_INCREMENT, - `path` text NOT NULL, - `parent_id` int(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`directory_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_directories` --- - -LOCK TABLES `music_directories` WRITE; -/*!40000 ALTER TABLE `music_directories` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_directories` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_genres` +-- Table structure for table `livestream` -- -DROP TABLE IF EXISTS `music_genres`; +DROP TABLE IF EXISTS `livestream`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_genres` ( - `genre_id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `genre` varchar(255) NOT NULL DEFAULT '', - PRIMARY KEY (`genre_id`), - KEY `idx_genre` (`genre`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_genres` --- - -LOCK TABLES `music_genres` WRITE; -/*!40000 ALTER TABLE `music_genres` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_genres` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_playlists` --- - -DROP TABLE IF EXISTS `music_playlists`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_playlists` ( - `playlist_id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `playlist_name` varchar(255) NOT NULL DEFAULT '', - `playlist_songs` text NOT NULL, - `last_accessed` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - `length` int(11) unsigned NOT NULL DEFAULT '0', - `songcount` smallint(8) unsigned NOT NULL DEFAULT '0', - `hostname` varchar(64) NOT NULL DEFAULT '', - PRIMARY KEY (`playlist_id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_playlists` --- - -LOCK TABLES `music_playlists` WRITE; -/*!40000 ALTER TABLE `music_playlists` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_playlists` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_smartplaylist_categories` --- - -DROP TABLE IF EXISTS `music_smartplaylist_categories`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_smartplaylist_categories` ( - `categoryid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(128) NOT NULL, - PRIMARY KEY (`categoryid`), - KEY `name` (`name`) -) ENGINE=MyISAM AUTO_INCREMENT=4 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_smartplaylist_categories` --- - -LOCK TABLES `music_smartplaylist_categories` WRITE; -/*!40000 ALTER TABLE `music_smartplaylist_categories` DISABLE KEYS */; -INSERT INTO `music_smartplaylist_categories` (`categoryid`, `name`) VALUES (1,'Decades'),(2,'Favourite Tracks'),(3,'New Tracks'); -/*!40000 ALTER TABLE `music_smartplaylist_categories` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_smartplaylist_items` --- - -DROP TABLE IF EXISTS `music_smartplaylist_items`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_smartplaylist_items` ( - `smartplaylistitemid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `smartplaylistid` int(10) unsigned NOT NULL, - `field` varchar(50) NOT NULL, - `operator` varchar(20) NOT NULL, - `value1` varchar(255) NOT NULL, - `value2` varchar(255) NOT NULL, - PRIMARY KEY (`smartplaylistitemid`), - KEY `smartplaylistid` (`smartplaylistid`) -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_smartplaylist_items` --- - -LOCK TABLES `music_smartplaylist_items` WRITE; -/*!40000 ALTER TABLE `music_smartplaylist_items` DISABLE KEYS */; -INSERT INTO `music_smartplaylist_items` (`smartplaylistitemid`, `smartplaylistid`, `field`, `operator`, `value1`, `value2`) VALUES (1,1,'Year','is between','1960','1969'),(2,2,'Year','is between','1970','1979'),(3,3,'Year','is between','1980','1989'),(4,4,'Year','is between','1990','1999'),(5,5,'Year','is between','2000','2009'),(6,6,'Rating','is greater than','7','0'),(7,7,'Play Count','is greater than','0','0'),(8,8,'Play Count','is equal to','0','0'); -/*!40000 ALTER TABLE `music_smartplaylist_items` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_smartplaylists` --- - -DROP TABLE IF EXISTS `music_smartplaylists`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_smartplaylists` ( - `smartplaylistid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `name` varchar(128) NOT NULL, - `categoryid` int(10) unsigned NOT NULL, - `matchtype` set('All','Any') CHARACTER SET latin1 NOT NULL DEFAULT 'All', - `orderby` varchar(128) NOT NULL DEFAULT '', - `limitto` int(10) unsigned NOT NULL DEFAULT '0', - PRIMARY KEY (`smartplaylistid`), - KEY `name` (`name`), - KEY `categoryid` (`categoryid`) -) ENGINE=MyISAM AUTO_INCREMENT=9 DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `music_smartplaylists` --- - -LOCK TABLES `music_smartplaylists` WRITE; -/*!40000 ALTER TABLE `music_smartplaylists` DISABLE KEYS */; -INSERT INTO `music_smartplaylists` (`smartplaylistid`, `name`, `categoryid`, `matchtype`, `orderby`, `limitto`) VALUES (1,'1960\'s',1,'All','Artist (A)',0),(2,'1970\'s',1,'All','Artist (A)',0),(3,'1980\'s',1,'All','Artist (A)',0),(4,'1990\'s',1,'All','Artist (A)',0),(5,'2000\'s',1,'All','Artist (A)',0),(6,'Favorite Tracks',2,'All','Artist (A), Album (A)',0),(7,'100 Most Played Tracks',2,'All','Play Count (D)',100),(8,'Never Played Tracks',3,'All','Artist (A), Album (A)',0); -/*!40000 ALTER TABLE `music_smartplaylists` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `music_songs` --- - -DROP TABLE IF EXISTS `music_songs`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_songs` ( - `song_id` int(11) unsigned NOT NULL AUTO_INCREMENT, - `filename` text NOT NULL, - `name` varchar(255) NOT NULL DEFAULT '', - `track` smallint(6) unsigned NOT NULL DEFAULT '0', - `artist_id` int(11) unsigned NOT NULL DEFAULT '0', - `album_id` int(11) unsigned NOT NULL DEFAULT '0', - `genre_id` int(11) unsigned NOT NULL DEFAULT '0', - `year` smallint(6) NOT NULL DEFAULT '0', - `length` int(11) unsigned NOT NULL DEFAULT '0', - `numplays` int(11) unsigned NOT NULL DEFAULT '0', - `rating` tinyint(4) unsigned NOT NULL DEFAULT '0', - `lastplay` datetime DEFAULT NULL, - `date_entered` datetime DEFAULT NULL, - `date_modified` datetime DEFAULT NULL, - `format` varchar(4) NOT NULL DEFAULT '0', - `mythdigest` varchar(255) DEFAULT NULL, - `size` bigint(20) unsigned DEFAULT NULL, - `description` varchar(255) DEFAULT NULL, - `comment` varchar(255) DEFAULT NULL, - `disc_count` smallint(5) unsigned DEFAULT '0', - `disc_number` smallint(5) unsigned DEFAULT '0', - `track_count` smallint(5) unsigned DEFAULT '0', - `start_time` int(10) unsigned DEFAULT '0', - `stop_time` int(10) unsigned DEFAULT NULL, - `eq_preset` varchar(255) DEFAULT NULL, - `relative_volume` tinyint(4) DEFAULT '0', - `sample_rate` int(10) unsigned DEFAULT '0', - `bitrate` int(10) unsigned DEFAULT '0', - `bpm` smallint(5) unsigned DEFAULT NULL, - `directory_id` int(20) NOT NULL DEFAULT '0', - PRIMARY KEY (`song_id`), - KEY `idx_name` (`name`), - KEY `idx_mythdigest` (`mythdigest`), - KEY `directory_id` (`directory_id`), - KEY `album_id` (`album_id`), - KEY `genre_id` (`genre_id`), - KEY `artist_id` (`artist_id`) +CREATE TABLE `livestream` ( + `id` int(10) unsigned NOT NULL AUTO_INCREMENT, + `width` int(10) unsigned NOT NULL, + `height` int(10) unsigned NOT NULL, + `bitrate` int(10) unsigned NOT NULL, + `audiobitrate` int(10) unsigned NOT NULL, + `samplerate` int(10) unsigned NOT NULL, + `audioonlybitrate` int(10) unsigned NOT NULL, + `segmentsize` int(10) unsigned NOT NULL DEFAULT '10', + `maxsegments` int(10) unsigned NOT NULL DEFAULT '0', + `startsegment` int(10) unsigned NOT NULL DEFAULT '0', + `currentsegment` int(10) unsigned NOT NULL DEFAULT '0', + `segmentcount` int(10) unsigned NOT NULL DEFAULT '0', + `percentcomplete` int(10) unsigned NOT NULL DEFAULT '0', + `created` datetime NOT NULL, + `lastmodified` datetime NOT NULL, + `relativeurl` varchar(512) NOT NULL, + `fullurl` varchar(1024) NOT NULL, + `status` int(10) unsigned NOT NULL DEFAULT '0', + `statusmessage` varchar(256) NOT NULL, + `sourcefile` varchar(512) NOT NULL, + `sourcehost` varchar(64) NOT NULL, + `sourcewidth` int(10) unsigned NOT NULL DEFAULT '0', + `sourceheight` int(10) unsigned NOT NULL DEFAULT '0', + `outdir` varchar(256) NOT NULL, + `outbase` varchar(128) NOT NULL, + PRIMARY KEY (`id`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `music_songs` +-- Dumping data for table `livestream` -- -LOCK TABLES `music_songs` WRITE; -/*!40000 ALTER TABLE `music_songs` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_songs` ENABLE KEYS */; +LOCK TABLES `livestream` WRITE; +/*!40000 ALTER TABLE `livestream` DISABLE KEYS */; +/*!40000 ALTER TABLE `livestream` ENABLE KEYS */; UNLOCK TABLES; -- --- Table structure for table `music_stats` +-- Table structure for table `logging` -- -DROP TABLE IF EXISTS `music_stats`; +DROP TABLE IF EXISTS `logging`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; -CREATE TABLE `music_stats` ( - `num_artists` smallint(5) unsigned NOT NULL DEFAULT '0', - `num_albums` smallint(5) unsigned NOT NULL DEFAULT '0', - `num_songs` mediumint(8) unsigned NOT NULL DEFAULT '0', - `num_genres` tinyint(3) unsigned NOT NULL DEFAULT '0', - `total_time` varchar(12) NOT NULL DEFAULT '0', - `total_size` varchar(10) NOT NULL DEFAULT '0' -) ENGINE=MyISAM DEFAULT CHARSET=utf8; +CREATE TABLE `logging` ( + `id` bigint(20) unsigned NOT NULL AUTO_INCREMENT, + `host` varchar(64) NOT NULL DEFAULT '', + `application` varchar(64) NOT NULL DEFAULT '', + `pid` int(11) NOT NULL DEFAULT '0', + `tid` int(11) NOT NULL DEFAULT '0', + `thread` varchar(64) NOT NULL DEFAULT '', + `filename` varchar(255) NOT NULL DEFAULT '', + `line` int(11) NOT NULL DEFAULT '0', + `function` varchar(255) NOT NULL DEFAULT '', + `msgtime` datetime NOT NULL, + `level` int(11) NOT NULL DEFAULT '0', + `message` varchar(2048) NOT NULL, + PRIMARY KEY (`id`), + KEY `host` (`host`,`application`,`pid`,`msgtime`), + KEY `msgtime` (`msgtime`), + KEY `level` (`level`) +) ENGINE=MyISAM AUTO_INCREMENT=61 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- --- Dumping data for table `music_stats` +-- Dumping data for table `logging` -- -LOCK TABLES `music_stats` WRITE; -/*!40000 ALTER TABLE `music_stats` DISABLE KEYS */; -/*!40000 ALTER TABLE `music_stats` ENABLE KEYS */; +LOCK TABLES `logging` WRITE; +/*!40000 ALTER TABLE `logging` DISABLE KEYS */; +INSERT INTO `logging` (`id`, `host`, `application`, `pid`, `tid`, `thread`, `filename`, `line`, `function`, `msgtime`, `level`, `message`) VALUES (1,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2534,'ConfigureLogging','2012-08-22 15:20:42',2,'mythtv-setup version: fixes/0.25 [v0.25.2-15-g46cab93] www.mythtv.org'),(2,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2536,'ConfigureLogging','2012-08-22 15:20:42',2,'Qt version: compile: 4.8.2, runtime: 4.8.2'),(3,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcommandlineparser.cpp',2538,'ConfigureLogging','2012-08-22 15:20:42',5,'Enabled verbose msgs: general'),(4,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',1176,'logStart','2012-08-22 15:20:42',5,'Setting Log Level to LOG_INFO'),(5,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',229,'FileLogger','2012-08-22 15:20:42',6,'Added logging to the console'),(6,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',425,'DatabaseLogger','2012-08-22 15:20:42',6,'Added database logging to table logging'),(7,'apheleia','mythtv-setup',1971,1971,'CoreContext','logging.cpp',1215,'logStart','2012-08-22 15:20:42',5,'Setting up SIGHUP handler'),(8,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdirs.cpp',51,'InitializeMythDirs','2012-08-22 15:20:42',5,'Using runtime prefix = /usr'),(9,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdirs.cpp',64,'InitializeMythDirs','2012-08-22 15:20:42',5,'Using configuration directory = /root/.mythtv'),(10,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',227,'Init','2012-08-22 15:20:42',6,'Assumed character encoding: en_US.UTF-8'),(11,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythdb.cpp',866,'LoadDatabaseParamsFromDisk','2012-08-22 15:20:42',3,'Unable to read configuration file mysql.txt'),(12,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcontext.cpp',477,'LoadDatabaseSettings','2012-08-22 15:20:42',5,'Empty LocalHostName.'),(13,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcontext.cpp',481,'LoadDatabaseSettings','2012-08-22 15:20:42',6,'Using localhost value of apheleia'),(14,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',1354,'InitLocale','2012-08-22 15:20:42',5,'Setting QT default locale to en_US'),(15,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythcorecontext.cpp',1387,'SaveLocaleDefaults','2012-08-22 15:20:42',6,'Current locale en_US'),(16,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythlocale.cpp',121,'LoadDefaultsFromXML','2012-08-22 15:20:42',5,'Reading locale defaults from /usr/share/mythtv//locales/en_us.xml'),(17,'apheleia','mythtv-setup',1971,1978,'SystemIOHandlerW','system-unix.cpp',90,'run','2012-08-22 15:20:42',6,'Starting IO manager (write)'),(18,'apheleia','mythtv-setup',1971,1977,'SystemIOHandlerR','system-unix.cpp',90,'run','2012-08-22 15:20:42',6,'Starting IO manager (read)'),(19,'apheleia','mythtv-setup',1971,1976,'SystemSignalManager','system-unix.cpp',485,'run','2012-08-22 15:20:42',6,'Starting process signal handler'),(20,'apheleia','mythtv-setup',1971,1975,'SystemManager','system-unix.cpp',263,'run','2012-08-22 15:20:42',6,'Starting process manager'),(21,'apheleia','mythtv-setup',1971,1971,'CoreContext','screensaver-x11.cpp',82,'ScreenSaverX11Private','2012-08-22 15:20:42',6,'ScreenSaverX11Private: DPMS is disabled.'),(22,'apheleia','mythtv-setup',1971,1971,'CoreContext','DisplayRes.cpp',64,'Initialize','2012-08-22 15:20:42',5,'Desktop video mode: 800x600 60.000 Hz'),(23,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythtranslation.cpp',66,'load','2012-08-22 15:20:42',6,'Loading en_us translation for module mythfrontend'),(24,'apheleia','mythtv-setup',1971,1971,'CoreContext','lirc.cpp',208,'Init','2012-08-22 15:20:42',3,'LIRC: Failed to connect to Unix socket \'/var/run/lirc/lircd\'\n eno: No such file or directory (2)'),(25,'apheleia','mythtv-setup',1971,1971,'CoreContext','jsmenu.cpp',91,'Init','2012-08-22 15:20:42',3,'JoystickMenuThread: Joystick disabled - Failed to read /root/.mythtv/joystickmenurc'),(26,'apheleia','mythtv-setup',1971,1971,'CoreContext','cecadapter.cpp',146,'Open','2012-08-22 15:20:42',3,'CECAdapter: Failed to find any CEC devices.'),(27,'apheleia','mythtv-setup',1971,1971,'CoreContext','cecadapter.cpp',216,'Close','2012-08-22 15:20:42',6,'CECAdapter: Closing down CEC.'),(28,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 127.0.0.1:0'),(29,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 192.168.1.244:0'),(30,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP [::1]:0'),(31,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP [fe80::20c:29ff:feb1:f445%eth0]:0'),(32,'apheleia','mythtv-setup',1971,1971,'CoreContext','serverpool.cpp',482,'bind','2012-08-22 15:20:42',6,'Binding to UDP 192.168.1.255:0'),(33,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',948,'Init','2012-08-22 15:20:42',6,'Using Frameless Window'),(34,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',961,'Init','2012-08-22 15:20:42',6,'Using Full Screen Window'),(35,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythmainwindow.cpp',1051,'Init','2012-08-22 15:20:42',6,'Using the Qt painter'),(36,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 6\n Name: \'basesmall\' Type: \'fontdef\''),(37,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 11\n Name: \'basemedium\' Type: \'fontdef\''),(38,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 15\n Name: \'baselarge\' Type: \'fontdef\''),(39,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 19\n Name: \'baseextralarge\' Type: \'fontdef\''),(40,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 28\n Name: \'basesmallbrown\' Type: \'fontdef\''),(41,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 32\n Name: \'basesmallgrey\' Type: \'fontdef\''),(42,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 36\n Name: \'basesmallpurple\' Type: \'fontdef\''),(43,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 40\n Name: \'basesmallblack\' Type: \'fontdef\''),(44,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 44\n Name: \'basesmallyellow\' Type: \'fontdef\''),(45,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 48\n Name: \'basesmallgreen\' Type: \'fontdef\''),(46,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 52\n Name: \'basesmallblue\' Type: \'fontdef\''),(47,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 56\n Name: \'basesmallred\' Type: \'fontdef\''),(48,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 60\n Name: \'basemediumgrey\' Type: \'fontdef\''),(49,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 64\n Name: \'basemediumgreen\' Type: \'fontdef\''),(50,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 68\n Name: \'basemediumred\' Type: \'fontdef\''),(51,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 72\n Name: \'basemediumpurple\' Type: \'fontdef\''),(52,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 76\n Name: \'basemediumbrown\' Type: \'fontdef\''),(53,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 80\n Name: \'baselargebrown\' Type: \'fontdef\''),(54,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 666\n Name: \'datefont\' Type: \'fontdef\''),(55,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/Terra/base.xml @ 670\n Name: \'timefont\' Type: \'fontdef\''),(56,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 11\n Name: \'basetiny\' Type: \'fontdef\''),(57,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 36\n Name: \'basetinyred\' Type: \'fontdef\''),(58,'apheleia','mythtv-setup',1971,1971,'CoreContext','mythfontproperties.cpp',439,'ParseFromXml','2012-08-22 15:20:42',3,'MythFontProperties: Failed to load \'Liberation Sans\', got \'DejaVu Sans\' instead\n Location: /usr/share/mythtv/themes/default/base.xml @ 80\n Name: \'basemediumyellow\' Type: \'fontdef\''),(59,'apheleia','mythtv-setup',1971,1971,'CoreContext','schemawizard.cpp',117,'Compare','2012-08-22 15:20:42',6,'Current MythTV Schema Version (DBSchemaVer): 1299'),(60,'apheleia','mythtv-setup',1971,1971,'CoreContext','checksetup.cpp',68,'checkStoragePaths','2012-08-22 15:21:00',3,'No Storage Group directories are defined. You must add at least one directory to the Default Storage Group where new recordings will be stored.'); +/*!40000 ALTER TABLE `logging` ENABLE KEYS */; UNLOCK TABLES; -- @@ -1521,34 +1145,6 @@ LOCK TABLES `mythlog` WRITE; UNLOCK TABLES; -- --- Table structure for table `netflix` --- - -DROP TABLE IF EXISTS `netflix`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `netflix` ( - `name` varchar(100) NOT NULL, - `category` varchar(255) NOT NULL, - `url` varchar(255) NOT NULL, - `ico` varchar(255) DEFAULT NULL, - `updated` int(10) unsigned DEFAULT NULL, - `is_queue` int(10) unsigned DEFAULT NULL, - `queue` varchar(32) NOT NULL DEFAULT '', - PRIMARY KEY (`name`,`queue`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `netflix` --- - -LOCK TABLES `netflix` WRITE; -/*!40000 ALTER TABLE `netflix` DISABLE KEYS */; -/*!40000 ALTER TABLE `netflix` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `networkiconmap` -- @@ -1633,9 +1229,12 @@ CREATE TABLE `oldrecorded` ( `title` varchar(128) NOT NULL DEFAULT '', `subtitle` varchar(128) NOT NULL DEFAULT '', `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, `category` varchar(64) NOT NULL DEFAULT '', `seriesid` varchar(40) NOT NULL DEFAULT '', `programid` varchar(40) NOT NULL DEFAULT '', + `inetref` varchar(40) NOT NULL, `findid` int(11) NOT NULL DEFAULT '0', `recordid` int(11) NOT NULL DEFAULT '0', `station` varchar(20) NOT NULL DEFAULT '', @@ -1643,7 +1242,8 @@ CREATE TABLE `oldrecorded` ( `duplicate` tinyint(1) NOT NULL DEFAULT '0', `recstatus` int(11) NOT NULL DEFAULT '0', `reactivate` smallint(6) NOT NULL DEFAULT '0', - `generic` tinyint(1) DEFAULT '0', + `generic` tinyint(1) NOT NULL, + `future` tinyint(1) NOT NULL DEFAULT '0', PRIMARY KEY (`station`,`starttime`,`title`), KEY `endtime` (`endtime`), KEY `title` (`title`), @@ -1651,7 +1251,11 @@ CREATE TABLE `oldrecorded` ( KEY `programid` (`programid`), KEY `recordid` (`recordid`), KEY `recstatus` (`recstatus`,`programid`,`seriesid`), - KEY `recstatus_2` (`recstatus`,`title`,`subtitle`) + KEY `recstatus_2` (`recstatus`,`title`,`subtitle`), + KEY `future` (`future`), + KEY `chanid` (`chanid`,`starttime`), + KEY `subtitle` (`subtitle`), + KEY `description` (`description`(255)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1689,65 +1293,6 @@ LOCK TABLES `people` WRITE; UNLOCK TABLES; -- --- Table structure for table `phonecallhistory` --- - -DROP TABLE IF EXISTS `phonecallhistory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `phonecallhistory` ( - `recid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `displayname` text NOT NULL, - `url` text NOT NULL, - `timestamp` text NOT NULL, - `duration` int(10) unsigned NOT NULL, - `directionin` int(10) unsigned NOT NULL, - `directoryref` int(10) unsigned DEFAULT NULL, - PRIMARY KEY (`recid`) -) ENGINE=MyISAM DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `phonecallhistory` --- - -LOCK TABLES `phonecallhistory` WRITE; -/*!40000 ALTER TABLE `phonecallhistory` DISABLE KEYS */; -/*!40000 ALTER TABLE `phonecallhistory` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `phonedirectory` --- - -DROP TABLE IF EXISTS `phonedirectory`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `phonedirectory` ( - `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `nickname` text NOT NULL, - `firstname` text, - `surname` text, - `url` text NOT NULL, - `directory` text NOT NULL, - `photofile` text, - `speeddial` int(10) unsigned NOT NULL, - `onhomelan` int(10) unsigned DEFAULT '0', - PRIMARY KEY (`intid`) -) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=latin1; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `phonedirectory` --- - -LOCK TABLES `phonedirectory` WRITE; -/*!40000 ALTER TABLE `phonedirectory` DISABLE KEYS */; -INSERT INTO `phonedirectory` (`intid`, `nickname`, `firstname`, `surname`, `url`, `directory`, `photofile`, `speeddial`, `onhomelan`) VALUES (1,'Me(larch5)','Local Myth Host','larch5','','My MythTVs','',1,1); -/*!40000 ALTER TABLE `phonedirectory` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `pidcache` -- @@ -1839,7 +1384,7 @@ CREATE TABLE `profilegroups` ( PRIMARY KEY (`id`), UNIQUE KEY `name` (`name`,`hostname`), KEY `cardtype` (`cardtype`) -) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=18 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -1848,7 +1393,7 @@ CREATE TABLE `profilegroups` ( LOCK TABLES `profilegroups` WRITE; /*!40000 ALTER TABLE `profilegroups` DISABLE KEYS */; -INSERT INTO `profilegroups` (`id`, `name`, `cardtype`, `is_default`, `hostname`) VALUES (1,'Software Encoders (v4l based)','V4L',1,NULL),(2,'MPEG-2 Encoders (PVR-x50, PVR-500)','MPEG',1,NULL),(3,'Hardware MJPEG Encoders (Matrox G200-TV, Miro DC10, etc)','MJPEG',1,NULL),(4,'Hardware HDTV','HDTV',1,NULL),(5,'Hardware DVB Encoders','DVB',1,NULL),(6,'Transcoders','TRANSCODE',1,NULL),(7,'FireWire Input','FIREWIRE',1,NULL),(8,'USB Mpeg-4 Encoder (Plextor ConvertX, etc)','GO7007',1,NULL),(14,'Import Recorder','IMPORT',1,NULL),(10,'Freebox Input','Freebox',1,NULL),(11,'HDHomeRun Recorders','HDHOMERUN',1,NULL),(12,'CRC IP Recorders','CRC_IP',1,NULL),(13,'HD-PVR Recorders','HDPVR',1,NULL); +INSERT INTO `profilegroups` (`id`, `name`, `cardtype`, `is_default`, `hostname`) VALUES (1,'Software Encoders (v4l based)','V4L',1,NULL),(2,'IVTV MPEG-2 Encoders','MPEG',1,NULL),(3,'Hardware MJPEG Encoders (Matrox G200-TV, Miro DC10, etc)','MJPEG',1,NULL),(4,'Hardware HDTV','HDTV',1,NULL),(5,'Hardware DVB Encoders','DVB',1,NULL),(6,'Transcoders','TRANSCODE',1,NULL),(7,'FireWire Input','FIREWIRE',1,NULL),(8,'USB Mpeg-4 Encoder (Plextor ConvertX, etc)','GO7007',1,NULL),(14,'Import Recorder','IMPORT',1,NULL),(10,'Freebox Input','Freebox',1,NULL),(11,'HDHomeRun Recorders','HDHOMERUN',1,NULL),(12,'CRC IP Recorders','CRC_IP',1,NULL),(13,'HD-PVR Recorders','HDPVR',1,NULL),(15,'ASI Recorder (DVEO)','ASI',1,NULL),(16,'OCUR Recorder (CableLabs)','OCUR',1,NULL),(17,'Ceton Recorder','CETON',1,NULL); /*!40000 ALTER TABLE `profilegroups` ENABLE KEYS */; UNLOCK TABLES; @@ -1889,9 +1434,9 @@ CREATE TABLE `program` ( `listingsource` int(11) NOT NULL DEFAULT '0', `first` tinyint(1) NOT NULL DEFAULT '0', `last` tinyint(1) NOT NULL DEFAULT '0', - `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') CHARACTER SET latin1 NOT NULL, - `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') CHARACTER SET latin1 NOT NULL, - `videoprop` set('HDTV','WIDESCREEN','AVC') CHARACTER SET latin1 NOT NULL, + `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') NOT NULL, + `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') NOT NULL, + `videoprop` set('HDTV','WIDESCREEN','AVC') NOT NULL, PRIMARY KEY (`chanid`,`starttime`,`manualid`), KEY `endtime` (`endtime`), KEY `title` (`title`), @@ -1901,7 +1446,9 @@ CREATE TABLE `program` ( KEY `program_manualid` (`manualid`), KEY `previouslyshown` (`previouslyshown`), KEY `programid` (`programid`,`starttime`), - KEY `starttime` (`starttime`) + KEY `starttime` (`starttime`), + KEY `subtitle` (`subtitle`), + KEY `description` (`description`(255)) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -1986,7 +1533,6 @@ CREATE TABLE `recgrouppassword` ( LOCK TABLES `recgrouppassword` WRITE; /*!40000 ALTER TABLE `recgrouppassword` DISABLE KEYS */; -INSERT INTO `recgrouppassword` (`recgroup`, `password`) VALUES ('All Programs',''); /*!40000 ALTER TABLE `recgrouppassword` ENABLE KEYS */; UNLOCK TABLES; @@ -2008,6 +1554,8 @@ CREATE TABLE `record` ( `title` varchar(128) NOT NULL DEFAULT '', `subtitle` varchar(128) NOT NULL DEFAULT '', `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, `category` varchar(64) NOT NULL DEFAULT '', `profile` varchar(128) NOT NULL DEFAULT 'Default', `recpriority` int(10) NOT NULL DEFAULT '0', @@ -2022,6 +1570,7 @@ CREATE TABLE `record` ( `station` varchar(20) NOT NULL DEFAULT '', `seriesid` varchar(40) NOT NULL DEFAULT '', `programid` varchar(40) NOT NULL DEFAULT '', + `inetref` varchar(40) NOT NULL, `search` int(10) unsigned NOT NULL DEFAULT '0', `autotranscode` tinyint(1) NOT NULL DEFAULT '0', `autocommflag` tinyint(1) NOT NULL DEFAULT '0', @@ -2029,6 +1578,7 @@ CREATE TABLE `record` ( `autouserjob2` tinyint(1) NOT NULL DEFAULT '0', `autouserjob3` tinyint(1) NOT NULL DEFAULT '0', `autouserjob4` tinyint(1) NOT NULL DEFAULT '0', + `autometadata` tinyint(1) NOT NULL DEFAULT '0', `findday` tinyint(4) NOT NULL DEFAULT '0', `findtime` time NOT NULL DEFAULT '00:00:00', `findid` int(11) NOT NULL DEFAULT '0', @@ -2042,6 +1592,7 @@ CREATE TABLE `record` ( `last_delete` datetime NOT NULL, `storagegroup` varchar(32) NOT NULL DEFAULT 'Default', `avg_delay` int(11) NOT NULL DEFAULT '100', + `filter` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`recordid`), KEY `chanid` (`chanid`,`starttime`), KEY `title` (`title`), @@ -2076,6 +1627,8 @@ CREATE TABLE `recorded` ( `title` varchar(128) NOT NULL DEFAULT '', `subtitle` varchar(128) NOT NULL DEFAULT '', `description` varchar(16000) NOT NULL DEFAULT '', + `season` smallint(5) NOT NULL, + `episode` smallint(5) NOT NULL, `category` varchar(64) NOT NULL DEFAULT '', `hostname` varchar(64) NOT NULL DEFAULT '', `bookmark` tinyint(1) NOT NULL DEFAULT '0', @@ -2087,6 +1640,7 @@ CREATE TABLE `recorded` ( `recordid` int(11) DEFAULT NULL, `seriesid` varchar(40) NOT NULL DEFAULT '', `programid` varchar(40) NOT NULL DEFAULT '', + `inetref` varchar(40) NOT NULL, `lastmodified` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, `filesize` bigint(20) NOT NULL DEFAULT '0', `stars` float NOT NULL DEFAULT '0', @@ -2129,6 +1683,32 @@ LOCK TABLES `recorded` WRITE; UNLOCK TABLES; -- +-- Table structure for table `recordedartwork` +-- + +DROP TABLE IF EXISTS `recordedartwork`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordedartwork` ( + `inetref` varchar(255) NOT NULL, + `season` smallint(5) NOT NULL, + `host` text NOT NULL, + `coverart` text NOT NULL, + `fanart` text NOT NULL, + `banner` text NOT NULL +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `recordedartwork` +-- + +LOCK TABLES `recordedartwork` WRITE; +/*!40000 ALTER TABLE `recordedartwork` DISABLE KEYS */; +/*!40000 ALTER TABLE `recordedartwork` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `recordedcredits` -- @@ -2139,7 +1719,7 @@ CREATE TABLE `recordedcredits` ( `person` mediumint(8) unsigned NOT NULL DEFAULT '0', `chanid` int(10) unsigned NOT NULL DEFAULT '0', `starttime` datetime NOT NULL DEFAULT '0000-00-00 00:00:00', - `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') CHARACTER SET latin1 NOT NULL DEFAULT '', + `role` set('actor','director','producer','executive_producer','writer','guest_star','host','adapter','presenter','commentator','guest') NOT NULL DEFAULT '', UNIQUE KEY `chanid` (`chanid`,`starttime`,`person`,`role`), KEY `person` (`person`,`role`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; @@ -2257,9 +1837,9 @@ CREATE TABLE `recordedprogram` ( `listingsource` int(11) NOT NULL DEFAULT '0', `first` tinyint(1) NOT NULL DEFAULT '0', `last` tinyint(1) NOT NULL DEFAULT '0', - `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') CHARACTER SET latin1 NOT NULL, - `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') CHARACTER SET latin1 NOT NULL, - `videoprop` set('HDTV','WIDESCREEN','AVC','720','1080') NOT NULL, + `audioprop` set('STEREO','MONO','SURROUND','DOLBY','HARDHEAR','VISUALIMPAIR') NOT NULL, + `subtitletypes` set('HARDHEAR','NORMAL','ONSCREEN','SIGNED') NOT NULL, + `videoprop` set('HDTV','WIDESCREEN','AVC','720','1080','DAMAGED') NOT NULL, PRIMARY KEY (`chanid`,`starttime`,`manualid`), KEY `endtime` (`endtime`), KEY `title` (`title`), @@ -2332,6 +1912,32 @@ LOCK TABLES `recordedseek` WRITE; UNLOCK TABLES; -- +-- Table structure for table `recordfilter` +-- + +DROP TABLE IF EXISTS `recordfilter`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `recordfilter` ( + `filterid` int(10) unsigned NOT NULL, + `description` varchar(64) DEFAULT NULL, + `clause` varchar(256) DEFAULT NULL, + `newruledefault` tinyint(1) DEFAULT '0', + PRIMARY KEY (`filterid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `recordfilter` +-- + +LOCK TABLES `recordfilter` WRITE; +/*!40000 ALTER TABLE `recordfilter` DISABLE KEYS */; +INSERT INTO `recordfilter` (`filterid`, `description`, `clause`, `newruledefault`) VALUES (0,'New episode','program.previouslyshown = 0',0),(1,'Identifiable episode','program.generic = 0',0),(2,'First showing','program.first > 0',0),(3,'Prime time','HOUR(program.starttime) >= 19 AND HOUR(program.starttime) < 23',0),(4,'Commercial free','channel.commmethod = -2',0),(5,'High definition','program.hdtv > 0',0),(6,'This episode','(RECTABLE.programid <> \'\' AND program.programid = RECTABLE.programid) OR (RECTABLE.programid = \'\' AND program.subtitle = RECTABLE.subtitle AND program.description = RECTABLE.description)',0),(7,'This series','(RECTABLE.seriesid <> \'\' AND program.seriesid = RECTABLE.seriesid)',0); +/*!40000 ALTER TABLE `recordfilter` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `recordingprofiles` -- @@ -2346,7 +1952,7 @@ CREATE TABLE `recordingprofiles` ( `profilegroup` int(10) unsigned NOT NULL DEFAULT '0', PRIMARY KEY (`id`), KEY `profilegroup` (`profilegroup`) -) ENGINE=MyISAM AUTO_INCREMENT=58 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM AUTO_INCREMENT=70 DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2355,7 +1961,7 @@ CREATE TABLE `recordingprofiles` ( LOCK TABLES `recordingprofiles` WRITE; /*!40000 ALTER TABLE `recordingprofiles` DISABLE KEYS */; -INSERT INTO `recordingprofiles` (`id`, `name`, `videocodec`, `audiocodec`, `profilegroup`) VALUES (1,'Default',NULL,NULL,1),(2,'Live TV',NULL,NULL,1),(3,'High Quality',NULL,NULL,1),(4,'Low Quality',NULL,NULL,1),(5,'Default',NULL,NULL,2),(6,'Live TV',NULL,NULL,2),(7,'High Quality',NULL,NULL,2),(8,'Low Quality',NULL,NULL,2),(9,'Default',NULL,NULL,3),(10,'Live TV',NULL,NULL,3),(11,'High Quality',NULL,NULL,3),(12,'Low Quality',NULL,NULL,3),(13,'Default',NULL,NULL,4),(14,'Live TV',NULL,NULL,4),(15,'High Quality',NULL,NULL,4),(16,'Low Quality',NULL,NULL,4),(17,'Default',NULL,NULL,5),(18,'Live TV',NULL,NULL,5),(19,'High Quality',NULL,NULL,5),(20,'Low Quality',NULL,NULL,5),(21,'RTjpeg/MPEG4',NULL,NULL,6),(22,'MPEG2',NULL,NULL,6),(23,'Default',NULL,NULL,8),(24,'Live TV',NULL,NULL,8),(25,'High Quality',NULL,NULL,8),(26,'Low Quality',NULL,NULL,8),(27,'High Quality',NULL,NULL,6),(28,'Medium Quality',NULL,NULL,6),(29,'Low Quality',NULL,NULL,6),(30,'Default',NULL,NULL,10),(31,'Live TV',NULL,NULL,10),(32,'High Quality',NULL,NULL,10),(33,'Low Quality',NULL,NULL,10),(34,'Default',NULL,NULL,11),(35,'Live TV',NULL,NULL,11),(36,'High Quality',NULL,NULL,11),(37,'Low Quality',NULL,NULL,11),(38,'Default',NULL,NULL,12),(39,'Live TV',NULL,NULL,12),(40,'High Quality',NULL,NULL,12),(41,'Low Quality',NULL,NULL,12),(42,'Default',NULL,NULL,7),(43,'Live TV',NULL,NULL,7),(44,'High Quality',NULL,NULL,7),(45,'Low Quality',NULL,NULL,7),(46,'Default',NULL,NULL,9),(47,'Live TV',NULL,NULL,9),(48,'High Quality',NULL,NULL,9),(49,'Low Quality',NULL,NULL,9),(50,'Default',NULL,NULL,13),(51,'Live TV',NULL,NULL,13),(52,'High Quality',NULL,NULL,13),(53,'Low Quality',NULL,NULL,13),(54,'Default',NULL,NULL,14),(55,'Live TV',NULL,NULL,14),(56,'High Quality',NULL,NULL,14),(57,'Low Quality',NULL,NULL,14); +INSERT INTO `recordingprofiles` (`id`, `name`, `videocodec`, `audiocodec`, `profilegroup`) VALUES (1,'Default',NULL,NULL,1),(2,'Live TV',NULL,NULL,1),(3,'High Quality',NULL,NULL,1),(4,'Low Quality',NULL,NULL,1),(5,'Default',NULL,NULL,2),(6,'Live TV',NULL,NULL,2),(7,'High Quality',NULL,NULL,2),(8,'Low Quality',NULL,NULL,2),(9,'Default',NULL,NULL,3),(10,'Live TV',NULL,NULL,3),(11,'High Quality',NULL,NULL,3),(12,'Low Quality',NULL,NULL,3),(13,'Default',NULL,NULL,4),(14,'Live TV',NULL,NULL,4),(15,'High Quality',NULL,NULL,4),(16,'Low Quality',NULL,NULL,4),(17,'Default',NULL,NULL,5),(18,'Live TV',NULL,NULL,5),(19,'High Quality',NULL,NULL,5),(20,'Low Quality',NULL,NULL,5),(21,'RTjpeg/MPEG4',NULL,NULL,6),(22,'MPEG2',NULL,NULL,6),(23,'Default',NULL,NULL,8),(24,'Live TV',NULL,NULL,8),(25,'High Quality',NULL,NULL,8),(26,'Low Quality',NULL,NULL,8),(27,'High Quality',NULL,NULL,6),(28,'Medium Quality',NULL,NULL,6),(29,'Low Quality',NULL,NULL,6),(30,'Default',NULL,NULL,10),(31,'Live TV',NULL,NULL,10),(32,'High Quality',NULL,NULL,10),(33,'Low Quality',NULL,NULL,10),(34,'Default',NULL,NULL,11),(35,'Live TV',NULL,NULL,11),(36,'High Quality',NULL,NULL,11),(37,'Low Quality',NULL,NULL,11),(38,'Default',NULL,NULL,12),(39,'Live TV',NULL,NULL,12),(40,'High Quality',NULL,NULL,12),(41,'Low Quality',NULL,NULL,12),(42,'Default',NULL,NULL,7),(43,'Live TV',NULL,NULL,7),(44,'High Quality',NULL,NULL,7),(45,'Low Quality',NULL,NULL,7),(46,'Default',NULL,NULL,9),(47,'Live TV',NULL,NULL,9),(48,'High Quality',NULL,NULL,9),(49,'Low Quality',NULL,NULL,9),(50,'Default',NULL,NULL,13),(51,'Live TV',NULL,NULL,13),(52,'High Quality',NULL,NULL,13),(53,'Low Quality',NULL,NULL,13),(54,'Default',NULL,NULL,14),(55,'Live TV',NULL,NULL,14),(56,'High Quality',NULL,NULL,14),(57,'Low Quality',NULL,NULL,14),(58,'Default',NULL,NULL,15),(59,'Live TV',NULL,NULL,15),(60,'High Quality',NULL,NULL,15),(61,'Low Quality',NULL,NULL,15),(62,'Default',NULL,NULL,16),(63,'Live TV',NULL,NULL,16),(64,'High Quality',NULL,NULL,16),(65,'Low Quality',NULL,NULL,16),(66,'Default',NULL,NULL,17),(67,'Live TV',NULL,NULL,17),(68,'High Quality',NULL,NULL,17),(69,'Low Quality',NULL,NULL,17); /*!40000 ALTER TABLE `recordingprofiles` ENABLE KEYS */; UNLOCK TABLES; @@ -2367,15 +1973,16 @@ DROP TABLE IF EXISTS `recordmatch`; /*!40101 SET @saved_cs_client = @@character_set_client */; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `recordmatch` ( - `recordid` int(10) unsigned DEFAULT NULL, - `chanid` int(10) unsigned DEFAULT NULL, - `starttime` datetime DEFAULT NULL, - `manualid` int(10) unsigned DEFAULT NULL, + `recordid` int(10) unsigned NOT NULL, + `chanid` int(10) unsigned NOT NULL, + `starttime` datetime NOT NULL, + `manualid` int(10) unsigned NOT NULL, `oldrecduplicate` tinyint(1) DEFAULT NULL, `recduplicate` tinyint(1) DEFAULT NULL, `findduplicate` tinyint(1) DEFAULT NULL, `oldrecstatus` int(11) DEFAULT NULL, - KEY `recordid` (`recordid`) + UNIQUE KEY `recordid` (`recordid`,`chanid`,`starttime`), + KEY `chanid` (`chanid`,`starttime`,`manualid`) ) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; @@ -2389,45 +1996,6 @@ LOCK TABLES `recordmatch` WRITE; UNLOCK TABLES; -- --- Table structure for table `romdb` --- - -DROP TABLE IF EXISTS `romdb`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `romdb` ( - `crc` varchar(64) NOT NULL DEFAULT '', - `name` varchar(128) NOT NULL DEFAULT '', - `description` varchar(128) NOT NULL DEFAULT '', - `category` varchar(128) NOT NULL DEFAULT '', - `year` varchar(10) NOT NULL DEFAULT '', - `manufacturer` varchar(128) NOT NULL DEFAULT '', - `country` varchar(128) NOT NULL DEFAULT '', - `publisher` varchar(128) NOT NULL DEFAULT '', - `platform` varchar(64) NOT NULL DEFAULT '', - `filesize` int(12) DEFAULT NULL, - `flags` varchar(64) NOT NULL DEFAULT '', - `version` varchar(64) NOT NULL DEFAULT '', - `binfile` varchar(64) NOT NULL DEFAULT '', - KEY `crc` (`crc`), - KEY `year` (`year`), - KEY `category` (`category`), - KEY `name` (`name`), - KEY `description` (`description`), - KEY `platform` (`platform`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `romdb` --- - -LOCK TABLES `romdb` WRITE; -/*!40000 ALTER TABLE `romdb` DISABLE KEYS */; -/*!40000 ALTER TABLE `romdb` ENABLE KEYS */; -UNLOCK TABLES; - --- -- Table structure for table `schemalock` -- @@ -2436,7 +2004,7 @@ DROP TABLE IF EXISTS `schemalock`; /*!40101 SET character_set_client = utf8 */; CREATE TABLE `schemalock` ( `schemalock` int(1) DEFAULT NULL -) ENGINE=MyISAM DEFAULT CHARSET=latin1; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2469,7 +2037,7 @@ CREATE TABLE `settings` ( LOCK TABLES `settings` WRITE; /*!40000 ALTER TABLE `settings` DISABLE KEYS */; -INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES ('mythfilldatabaseLastRunStart','',NULL),('mythfilldatabaseLastRunEnd','',NULL),('mythfilldatabaseLastRunStatus','',NULL),('DataDirectMessage','',NULL),('HaveRepeats','0',NULL),('DBSchemaVer','1264',NULL),('DefaultTranscoder','0',NULL),('MythFillSuggestedRunTime','1970-01-01T00:00:00',NULL),('MythFillGrabberSuggestsTime','1',NULL),('MythFillFixProgramIDsHasRunOnce','1','larch5'),('Language','EN_US','larch5'),('BackendServerIP','127.0.0.1','larch5'),('BackendServerPort','6543','larch5'),('BackendStatusPort','6544','larch5'),('SecurityPin','','larch5'),('MasterServerIP','127.0.0.1',NULL),('MasterServerPort','6543',NULL),('TVFormat','NTSC',NULL),('VbiFormat','None',NULL),('FreqTable','us-bcast',NULL),('TimeOffset','None',NULL),('MasterBackendOverride','1',NULL),('DeletesFollowLinks','1',NULL),('TruncateDeletesSlowly','0','larch5'),('HDRingbufferSize','9400',NULL),('MiscStatusScript','','larch5'),('DisableFirewireReset','0','larch5'),('EITTransportTimeout','5',NULL),('EITIgnoresSource','0',NULL),('EITCrawIdleStart','60',NULL),('startupCommand','',NULL),('blockSDWUwithoutClient','1',NULL),('idleWaitForRecordingTime','15',NULL),('StartupSecsBeforeRecording','120',NULL),('WakeupTimeFormat','hh:mm yyyy-MM-dd',NULL),('SetWakeuptimeCommand','',NULL),('ServerHaltCommand','sudo /sbin/halt -p',NULL),('preSDWUCheckCommand','',NULL),('WOLbackendConnectRetry','5',NULL),('WOLbackendCommand','',NULL),('WOLslaveBackendsCommand','',NULL),('JobQueueMaxSimultaneousJobs','1','larch5'),('JobQueueCheckFrequency','60','larch5'),('JobQueueWindowStart','00:00','larch5'),('JobQueueWindowEnd','23:59','larch5'),('JobQueueCPU','0','larch5'),('JobAllowCommFlag','1','larch5'),('JobAllowTranscode','1','larch5'),('JobAllowUserJob1','0','larch5'),('JobAllowUserJob2','0','larch5'),('JobAllowUserJob3','0','larch5'),('JobAllowUserJob4','0','larch5'),('JobsRunOnRecordHost','0',NULL),('AutoCommflagWhileRecording','0',NULL),('JobQueueCommFlagCommand','mythcommflag',NULL),('JobQueueTranscodeCommand','mythtranscode',NULL),('AutoTranscodeBeforeAutoCommflag','0',NULL),('SaveTranscoding','0',NULL),('UserJobDesc1','User Job #1',NULL),('UserJob1','',NULL),('UserJobDesc2','User Job #2',NULL),('UserJob2','',NULL),('UserJobDesc3','User Job #3',NULL),('UserJob3','',NULL),('UserJobDesc4','User Job #4',NULL),('UserJob4','',NULL),('DefaultVideoPlaybackProfile','CPU+','larch5'),('RealtimePriority','1','larch5'),('DecodeExtraAudio','1','larch5'),('AudioNag','1','larch5'),('UseVideoTimebase','0','larch5'),('ClearSavedPosition','1','larch5'),('AltClearSavedPosition','1','larch5'),('JumpToProgramOSD','1','larch5'),('ContinueEmbeddedTVPlay','0','larch5'),('AutomaticSetWatched','0','larch5'),('AlwaysStreamFiles','1','larch5'),('UseOpenGLVSync','0','larch5'),('UseOutputPictureControls','1','larch5'),('AspectOverride','0','larch5'),('AdjustFill','0','larch5'),('LetterboxColour','0','larch5'),('PIPLocation','0','larch5'),('PlaybackExitPrompt','2','larch5'),('EndOfRecordingExitPrompt','1','larch5'),('PlayBoxOrdering','1','larch5'),('PlayBoxEpisodeSort','Date','larch5'),('GeneratePreviewPixmaps','0','larch5'),('PreviewPixmapOffset','64',NULL),('PreviewFromBookmark','1','larch5'),('PlaybackPreview','1','larch5'),('PlaybackBoxStartInTitle','1','larch5'),('ShowGroupInfo','0','larch5'),('DisplayRecGroup','All Programs','larch5'),('QueryInitialFilter','0','larch5'),('RememberRecGroup','1','larch5'),('DispRecGroupAsAllProg','0','larch5'),('LiveTVInAllPrograms','0','larch5'),('DisplayGroupDefaultView','0','larch5'),('DisplayGroupTitleSort','0','larch5'),('PlaybackWatchList','1','larch5'),('PlaybackWLStart','0','larch5'),('PlaybackWLAutoExpire','0','larch5'),('PlaybackWLMaxAge','60','larch5'),('PlaybackWLBlackOut','2','larch5'),('SmartForward','0','larch5'),('StickyKeys','0','larch5'),('FFRewReposTime','100','larch5'),('FFRewReverse','1','larch5'),('ExactSeeking','0','larch5'),('AutoCommercialSkip','0','larch5'),('MaximumCommercialSkip','3600',NULL),('CommSkipAllBlanks','1',NULL),('PVR350OutputEnable','0','larch5'),('PVR350EPGAlphaValue','164','larch5'),('PVR350InternalAudioOnly','0','larch5'),('OSDTheme','blueosd','larch5'),('OSDGeneralTimeout','2','larch5'),('OSDProgramInfoTimeout','3','larch5'),('OSDFont','FreeMono.ttf','larch5'),('OSDThemeFontSizeType','default','larch5'),('EnableMHEG','0','larch5'),('PersistentBrowseMode','1','larch5'),('OSDNotifyTimeout','5','larch5'),('UDPNotifyPort','6948','larch5'),('OSDCCFont','FreeMono.ttf','larch5'),('CCBackground','0','larch5'),('DefaultCCMode','0','larch5'),('Prefer708Captions','1','larch5'),('OSDCC708TextZoom','100','larch5'),('OSDCC708DefaultFontType','MonoSerif','larch5'),('OSDCC708MonoSerifFont','FreeMono.ttf','larch5'),('OSDCC708PropSerifFont','FreeMono.ttf','larch5'),('OSDCC708MonoSansSerifFont','FreeMono.ttf','larch5'),('OSDCC708PropSansSerifFont','FreeMono.ttf','larch5'),('OSDCC708CasualFont','FreeMono.ttf','larch5'),('OSDCC708CursiveFont','FreeMono.ttf','larch5'),('OSDCC708CapitalsFont','FreeMono.ttf','larch5'),('OSDCC708MonoSerifItalicFont','FreeMono.ttf','larch5'),('OSDCC708PropSerifItalicFont','FreeMono.ttf','larch5'),('OSDCC708MonoSansSerifItalicFont','FreeMono.ttf','larch5'),('OSDCC708PropSansSerifItalicFont','FreeMono.ttf','larch5'),('OSDCC708CasualItalicFont','FreeMono.ttf','larch5'),('OSDCC708CursiveItalicFont','FreeMono.ttf','larch5'),('OSDCC708CapitalsItalicFont','FreeMono.ttf','larch5'),('ChannelOrdering','channum','larch5'),('ChannelFormat','<num> <sign>','larch5'),('LongChannelFormat','<num> <name>','larch5'),('SmartChannelChange','0','larch5'),('LastFreeCard','0',NULL),('LiveTVPriority','0',NULL),('AutoExpireMethod','2',NULL),('AutoExpireDefault','1',NULL),('RerecordWatched','1',NULL),('AutoExpireWatchedPriority','0',NULL),('AutoExpireLiveTVMaxAge','1',NULL),('AutoExpireDayPriority','3',NULL),('AutoExpireExtraSpace','1',NULL),('AutoExpireInsteadOfDelete','0',NULL),('DeletedFifoOrder','0',NULL),('CommercialSkipMethod','7',NULL),('AggressiveCommDetect','1',NULL),('AutoCommercialFlag','1',NULL),('AutoTranscode','0',NULL),('AutoRunUserJob1','0',NULL),('AutoRunUserJob2','0',NULL),('AutoRunUserJob3','0',NULL),('AutoRunUserJob4','0',NULL),('OverTimeCategory','category name',NULL),('CategoryOverTime','30',NULL),('EPGFillType','12','larch5'),('EPGShowCategoryColors','1','larch5'),('EPGShowCategoryText','1','larch5'),('EPGScrollType','1','larch5'),('EPGShowChannelIcon','1','larch5'),('EPGShowFavorites','0','larch5'),('WatchTVGuide','0','larch5'),('chanPerPage','5','larch5'),('timePerPage','4','larch5'),('UnknownTitle','Unknown','larch5'),('UnknownCategory','Unknown','larch5'),('DefaultTVChannel','3','larch5'),('SelectChangesChannel','0','larch5'),('SelChangeRecThreshold','16','larch5'),('EPGEnableJumpToChannel','0',NULL),('Theme','LinHES','larch5'),('RandomTheme','0','larch5'),('ThemeCacheSize','1','larch5'),('ThemePainter','qt','larch5'),('Style','Desktop Style','larch5'),('ThemeFontSizeType','default','larch5'),('MenuTheme','default','larch5'),('XineramaScreen','0','larch5'),('XineramaMonitorAspectRatio','1.3333','larch5'),('GuiSizeForTV','1','larch5'),('HideMouseCursor','1','larch5'),('RunFrontendInWindow','0','larch5'),('UseVideoModes','0','larch5'),('GuiVidModeResolution','640x480','larch5'),('TVVidModeResolution','320x200','larch5'),('TVVidModeForceAspect','0.0','larch5'),('TVVidModeResolution0','320x200','larch5'),('TVVidModeForceAspect0','0.0','larch5'),('TVVidModeResolution1','320x200','larch5'),('TVVidModeForceAspect1','0.0','larch5'),('TVVidModeResolution2','320x200','larch5'),('TVVidModeForceAspect2','0.0','larch5'),('ISO639Language0','eng',NULL),('ISO639Language1','eng',NULL),('DateFormat','ddd MMM d','larch5'),('ShortDateFormat','M/d','larch5'),('TimeFormat','h:mm AP','larch5'),('QtFontSmall','12','larch5'),('QtFontMedium','16','larch5'),('QtFontBig','25','larch5'),('PlayBoxTransparency','1','larch5'),('PlayBoxShading','0','larch5'),('UseVirtualKeyboard','1','larch5'),('LCDEnable','0','larch5'),('LCDShowTime','1','larch5'),('LCDShowMenu','1','larch5'),('LCDShowMusic','1','larch5'),('LCDShowMusicItems','ArtistTitle','larch5'),('LCDShowChannel','1','larch5'),('LCDShowRecStatus','0','larch5'),('LCDShowVolume','1','larch5'),('LCDShowGeneric','1','larch5'),('LCDBacklightOn','1','larch5'),('LCDHeartBeatOn','0','larch5'),('LCDBigClock','0','larch5'),('LCDKeyString','ABCDEF','larch5'),('LCDPopupTime','5','larch5'),('AudioOutputDevice','ALSA:default','larch5'),('PassThruOutputDevice','Default','larch5'),('MaxChannels','2','larch5'),('AudioUpmixType','0','larch5'),('AC3PassThru','0','larch5'),('DTSPassThru','0','larch5'),('AggressiveSoundcardBuffer','0','larch5'),('MythControlsVolume','1','larch5'),('MixerDevice','ALSA:default','larch5'),('MixerControl','PCM','larch5'),('MasterMixerVolume','100','larch5'),('PCMMixerVolume','50','larch5'),('IndividualMuteControl','0','larch5'),('LircKeyPressedApp','','larch5'),('AllowQuitShutdown','4','larch5'),('NoPromptOnExit','1','larch5'),('UseArrowAccels','1','larch5'),('NetworkControlEnabled','0','larch5'),('NetworkControlPort','6546','larch5'),('MonitorDrives','0','larch5'),('MediaChangeEvents','0','larch5'),('IgnoreDevices','','larch5'),('SetupPinCodeRequired','0','larch5'),('OverrideExitMenu','3','larch5'),('HaltCommand','sudo /sbin/halt','larch5'),('RebootCommand','sudo /sbin/reboot','larch5'),('EnableXbox','0','larch5'),('LogEnabled','0',NULL),('LogMaxCount','100','larch5'),('LogPrintLevel','8','larch5'),('LogCleanEnabled','0','larch5'),('LogCleanPeriod','14','larch5'),('LogCleanDays','14','larch5'),('LogCleanMax','30','larch5'),('MythFillEnabled','1',NULL),('MythFillDatabasePath','mythfilldatabase',NULL),('MythFillDatabaseArgs','',NULL),('MythFillDatabaseLog','',NULL),('MythFillPeriod','1',NULL),('MythFillMinHour','2',NULL),('MythFillMaxHour','5',NULL),('SchedMoveHigher','1',NULL),('SchedOpenEnd','0',NULL),('ComplexPriority','0',NULL),('PrefInputPriority','2',NULL),('SingleRecordRecPriority','1',NULL),('FindOneRecordRecPriority','-1',NULL),('ArchiveDBSchemaVer','1005',NULL),('MythArchiveTempDir','/myth/tmp','larch5'),('MythArchiveShareDir','/usr/share/mythtv/mytharchive/','larch5'),('MythArchiveVideoFormat','NTSC','larch5'),('MythArchiveFileFilter','*.mpg *.mov *.avi *.mpeg *.nuv','larch5'),('MythArchiveDVDLocation','/dev/dvd','larch5'),('MythArchiveDVDPlayerCmd','Internal','larch5'),('MythArchiveEncodeToAc3','0','larch5'),('MythArchiveCopyRemoteFiles','0','larch5'),('MythArchiveAlwaysUseMythTranscode','1','larch5'),('MythArchiveUseProjectX','0','larch5'),('MythArchiveAddSubtitles','0','larch5'),('MythArchiveUseFIFO','1','larch5'),('MythArchiveDefaultEncProfile','SP','larch5'),('MythArchiveMainMenuAR','16:9','larch5'),('MythArchiveChapterMenuAR','Video','larch5'),('MythArchiveDateFormat','%a %b %d','larch5'),('MythArchiveTimeFormat','%I:%M %p','larch5'),('MythArchiveFfmpegCmd','ffmpeg','larch5'),('MythArchiveMplexCmd','mplex','larch5'),('MythArchiveDvdauthorCmd','dvdauthor','larch5'),('MythArchiveSpumuxCmd','spumux','larch5'),('MythArchiveMpeg2encCmd','mpeg2enc','larch5'),('MythArchiveMkisofsCmd','mkisofs','larch5'),('MythArchiveGrowisofsCmd','growisofs','larch5'),('MythArchiveTcrequantCmd','tcrequant','larch5'),('MythArchiveJpeg2yuvCmd','jpeg2yuv','larch5'),('MythArchiveProjectXCmd','projectx','larch5'),('FlixDBSchemaVer','1004',NULL),('GalleryDBSchemaVer','1003',NULL),('GalleryDir','/myth/gallery','larch5'),('GalleryThumbnailLocation','1','larch5'),('GallerySortOrder','20','larch5'),('GalleryImportDirs','/mnt/cdrom:/mnt/camera','larch5'),('GalleryMoviePlayerCmd','Internal','larch5'),('SlideshowUseOpenGL','0','larch5'),('SlideshowDelay','5','larch5'),('SlideshowOpenGLTransition','none','larch5'),('SlideshowOpenGLTransitionLength','2000','larch5'),('SlideshowTransition','random','larch5'),('SlideshowBackground','black','larch5'),('GameDBSchemaVer','1017',NULL),('MusicDBSchemaVer','1017',NULL),('VisualMode','','larch5'),('MusicLocation','/myth/music/','larch5'),('MusicAudioDevice','default','larch5'),('CDDevice','/dev/cdrom','larch5'),('AutoLookupCD','1','larch5'),('AutoPlayCD','0','larch5'),('KeyboardAccelerators','1','larch5'),('TreeLevels','splitartist artist album title','larch5'),('ArtistTreeGroups','0','larch5'),('NonID3FileNameFormat','GENRE/ARTIST/ALBUM/TRACK_TITLE','larch5'),('Ignore_ID3','0','larch5'),('MusicTagEncoding','utf16','larch5'),('CDWriterEnabled','1','larch5'),('CDDiskSize','1','larch5'),('CDCreateDir','1','larch5'),('CDWriteSpeed','0','larch5'),('CDBlankType','fast','larch5'),('PlayMode','none','larch5'),('ResumeMode','off','larch5'),('MaxSearchResults','300','larch5'),('MusicShowRatings','0','larch5'),('ShowWholeTree','0','larch5'),('ListAsShuffled','0','larch5'),('IntelliRatingWeight','35','larch5'),('IntelliPlayCountWeight','25','larch5'),('IntelliLastPlayWeight','25','larch5'),('IntelliRandomWeight','15','larch5'),('VisualCycleOnSongChange','0','larch5'),('VisualAlbumArtOnSongChange','0','larch5'),('VisualRandomize','0','larch5'),('VisualModeDelay','0','larch5'),('VisualScaleWidth','1','larch5'),('VisualScaleHeight','1','larch5'),('ParanoiaLevel','Full','larch5'),('FilenameTemplate','ARTIST/ALBUM/TRACK-TITLE','larch5'),('NoWhitespace','0','larch5'),('PostCDRipScript','','larch5'),('EjectCDAfterRipping','1','larch5'),('EncoderType','ogg','larch5'),('DefaultRipQuality','1','larch5'),('Mp3UseVBR','0','larch5'),('PhoneDBSchemaVer','1001',NULL),('SipRegisterWithProxy','1','larch5'),('SipProxyName','fwd.pulver.com','larch5'),('SipProxyAuthName','','larch5'),('SipProxyAuthPassword','','larch5'),('MySipName','Me','larch5'),('SipAutoanswer','0','larch5'),('SipBindInterface','eth0','larch5'),('SipLocalPort','5060','larch5'),('NatTraversalMethod','None','larch5'),('NatIpAddress','http://checkip.dyndns.org','larch5'),('AudioLocalPort','21232','larch5'),('VideoLocalPort','21234','larch5'),('MicrophoneDevice','None','larch5'),('CodecPriorityList','GSM;G.711u;G.711a','larch5'),('PlayoutAudioCall','40','larch5'),('PlayoutVideoCall','110','larch5'),('TxResolution','176x144','larch5'),('TransmitFPS','5','larch5'),('TransmitBandwidth','256','larch5'),('CaptureResolution','352x288','larch5'),('TimeToAnswer','10','larch5'),('DefaultVxmlUrl','http://127.0.0.1/vxml/index.vxml','larch5'),('DefaultVoicemailPrompt','I am not at home, please leave a message after the tone','larch5'),('mythvideo.DBSchemaVer','1038',NULL),('VideoStartupDir','/myth/video','larch5'),('VideoArtworkDir','/myth/video_stuff/coverart','larch5'),('Default MythVideo View','2','larch5'),('VideoListUnknownFiletypes','1','larch5'),('VideoBrowserNoDB','1','larch5'),('VideoGalleryNoDB','1','larch5'),('VideoTreeNoDB','1','larch5'),('VideoTreeLoadMetaData','1','larch5'),('VideoNewBrowsable','1','larch5'),('mythvideo.sort_ignores_case','1','larch5'),('mythvideo.db_folder_view','1','larch5'),('mythvideo.VideoTreeRemember','1','larch5'),('mythvideo.ImageCacheSize','50','larch5'),('DVDDeviceLocation','/dev/dvd','larch5'),('VCDDeviceLocation','/dev/cdrom','larch5'),('DVDOnInsertDVD','1','larch5'),('DVDDriveSpeed','2','larch5'),('EnableDVDBookmark','1','larch5'),('DVDBookmarkPrompt','1','larch5'),('DVDBookmarkDays','10','larch5'),('mythvideo.fanartDir','/myth/video_stuff/fanart','larch5'),('mythvideo.screenshotDir','/myth/video_stuff/screenshots','larch5'),('mythvideo.bannerDir','/myth/video_stuff/banners','larch5'),('VideoGalleryColsPerPage','4','larch5'),('VideoGalleryRowsPerPage','3','larch5'),('VideoGallerySubtitle','1','larch5'),('VideoDefaultParentalLevel','4','larch5'),('VideoAggressivePC','0','larch5'),('mythvideo.ParentalLevelFromRating','0','larch5'),('mythvideo.AutoR2PL1','G','larch5'),('mythvideo.AutoR2PL2','PG','larch5'),('mythvideo.AutoR2PL3','PG-13','larch5'),('mythvideo.AutoR2PL4','R:NC-17','larch5'),('VideoDefaultPlayer','Internal','larch5'),('mythdvd.DVDPlayerCommand','Internal','larch5'),('VCDPlayerCommand','mplayer vcd:// -cdrom-device %d -fs -zoom -vo xv','larch5'),('DVDRipLocation','/myth/tmp','larch5'),('TitlePlayCommand','Internal','larch5'),('SubTitleCommand','-sid %s','larch5'),('TranscodeCommand','transcode','larch5'),('MTDPort','2442','larch5'),('MTDNiceLevel','20','larch5'),('MTDConcurrentTranscodes','1','larch5'),('MTDLogFlag','0','larch5'),('MTDac3Flag','0','larch5'),('MTDxvidFlag','1','larch5'),('mythvideo.TrustTranscodeFRDetect','1','larch5'),('WeatherDBSchemaVer','1004',NULL),('TVVidModeRefreshRate','0','larch5'),('TVVidModeRefreshRate0','0','larch5'),('TVVidModeRefreshRate1','0','larch5'),('TVVidModeRefreshRate2','0','larch5'),('GalleryRecursiveSlideshow','1','larch5'),('WebBrowserZoomLevel','20','larch5'),('WebBrowserCommand','Internal','larch5'),('WebBrowserScrollMode','1','larch5'),('WebBrowserScrollSpeed','4','larch5'),('WebBrowserHideScrollbars','0','larch5'),('RepeatMode','all','larch5'),('MusicAutoShowPlayer','1','larch5'),('HOSTOSsize','5','larch5'),('NetworkControlEnabled','1','larch5'),('Hostpluginmytharchive','1','larch5'),('Hostpluginmythbrowser','1','larch5'),('Hostpluginmythcontrols','1','larch5'),('Hostpluginmythflix','1','larch5'),('Hostpluginmythgallery','1','larch5'),('Hostpluginmythgame','1','larch5'),('HostpluginmythgameFceu','1','larch5'),('HostpluginmythgameMame','1','larch5'),('HostpluginmythgameZsnes','1','larch5'),('Hostpluginmythmovietime','1','larch5'),('Hostpluginmythmusic','1','larch5'),('Hostpluginmythnews','1','larch5'),('Hostpluginmythphone','1','larch5'),('Hostpluginmythsmolt','1','larch5'),('Hostpluginmythvideo','1','larch5'),('Hostpluginmythvideo_dvdcss','0','larch5'),('Hostpluginmythweather','1','larch5'),('HostAudiotype','ALSA','larch5'),('HostpluginmythgameZsnes','1','larch5'),('HostpluginmythgameMame','1','larch5'),('Hostpluginmythvideo_dvdcss','0','larch5'),('Hostpluginmythappletrailers','1','larch5'),('Hostpluginmythstream','1','larch5'),('Hostpluginmythvodka','1','larch5'),('HostMiro','1','larch5'),('HostpluginmythgameXE','1','larch5'),('HostpluginmythgameROMDB','1','larch5'),('HostXine','1','larch5'),('HOSTOSsize','5','larch5'),('HostMyhostname','larch5','larch5'),('NetworkControlEnabled','1','larch5'),('Hostaccessuser','1','larch5'),('WOLbackendReconnectWaitTime','5',NULL),('Hostbootsplash','0','larch5'),('HostIPeth0','192.168.1.177','larch5'),('HostNETMASKeth0','/24 255.255.255.0','larch5'),('HostGWeth0','192.168.1.1','larch5'),('HostDNSeth0','192.168.1.1','larch5'),('HostReceiverType','Hauppauge','larch5'),('HostRemoteType','no_remote','larch5'),('HOSTtemplatetype','Do Nothing','larch5'),('BackupDBLastRunStart','2010-11-29 17:02:26',NULL),('BackupDBLastRunEnd','2010-11-29 17:02:27',NULL),('StorageScheduler','Combination',NULL),('DisableAutomaticBackup','0',NULL),('BackendStopCommand','sudo sv stop mythbackend',NULL),('BackendStartCommand','sudo sv start mythbackend',NULL),('UPnP/WMPSource','0',NULL),('UPnP/RebuildDelay','30','larch5'),('GeneratePreviewRemotely','0','larch5'),('HWAccelPlaybackPreview','0','larch5'),('BrowseAllTuners','0','larch5'),('SubtitleCodec','UTF-8','larch5'),('ChannelGroupRememberLast','0','larch5'),('ChannelGroupDefault','-1','larch5'),('BrowseChannelGroup','0','larch5'),('UseFixedWindowSize','1','larch5'),('ScreenShotPath','/myth/video_stuff/screenshots','larch5'),('LircSocket','/var/run/lirc/lircd','larch5'),('BrowserDBSchemaVer','1002',NULL),('CDWriterDevice','default','larch5'),('MusicExitAction','prompt','larch5'),('mythvideo.db_group_view','1','larch5'),('mythvideo.db_group_type','0','larch5'),('MovieListCommandLine','/usr/share/mythtv/mythvideo/scripts/tmdb.pl -M','larch5'),('MoviePosterCommandLine','/usr/share/mythtv/mythvideo/scripts/tmdb.pl -P','larch5'),('MovieFanartCommandLine','/usr/share/mythtv/mythvideo/scripts/tmdb.pl -B','larch5'),('MovieDataCommandLine','/usr/share/mythtv/mythvideo/scripts/tmdb.pl -D','larch5'),('mythvideo.TrailersDir','/myth/video_stuff/trailers','larch5'),('mythvideo.TrailersRandomEnabled','1','larch5'),('mythvideo.TrailersRandomCount','3','larch5'),('mythvideo.TVListCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -M','larch5'),('mythvideo.TVPosterCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -P','larch5'),('mythvideo.TVFanartCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -F','larch5'),('mythvideo.TVBannerCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -B','larch5'),('mythvideo.TVDataCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -D','larch5'),('mythvideo.TVTitleSubCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -N','larch5'),('mythvideo.TVScreenshotCommandLine','/usr/share/mythtv/mythvideo/scripts/ttvdb.py -S','larch5'),('mythvideo.EnableAlternatePlayer','1','larch5'),('mythvideo.VideoAlternatePlayer','mplayer -fs -zoom -quiet -vo xv %s','larch5'),('AudioDefaultUpmix','1','larch5'),('AdvancedAudioSettings','0','larch5'),('SRCQualityOverride','0','larch5'),('SRCQuality','1','larch5'),('MusicDefaultUpmix','0','larch5'),('Country','US','larch5'),('OSDSubFont','FreeSans','larch5'),('CommFlagFast','0',NULL),('MultiChannelPCM','0','larch5'),('Audio48kOverride','0','larch5'),('PassThruDeviceOverride','0','larch5'),('MythArchiveM2VRequantiserCmd','M2VRequantiser','larch5'); +INSERT INTO `settings` (`value`, `data`, `hostname`) VALUES ('mythfilldatabaseLastRunStart','',NULL),('mythfilldatabaseLastRunEnd','',NULL),('mythfilldatabaseLastRunStatus','',NULL),('DataDirectMessage','',NULL),('HaveRepeats','0',NULL),('DBSchemaVer','1299',NULL),('DefaultTranscoder','0',NULL),('FreqTable','us-bcast',NULL),('ISO639Language0','eng',NULL),('ISO639Language1','eng',NULL),('TVFormat','NTSC',NULL),('VbiFormat','NTSC Closed Caption',NULL),('Country','US','apheleia'),('DateFormat','ddd MMM d yyyy','apheleia'),('Language','en_US','apheleia'),('MythArchiveDateFormat','%a %b %d %Y','apheleia'),('MythArchiveTimeFormat','%I:%M %p','apheleia'),('MythArchiveVideoFormat','NTSC','apheleia'),('ShortDateFormat','M/d','apheleia'),('TimeFormat','h:mm AP','apheleia'),('BackendServerIP','127.0.0.1','apheleia'),('BackendServerIP6','::1','apheleia'),('BackendServerPort','6543','apheleia'),('BackendStatusPort','6544','apheleia'),('MasterServerIP','127.0.0.1',NULL),('MasterServerPort','6543',NULL),('TimeOffset','None',NULL),('MasterBackendOverride','1',NULL),('DeletesFollowLinks','0',NULL),('TruncateDeletesSlowly','0','apheleia'),('HDRingbufferSize','9400',NULL),('StorageScheduler','BalancedFreeSpace',NULL),('UPnP/WMPSource','0',NULL),('DisableAutomaticBackup','0',NULL),('DisableFirewireReset','0','apheleia'),('EITTransportTimeout','5',NULL),('EITCrawIdleStart','60',NULL),('blockSDWUwithoutClient','1',NULL),('idleWaitForRecordingTime','15',NULL),('StartupSecsBeforeRecording','120',NULL),('WakeupTimeFormat','hh:mm yyyy-MM-dd',NULL),('ServerHaltCommand','sudo /sbin/halt -p',NULL),('WOLbackendConnectRetry','5',NULL),('BackendStopCommand','killall mythbackend',NULL),('BackendStartCommand','mythbackend',NULL),('JobQueueMaxSimultaneousJobs','1','apheleia'),('JobQueueCheckFrequency','60','apheleia'),('JobQueueWindowStart','00:00','apheleia'),('JobQueueWindowEnd','23:59','apheleia'),('JobQueueCPU','0','apheleia'),('JobAllowMetadata','1','apheleia'),('JobAllowCommFlag','1','apheleia'),('JobAllowTranscode','1','apheleia'),('JobAllowUserJob1','0','apheleia'),('JobAllowUserJob2','0','apheleia'),('JobAllowUserJob3','0','apheleia'),('JobAllowUserJob4','0','apheleia'),('JobsRunOnRecordHost','0',NULL),('AutoCommflagWhileRecording','0',NULL),('JobQueueCommFlagCommand','mythcommflag',NULL),('JobQueueTranscodeCommand','mythtranscode',NULL),('AutoTranscodeBeforeAutoCommflag','0',NULL),('SaveTranscoding','0',NULL),('UserJobDesc1','User Job #1',NULL),('UserJobDesc2','User Job #2',NULL),('UserJobDesc3','User Job #3',NULL),('UserJobDesc4','User Job #4',NULL),('MythFillEnabled','1',NULL),('MythFillDatabasePath','mythfilldatabase',NULL),('MythFillMaxHour','23',NULL),('MythFillGrabberSuggestsTime','1',NULL),('WOLbackendReconnectWaitTime','5',NULL); /*!40000 ALTER TABLE `settings` ENABLE KEYS */; UNLOCK TABLES; @@ -2488,7 +2056,7 @@ CREATE TABLE `storagegroup` ( PRIMARY KEY (`id`), UNIQUE KEY `grouphostdir` (`groupname`,`hostname`,`dirname`), KEY `hostname` (`hostname`) -) ENGINE=MyISAM AUTO_INCREMENT=2 DEFAULT CHARSET=utf8; +) ENGINE=MyISAM DEFAULT CHARSET=utf8; /*!40101 SET character_set_client = @saved_cs_client */; -- @@ -2497,7 +2065,6 @@ CREATE TABLE `storagegroup` ( LOCK TABLES `storagegroup` WRITE; /*!40000 ALTER TABLE `storagegroup` DISABLE KEYS */; -INSERT INTO `storagegroup` (`id`, `groupname`, `hostname`, `dirname`) VALUES (1,'Default','larch5','/myth/tv/'); /*!40000 ALTER TABLE `storagegroup` ENABLE KEYS */; UNLOCK TABLES; @@ -2640,6 +2207,45 @@ LOCK TABLES `videocategory` WRITE; UNLOCK TABLES; -- +-- Table structure for table `videocollection` +-- + +DROP TABLE IF EXISTS `videocollection`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videocollection` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `title` varchar(256) NOT NULL, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', + `plot` text, + `network` varchar(128) DEFAULT NULL, + `collectionref` varchar(128) NOT NULL, + `certification` varchar(128) DEFAULT NULL, + `genre` varchar(128) DEFAULT '', + `releasedate` date DEFAULT NULL, + `language` varchar(10) DEFAULT NULL, + `status` varchar(64) DEFAULT NULL, + `rating` float DEFAULT '0', + `ratingcount` int(10) DEFAULT '0', + `runtime` smallint(5) unsigned DEFAULT '0', + `banner` text, + `fanart` text, + `coverart` text, + PRIMARY KEY (`intid`), + KEY `title` (`title`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `videocollection` +-- + +LOCK TABLES `videocollection` WRITE; +/*!40000 ALTER TABLE `videocollection` DISABLE KEYS */; +/*!40000 ALTER TABLE `videocollection` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `videocountry` -- @@ -2702,11 +2308,13 @@ CREATE TABLE `videometadata` ( `plot` text, `rating` varchar(128) NOT NULL, `inetref` varchar(255) NOT NULL, + `collectionref` int(10) NOT NULL DEFAULT '-1', `homepage` text NOT NULL, `year` int(10) unsigned NOT NULL, `releasedate` date NOT NULL, `userrating` float NOT NULL, `length` int(10) unsigned NOT NULL, + `playcount` int(10) NOT NULL DEFAULT '0', `season` smallint(5) unsigned NOT NULL DEFAULT '0', `episode` smallint(5) unsigned NOT NULL DEFAULT '0', `showlevel` int(10) unsigned NOT NULL, @@ -2725,6 +2333,7 @@ CREATE TABLE `videometadata` ( `banner` text, `fanart` text, `insertdate` timestamp NULL DEFAULT CURRENT_TIMESTAMP, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', PRIMARY KEY (`intid`), KEY `director` (`director`), KEY `title` (`title`) @@ -2814,6 +2423,32 @@ LOCK TABLES `videometadatagenre` WRITE; UNLOCK TABLES; -- +-- Table structure for table `videopathinfo` +-- + +DROP TABLE IF EXISTS `videopathinfo`; +/*!40101 SET @saved_cs_client = @@character_set_client */; +/*!40101 SET character_set_client = utf8 */; +CREATE TABLE `videopathinfo` ( + `intid` int(10) unsigned NOT NULL AUTO_INCREMENT, + `path` text, + `contenttype` set('MOVIE','TELEVISION','ADULT','MUSICVIDEO','HOMEVIDEO') NOT NULL DEFAULT '', + `collectionref` int(10) DEFAULT '0', + `recurse` tinyint(1) DEFAULT '0', + PRIMARY KEY (`intid`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8; +/*!40101 SET character_set_client = @saved_cs_client */; + +-- +-- Dumping data for table `videopathinfo` +-- + +LOCK TABLES `videopathinfo` WRITE; +/*!40000 ALTER TABLE `videopathinfo` DISABLE KEYS */; +/*!40000 ALTER TABLE `videopathinfo` ENABLE KEYS */; +UNLOCK TABLES; + +-- -- Table structure for table `videosource` -- @@ -2868,121 +2503,9 @@ CREATE TABLE `videotypes` ( LOCK TABLES `videotypes` WRITE; /*!40000 ALTER TABLE `videotypes` DISABLE KEYS */; -INSERT INTO `videotypes` (`intid`, `extension`, `playcommand`, `f_ignore`, `use_default`) VALUES (1,'txt','',1,0),(2,'log','',1,0),(3,'mpg','Internal',0,0),(4,'avi','',0,1),(5,'vob','Internal',0,0),(6,'mpeg','Internal',0,0),(8,'iso','Internal',0,0),(9,'img','Internal',0,0),(10,'mkv','Internal',0,1),(11,'mp4','Internal',0,0),(12,'m2ts','Internal',0,0),(13,'evo','Internal',0,0),(14,'divx','Internal',0,0),(15,'mov','Internal',0,0),(16,'qt','Internal',0,0),(17,'wmv','Internal',0,0),(18,'3gp','Internal',0,0),(19,'asf','Internal',0,0),(20,'ogg','Internal',0,0),(21,'ogm','Internal',0,0),(22,'flv','Internal',0,0),(23,'ogv','Internal',0,0),(25,'nut','Internal',0,0),(26,'mxf','Internal',0,0),(27,'m4v','Internal',0,0),(28,'rm','Internal',0,0),(29,'ts','Internal',0,0),(30,'swf','Internal',0,0),(31,'f4v','Internal',0,0),(32,'nuv','Internal',0,0); +INSERT INTO `videotypes` (`intid`, `extension`, `playcommand`, `f_ignore`, `use_default`) VALUES (1,'txt','',1,0),(2,'log','',1,0),(3,'mpg','Internal',0,0),(4,'avi','',0,1),(5,'vob','Internal',0,0),(6,'mpeg','Internal',0,0),(8,'iso','Internal',0,0),(9,'img','Internal',0,0),(10,'mkv','Internal',0,0),(11,'mp4','Internal',0,0),(12,'m2ts','Internal',0,0),(13,'evo','Internal',0,0),(14,'divx','Internal',0,0),(15,'mov','Internal',0,0),(16,'qt','Internal',0,0),(17,'wmv','Internal',0,0),(18,'3gp','Internal',0,0),(19,'asf','Internal',0,0),(20,'ogg','Internal',0,0),(21,'ogm','Internal',0,0),(22,'flv','Internal',0,0),(23,'ogv','Internal',0,0),(25,'nut','Internal',0,0),(26,'mxf','Internal',0,0),(27,'m4v','Internal',0,0),(28,'rm','Internal',0,0),(29,'ts','Internal',0,0),(30,'swf','Internal',0,0),(31,'f4v','Internal',0,0),(32,'nuv','Internal',0,0); /*!40000 ALTER TABLE `videotypes` ENABLE KEYS */; UNLOCK TABLES; - --- --- Table structure for table `weatherdatalayout` --- - -DROP TABLE IF EXISTS `weatherdatalayout`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `weatherdatalayout` ( - `location` varchar(64) NOT NULL, - `dataitem` varchar(64) NOT NULL, - `weatherscreens_screen_id` int(10) unsigned NOT NULL, - `weathersourcesettings_sourceid` int(10) unsigned NOT NULL, - PRIMARY KEY (`location`,`dataitem`,`weatherscreens_screen_id`,`weathersourcesettings_sourceid`), - KEY `weatherdatalayout_FKIndex1` (`weatherscreens_screen_id`), - KEY `weatherdatalayout_FKIndex2` (`weathersourcesettings_sourceid`), - CONSTRAINT `weatherdatalayout_ibfk_1` FOREIGN KEY (`weatherscreens_screen_id`) REFERENCES `weatherscreens` (`screen_id`) ON DELETE CASCADE ON UPDATE CASCADE, - CONSTRAINT `weatherdatalayout_ibfk_2` FOREIGN KEY (`weathersourcesettings_sourceid`) REFERENCES `weathersourcesettings` (`sourceid`) ON UPDATE CASCADE -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `weatherdatalayout` --- - -LOCK TABLES `weatherdatalayout` WRITE; -/*!40000 ALTER TABLE `weatherdatalayout` DISABLE KEYS */; -/*!40000 ALTER TABLE `weatherdatalayout` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `weatherscreens` --- - -DROP TABLE IF EXISTS `weatherscreens`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `weatherscreens` ( - `screen_id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `draworder` int(10) unsigned NOT NULL, - `container` varchar(64) NOT NULL, - `hostname` varchar(64) DEFAULT NULL, - `units` tinyint(3) unsigned NOT NULL, - PRIMARY KEY (`screen_id`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `weatherscreens` --- - -LOCK TABLES `weatherscreens` WRITE; -/*!40000 ALTER TABLE `weatherscreens` DISABLE KEYS */; -/*!40000 ALTER TABLE `weatherscreens` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `weathersourcesettings` --- - -DROP TABLE IF EXISTS `weathersourcesettings`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `weathersourcesettings` ( - `sourceid` int(10) unsigned NOT NULL AUTO_INCREMENT, - `source_name` varchar(64) NOT NULL, - `update_timeout` int(10) unsigned NOT NULL DEFAULT '600', - `retrieve_timeout` int(10) unsigned NOT NULL DEFAULT '60', - `hostname` varchar(64) DEFAULT NULL, - `path` varchar(255) DEFAULT NULL, - `author` varchar(128) DEFAULT NULL, - `version` varchar(32) DEFAULT NULL, - `email` varchar(255) DEFAULT NULL, - `types` mediumtext, - `updated` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP, - PRIMARY KEY (`sourceid`) -) ENGINE=InnoDB DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `weathersourcesettings` --- - -LOCK TABLES `weathersourcesettings` WRITE; -/*!40000 ALTER TABLE `weathersourcesettings` DISABLE KEYS */; -/*!40000 ALTER TABLE `weathersourcesettings` ENABLE KEYS */; -UNLOCK TABLES; - --- --- Table structure for table `websites` --- - -DROP TABLE IF EXISTS `websites`; -/*!40101 SET @saved_cs_client = @@character_set_client */; -/*!40101 SET character_set_client = utf8 */; -CREATE TABLE `websites` ( - `id` int(10) unsigned NOT NULL AUTO_INCREMENT, - `category` varchar(100) NOT NULL, - `name` varchar(100) NOT NULL, - `url` varchar(255) NOT NULL, - PRIMARY KEY (`id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8; -/*!40101 SET character_set_client = @saved_cs_client */; - --- --- Dumping data for table `websites` --- - -LOCK TABLES `websites` WRITE; -/*!40000 ALTER TABLE `websites` DISABLE KEYS */; -/*!40000 ALTER TABLE `websites` ENABLE KEYS */; -UNLOCK TABLES; /*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */; /*!40101 SET SQL_MODE=@OLD_SQL_MODE */; @@ -2993,4 +2516,4 @@ UNLOCK TABLES; /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */; /*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */; --- Dump completed on 2010-11-29 17:03:00 +-- Dump completed on 2012-08-22 15:37:35 diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml b/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml new file mode 100755 index 0000000..df0598b --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/bpopup-ui.xml @@ -0,0 +1,164 @@ +<!-- + + This is a myth style theme file for mythwelcome + + (c) 2005 by a whole bunch of people associated with MythTV + +--> +<mythuitheme> + + <window name="welcome_screen"> + + <!-- + + First, define all the fonts we need on this screen + + --> + <font name="title" face="Arial"> + <color>#ffff00</color> + <dropcolor>#000000</dropcolor> + <size>24</size> + <shadow>3,3</shadow> + <bold>yes</bold> + </font> + + <font name="time" face="Arial"> + <color>#9999cc</color> + <size>18</size> + <bold>yes</bold> + </font> + + <font name="label" face="Arial"> + <color>#ffff00</color> + <dropcolor>#000000</dropcolor> + <size>18</size> + <shadow>3,3</shadow> + <bold>yes</bold> + </font> + + <font name="info" face="Arial"> + <color>#ffffff</color> + <size>18</size> + <bold>yes</bold> + </font> + + <font name="biginfo" face="Arial"> + <color>#ffffff</color> + <size>50</size> + <bold>yes</bold> + </font> + <font name="warning" face="Arial"> + <color>#ff0000</color> + <dropcolor>#000000</dropcolor> + <size>16</size> + <shadow>2,2</shadow> + <bold>yes</bold> + </font> + + <font name="buttons" face="Arial"> + <color>#ffff00</color> + <size>14</size> + <bold>yes</bold> + </font> + + <container name="main_display"> + <area>0,0,800,600</area> + + <textarea name="title" draworder="0" align="center"> + <multiline>no</multiline> + <font>title</font> + <area>50,40,700,40</area> + <value></value> + </textarea> + + <!-- + time + --> + <textarea name="time_text" draworder="0" align="right"> + <multiline>no</multiline> + <font>time</font> + <area>660,520,110,30</area> + <value></value> + </textarea> + + <textarea name="date_text" draworder="0" align="center"> + <multiline>no</multiline> + <font>time</font> + <area>0,60,800,70</area> + <value></value> + </textarea> + + <!-- + current myth status + --> + + <textarea name="status_text" draworder="1" align="center"> + <multiline>yes</multiline> + <font>info</font> + <area>20,70,760,60</area> + <value>MythTV is idle and will shutdown shortly.</value> + </textarea> + + <!-- + current recordings status + --> + + <textarea name="recording_label" draworder="1" align="center"> + <font>label</font> + <area>20,110,760,30</area> + <!--<value>Percent Complete </value>--> + <value></value> + </textarea> + + <textarea name="recording_text" draworder="1" align="hcenter"> + <multiline>yes</multiline> + <font>biginfo</font> + <area>20,110,760,150</area> + <value></value> + </textarea> + + <!-- + next scheduled recording status + --> + + <textarea name="scheduled_label" draworder="1" align="center"> + <font>label</font> + <area>20,320,760,30</area> + <value></value> + </textarea> + + <textarea name="scheduled_text" draworder="1" align="hcenter"> + <multiline>yes</multiline> + <font>biginfo</font> + <area>20,400,760,120</area> + <value></value> + </textarea> + + <!-- + scheduled recordings conflict warning + --> + + <textarea name="conflicts_text" draworder="1" align="center"> + <font>warning</font> + <area>20,490,760,30</area> + <value>WARNING: There are conflicting scheduled recordings!</value> + </textarea> + + <!-- + start frontend button + + <textbutton name="startfrontend_button" draworder="1"> + <position>81,535</position> + <font>buttons</font> + <image function="on" filename="mw_text_button_on.png"></image> + <image function="off" filename="mw_text_button_off.png"></image> + <image function="pushed" filename="mw_text_button_pushed.png"></image> + </textbutton> + + --> + + </container> + + </window> + +</mythuitheme> diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp new file mode 100755 index 0000000..6d1920f --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.cpp @@ -0,0 +1,216 @@ +#include <qapplication.h> +#include <unistd.h> +#include <fstream> +#include <sys/wait.h> // For WIFEXITED on Mac OS X + +#include "mythcontext.h" +#include "mythdbcon.h" +#include "lcddevice.h" +#include "tv.h" +#include "programinfo.h" +#include "uitypes.h" +#include "remoteutil.h" +#include "installdialog.h" +#include "libmyth/dialogbox.h" +#include <qvaluevector.h> +#include <stdlib.h> +#define UPDATE_STATUS_INTERVAL 5000 +#define UPDATE_SCREEN_INTERVAL 5000 +QStringList belist; +BEvector beveclist (100); +QString BECommand; +int retval; +int runstuff(QStringList hostlist,BEvector Bea,QString bcmd ){ +belist=hostlist; +beveclist = Bea; +BECommand=bcmd; + +WelcomeDialog *mythWelcome = new WelcomeDialog(gContext->GetMainWindow(), + "welcome_screen", "bpopup-", + "welcome_screen"); + mythWelcome->exec(); + delete mythWelcome; + return (0); +} + + +WelcomeDialog::WelcomeDialog(MythMainWindow *parent, + QString window_name, + QString theme_filename, + const char* name) +:MythThemedDialog(parent, window_name, theme_filename, name) +{ + gContext->addListener(this); + m_timeFormat = gContext->GetSetting("TimeFormat", "h:mm AP"); + wireUpTheme(); + assignFirstFocus(); + popup = NULL; + showPopup(); +} + + +int WelcomeDialog::exec() +{ + return MythDialog::exec(); +} + + + +void WelcomeDialog::keyPressEvent(QKeyEvent *e) +{ + bool handled = false; + + QStringList actions; + gContext->GetMainWindow()->TranslateKeyPress("Welcome", e, actions); + + for (unsigned int i = 0; i < actions.size() && !handled; i++) + { + QString action = actions[i]; + handled = true; + if (action == "ESCAPE") + { + return; // eat escape key + } + else if (action == "MENU") + { + showPopup(); + } + else if (action == "NEXTVIEW") + { + accept(); + } + else if (action == "SELECT") + { + activateCurrent(); + } + else + handled = false; + } + + if (!handled) + MythThemedDialog::keyPressEvent(e); +} + +UITextType* WelcomeDialog::getTextType(QString name) +{ + UITextType* type = getUITextType(name); + + if (!type) + { + cout << "ERROR: Failed to find '" << name << "' UI element in theme file\n" + << "Bailing out!" << endl; + exit(0); + } + return type; +} + +void WelcomeDialog::wireUpTheme() +{ + m_status_text = getTextType("status_text"); + m_recording_text = getTextType("recording_text"); + m_scheduled_text = getTextType("scheduled_text"); + m_time_text = getTextType("time_text"); + m_date_text = getTextType("date_text"); + m_warning_text = getTextType("conflicts_text"); + m_warning_text->hide(); + buildFocusList(); +} + +void WelcomeDialog::closeDialog() +{ +cout <<"close dialog" <<endl; + done(1); +} + +WelcomeDialog::~WelcomeDialog() +{ + gContext->removeListener(this); + + if (m_updateStatusTimer) + delete m_updateStatusTimer; + + if (m_updateScreenTimer) + delete m_updateScreenTimer; + + if (m_timeTimer) + delete m_timeTimer; +} + +void WelcomeDialog::updateTime(void) +{ + QString s=""; + m_date_text->SetText(s); +} + +void WelcomeDialog::updateStatus(void) +{ + updateStatusMessage(); +} + +void WelcomeDialog::updateScreen(void) +{ + m_recording_text->SetText(recording_text); + m_scheduled_text->SetText(scheduled_text); + m_status_text->SetText(""); + m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true); + +} + +void WelcomeDialog::updateAll(void) +{ + updateRecordingList(); + updateScheduledList(); +} + +bool WelcomeDialog::updateRecordingList() +{ + return true; +} + +bool WelcomeDialog::updateScheduledList() +{ + + + updateStatus(); + updateScreen(); + return true; +} + +void WelcomeDialog::updateStatusMessage(void) +{ + +} + +void WelcomeDialog::showPopup(void) +{ + if (popup) + return; + DialogCode retitem = MythPopupBox::ShowButtonPopup(gContext->GetMainWindow(), + QString("JobQueuePopup"), + QObject::tr("Select Backend to " + BECommand ), + belist,kDialogCodeButton0); + retval = retitem - kDialogCodeListStart; + cout << beveclist[retval] << endl; + cancelPopup(); + dorestart( BECommand , beveclist[retval] ); + } + + + +void WelcomeDialog::cancelPopup(void) +{ + if (!popup) + return; + popup->hide(); + popup->deleteLater(); + popup = NULL; + setActiveWindow(); +} + +void dorestart (QString command , QString behost) +{ +cout << command << behost << endl; +system("/usr/bin/backend_control.sh " + command + " " + behost ); +exit(0); +} + diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h new file mode 100755 index 0000000..69af384 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/installdialog.h @@ -0,0 +1,80 @@ +//#ifndef WELCOMEDIALOG_H_ +//#define WELCOMEDIALOG_H_ + +#include <iostream> +using namespace std; + +#include <qdatetime.h> +#include "mythdialogs.h" +#include "libmyth/dialogbox.h" +#include <qvaluevector.h> + typedef QValueVector<QString> BEvector; + +int runstuff(QStringList , BEvector,QString); + +//QStringList BeButtonList; + +class WelcomeDialog : public MythThemedDialog +{ + + Q_OBJECT + + public: + + WelcomeDialog(MythMainWindow *parent, + QString window_name, + QString theme_filename, + const char* name = 0); + ~WelcomeDialog(); + + void keyPressEvent(QKeyEvent *e); + void wireUpTheme(); + int exec(); + + protected slots: + void updateAll(void); + void updateStatus(void); + void updateScreen(void); + void closeDialog(); + void updateTime(); + void showPopup(); + + void cancelPopup(); + // void MAINPopup(); + bool updateRecordingList(void); + bool updateScheduledList(void); + + + private: + void updateStatusMessage(void); + UITextType* getTextType(QString name); + MythPopupBox *popup; +// DialogBox *reboot_box; +// DialogBox *upgrade_box; + // + // GUI stuff + // + UITextType *m_status_text; + UITextType *m_recording_text; + UITextType *m_scheduled_text; + UITextType *m_warning_text; + UITextType *m_time_text; + UITextType *m_date_text; + QTimer *m_updateStatusTimer; + QTimer *m_updateScreenTimer; + QTimer *m_timeTimer; + +// QString m_installDir; + QString m_timeFormat; +// QStringList m_statusList; +// QString install_drive ; +// QString install_text; + string recording_text; + string scheduled_text; +// string bin_prefix; +// bool I_AM_BUSY; + + +}; + +void dorestart (QString,QString); diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp new file mode 100755 index 0000000..7c5f9f2 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/main.cpp @@ -0,0 +1,195 @@ +#include <qapplication.h> +#include <cstdlib> +//#include "libmyth/mythdialogs.h" +#include "libmyth/mythcontext.h" +#include "libmyth/settings.h" +#include "libmyth/langsettings.h" +#include "libmyth/mythdbcon.h" +#include <libmyth/exitcodes.h> +#include "libmythtv/tv.h" + +#include "mythdialogbox.h" + +#include <iostream> +#include <fstream> +#include <stdio.h> + +#include "libmyth/dialogbox.h" +#include <qlist.h> +#include <qvaluevector.h> +#include "installdialog.h" +void initKeys(void) +{ + REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12"); + REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11"); +} + +int main(int argc, char **argv) +{ + QString becommand; + QApplication a(argc, argv); + bool bShow=false; + gContext = NULL; + gContext = new MythContext(MYTH_BINARY_VERSION); + if (!gContext->Init()) + { + VERBOSE(VB_IMPORTANT, "mythwelcome: Could not initialize myth context. " + "Exiting."); + return FRONTEND_EXIT_NO_MYTHCONTEXT; + } + + if (!MSqlQuery::testDBConnection()) + { + VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. " + "Exiting."); + return -1; + } + + if ( a.argc() == 1 ) + { + VERBOSE(VB_IMPORTANT, "Not enough argurments"); + exit(1); + } + // Check command line arguments + for (int argpos = 1; argpos < a.argc(); ++argpos) + { + // ++argpos; + + if (!strcmp(a.argv()[argpos],"-restart")) + { + becommand="restart"; + } + else if (!strcmp(a.argv()[argpos],"-start")) + { + becommand="start"; + } + else if (!strcmp(a.argv()[argpos],"-stop")) + { + becommand="stop"; + } + else if (!strcmp(a.argv()[argpos],"-forceshow")) + { + bShow=true; + } + else + { + cerr << "Invalid argument: " << a.argv()[argpos] << endl << + "Valid options are: " << endl << + "-restart " << endl << + "-start " << endl << + "-stop " << endl << + "-forceshow" << endl; + + return FRONTEND_EXIT_INVALID_CMDLINE; + } + + + } + + gContext->LoadQtConfig(); + + + + QStringList msg; + QString tempip; + QString justifyip; + QString temphname; + QString justifyname; + QString tempbetype; + QString justifybetype; + + int listmaxpos = 0 ; + typedef QValueVector<QString> BEvector; + BEvector BElist (20); + + if (!MSqlQuery::testDBConnection()) + { + VERBOSE(VB_IMPORTANT, "mythwelcome: Could not open the database. " + "Exiting."); + } + + //select the master backend + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "SELECT DISTINCT data,hostname from settings where value='MasterServerIP';"); + if (query.exec() && query.isActive() && query.size() > 0) + { + while (query.next()) + { + + tempip = query.value(0).toString(); + justifyip=tempip.rightJustify(15,' ',false); + temphname = query.value(1).toString(); + justifyname= temphname.rightJustify( 20, ' ',false ); + + if ( temphname == "" ) + tempbetype="MBE: "; + else + tempbetype="SBE: "; + + tempbetype.append(justifyname); + tempbetype.append(" "); + tempbetype.append(justifyip); + + justifybetype= tempbetype.leftJustify(50,' ' ,true); + BElist[listmaxpos] = tempbetype; + msg << (justifybetype); + listmaxpos++; + } + } + + + //slave backends + query.prepare( "SELECT DISTINCT data,hostname from settings where value='BackendServerIP' and not data=:ip ;"); + query.bindValue( ":ip", tempip ); + if (query.exec() && query.isActive() && query.size() > 0) + { + while (query.next()) + { + + tempip = query.value(0).toString(); + justifyip=tempip.rightJustify(15,' ',false); + temphname = query.value(1).toString(); + justifyname= temphname.rightJustify( 20, ' ',false ); + + if ( temphname == "" ) + tempbetype="MBE: "; + else + tempbetype="SBE: "; + + tempbetype.append(justifyname); + tempbetype.append(" "); + tempbetype.append(justifyip); + + justifybetype= tempbetype.leftJustify(50,' ' ,true); + BElist[listmaxpos] = tempbetype; + msg << (justifybetype); + listmaxpos++; + } + } + + + +if ( query.size () >1) + bShow=true; + + +cout << listmaxpos << endl; +if ( bShow ) +{ + LanguageSettings::load("mythfrontend"); + + MythMainWindow *mainWindow = GetMythMainWindow(); + mainWindow->Init(); + gContext->SetMainWindow(mainWindow); + initKeys(); + runstuff(msg,BElist,becommand); + +delete gContext; +} +else +{ + dorestart( becommand, BElist[0] ); +} +return 0; +} + diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp new file mode 100755 index 0000000..53f3089 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/moc_installdialog.cpp @@ -0,0 +1,131 @@ +/**************************************************************************** +** WelcomeDialog meta object code from reading C++ file 'installdialog.h' +** +** Created: Fri Aug 8 02:57:02 2008 +** by: The Qt MOC ($Id: qt/moc_yacc.cpp 3.3.8 edited Feb 2 14:59 $) +** +** WARNING! All changes made in this file will be lost! +*****************************************************************************/ + +#undef QT_NO_COMPAT +#include "installdialog.h" +#include <qmetaobject.h> +#include <qapplication.h> + +#include <private/qucomextra_p.h> +#if !defined(Q_MOC_OUTPUT_REVISION) || (Q_MOC_OUTPUT_REVISION != 26) +#error "This file was generated using the moc from 3.3.8. It" +#error "cannot be used with the include files from this version of Qt." +#error "(The moc has changed too much.)" +#endif + +const char *WelcomeDialog::className() const +{ + return "WelcomeDialog"; +} + +QMetaObject *WelcomeDialog::metaObj = 0; +static QMetaObjectCleanUp cleanUp_WelcomeDialog( "WelcomeDialog", &WelcomeDialog::staticMetaObject ); + +#ifndef QT_NO_TRANSLATION +QString WelcomeDialog::tr( const char *s, const char *c ) +{ + if ( qApp ) + return qApp->translate( "WelcomeDialog", s, c, QApplication::DefaultCodec ); + else + return QString::fromLatin1( s ); +} +#ifndef QT_NO_TRANSLATION_UTF8 +QString WelcomeDialog::trUtf8( const char *s, const char *c ) +{ + if ( qApp ) + return qApp->translate( "WelcomeDialog", s, c, QApplication::UnicodeUTF8 ); + else + return QString::fromUtf8( s ); +} +#endif // QT_NO_TRANSLATION_UTF8 + +#endif // QT_NO_TRANSLATION + +QMetaObject* WelcomeDialog::staticMetaObject() +{ + if ( metaObj ) + return metaObj; + QMetaObject* parentObject = MythThemedDialog::staticMetaObject(); + static const QUMethod slot_0 = {"updateAll", 0, 0 }; + static const QUMethod slot_1 = {"updateStatus", 0, 0 }; + static const QUMethod slot_2 = {"updateScreen", 0, 0 }; + static const QUMethod slot_3 = {"closeDialog", 0, 0 }; + static const QUMethod slot_4 = {"updateTime", 0, 0 }; + static const QUMethod slot_5 = {"showPopup", 0, 0 }; + static const QUMethod slot_6 = {"cancelPopup", 0, 0 }; + static const QUParameter param_slot_7[] = { + { 0, &static_QUType_bool, 0, QUParameter::Out } + }; + static const QUMethod slot_7 = {"updateRecordingList", 1, param_slot_7 }; + static const QUParameter param_slot_8[] = { + { 0, &static_QUType_bool, 0, QUParameter::Out } + }; + static const QUMethod slot_8 = {"updateScheduledList", 1, param_slot_8 }; + static const QMetaData slot_tbl[] = { + { "updateAll()", &slot_0, QMetaData::Protected }, + { "updateStatus()", &slot_1, QMetaData::Protected }, + { "updateScreen()", &slot_2, QMetaData::Protected }, + { "closeDialog()", &slot_3, QMetaData::Protected }, + { "updateTime()", &slot_4, QMetaData::Protected }, + { "showPopup()", &slot_5, QMetaData::Protected }, + { "cancelPopup()", &slot_6, QMetaData::Protected }, + { "updateRecordingList()", &slot_7, QMetaData::Protected }, + { "updateScheduledList()", &slot_8, QMetaData::Protected } + }; + metaObj = QMetaObject::new_metaobject( + "WelcomeDialog", parentObject, + slot_tbl, 9, + 0, 0, +#ifndef QT_NO_PROPERTIES + 0, 0, + 0, 0, +#endif // QT_NO_PROPERTIES + 0, 0 ); + cleanUp_WelcomeDialog.setMetaObject( metaObj ); + return metaObj; +} + +void* WelcomeDialog::qt_cast( const char* clname ) +{ + if ( !qstrcmp( clname, "WelcomeDialog" ) ) + return this; + return MythThemedDialog::qt_cast( clname ); +} + +bool WelcomeDialog::qt_invoke( int _id, QUObject* _o ) +{ + switch ( _id - staticMetaObject()->slotOffset() ) { + case 0: updateAll(); break; + case 1: updateStatus(); break; + case 2: updateScreen(); break; + case 3: closeDialog(); break; + case 4: updateTime(); break; + case 5: showPopup(); break; + case 6: cancelPopup(); break; + case 7: static_QUType_bool.set(_o,updateRecordingList()); break; + case 8: static_QUType_bool.set(_o,updateScheduledList()); break; + default: + return MythThemedDialog::qt_invoke( _id, _o ); + } + return TRUE; +} + +bool WelcomeDialog::qt_emit( int _id, QUObject* _o ) +{ + return MythThemedDialog::qt_emit(_id,_o); +} +#ifndef QT_NO_PROPERTIES + +bool WelcomeDialog::qt_property( int id, int f, QVariant* v) +{ + return MythThemedDialog::qt_property( id, f, v); +} + +bool WelcomeDialog::qt_static_property( QObject* , int , int , QVariant* ){ return FALSE; } +#endif // QT_NO_PROPERTIES diff --git a/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro b/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro new file mode 100755 index 0000000..d2ebce9 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythbeselect/mythberestart.pro @@ -0,0 +1,47 @@ +MYTHPATH="/data/LinHES-PKGBUILD/abs/core-testing/mythtv/stable/mythtv/src/mythtv-0.21" + + + + +include ( $$MYTHPATH/libs/libmyth/mythconfig.mak) +include ( $$MYTHPATH/settings.pro) +#include ( $$MYTHPATH/programs-libs.pro) + +INCLUDEPATH += $$MYTHPATH $$MYTHPATH/libs/ $$MYTHPATH/libs/libmyth $$MYTHPATH/libs/libmythtv +INCLUDEPATH += $$MYTHPATH/libs/libavutil $$MYTHPATH/libs/libavformat $$MYTHPATH/libs/libavcodec +INCLUDEPATH += $$MYTHPATH/libs/libmythupnp $$MYTHPATH/libs/libmythui +INCLUDEPATH += $$MYTHPATH/libs/libmythlivemedia + +LIBS += -L$$MYTHPATH/libs/libmyth -L$$MYTHPATH/libs/libmythtv +LIBS += -L$$MYTHPATH/libs/libavutil -L$$MYTHPATH/libs/libavcodec -L$$MYTHPATH/libs/libavformat +LIBS += -L$$MYTHPATH/libs/libmythfreemheg +LIBS += -L$$MYTHPATH/libs/libmythui +LIBS += -L$$MYTHPATH/libs/libmythupnp +LIBS += -L$$MYTHPATH/libs/libmythlivemedia + +LIBS += -lmythtv-$$LIBVERSION -lmythavformat-$$LIBVERSION +LIBS += -lmythavutil-$$LIBVERSION -lmythavcodec-$$LIBVERSION +LIBS += -lmythfreemheg-$$LIBVERSION +LIBS += -lmythupnp-$$LIBVERSION +LIBS += -lmythlivemedia-$$LIBVERSION +LIBS += -lmyth-$$LIBVERSION -lmythui-$$LIBVERSION $$EXTRA_LIBS + + + +TEMPLATE = app +CONFIG += thread +TARGET = mythbeselect +target.path = $${PREFIX}/bin + +INSTALLS = target + +uifiles.path = $${PREFIX}/share/mythtv/themes/default +uifiles.files = install-ui.xml images/*.png + +INSTALLS += uifiles + +QMAKE_CLEAN += $(TARGET) + +# Input +HEADERS += installdialog.h +SOURCES += main.cpp installdialog.cpp diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp new file mode 100755 index 0000000..cfd7fb3 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.cpp @@ -0,0 +1,182 @@ +//#include "libmyth/mythdbcon.h" +#include "mythdbcon.h" +#include <mythtv/mythdbcon.h> +#include "autocard.h" +#include <stdlib.h> + +AutoCard::AutoCard(void) : + listbox(new ListBoxSetting(this)) +{ + listbox->setLabel(tr("Cards")); + addChild(listbox); +} +void AutoCard::popup_menu(void) +{ + QString name = listbox->getValue(); +// //cout << "in popup" << name << endl; + QString uniqid = name.section(' ', -1); + QString description = name.section('*',-3,-3); + description = description.section('.',1); + description = description.stripWhiteSpace(); +// //cout << uniqid << endl; +// //cout << "descriptn" << endl; +// //cout << description << endl; + if (name.isEmpty() || name == "Default") + return; + + QString message = tr("Cardme:") + + QString("\n'%1'?").arg(name); + + DialogCode value = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), + "", message, + tr("Add Card"), + tr("Do not Add"), kDialogCodeButton0); + + if ( value == kDialogCodeButton1) + { + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("update autocard set devicestatus ='unused' where uniqid=:UNIQID and description=:DESCRIPTION;"); + query.bindValue(":UNIQID",uniqid ); + query.bindValue(":DESCRIPTION",description ); + //FINDME + // if (!query.exec()) + // MythContext::DBError("Autocard::popup", query); + + int lastIndex = listbox->getValueIndex(name); + lastValue = ""; + load(); + listbox->setValue(lastIndex); + } + else if (value == kDialogCodeButton0) + { + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("update autocard set devicestatus ='will-add' where uniqid=:UNIQID and description=:DESCRIPTION;"); + query.bindValue(":UNIQID",uniqid ); + query.bindValue(":DESCRIPTION",description ); + +//FNDME +// if (!query.exec()) +// MythContext::DBError("Autocard::popup", query); + + int lastIndex = listbox->getValueIndex(name); + lastValue = ""; + load(); + listbox->setValue(lastIndex); + + + + + } + + + listbox->setFocus(); +} + + + +QStringList AutoCard::GetNames(void) +{ + QStringList names; + QString device; + QString description; + QString displayname ; + QString status ; + QString uniqid; + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("SELECT dev,description,uniqid,devicestatus FROM autocard order by uniqid"); + if (query.exec() && query.isActive() && query.size() > 0) + { + while (query.next()) + { + device=query.value(0).toString(); + description=query.value(1).toString(); + uniqid=query.value(2).toString(); + status=query.value(3).toString(); + //displayname=device; + displayname=". "; + displayname.append(description); + displayname.append(" * "); + displayname.append(status); + displayname.append(" * "); + + displayname.append(uniqid); + names << displayname ; + } + + return names; + } +} + +void AutoCard::open(QString name) +{ + lastValue = name; + bool created = false; + //cout << name << endl; + if (name == "Mark all cards for addition") + { + //cout <<"updating all cards" << endl; + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("update autocard set devicestatus='will-add' where devicestatus='unused' order by uniqid"); + query.exec(); + } + else if ( name == "Perform actions" ) + { + // write udev rules and reload udev + + system ("sudo autocard.py -w -i"); + system ("sudo autocard.py -r"); + + } + else if ( name == "Exit" ) + { + // write udev rules and reload udev + exit(0); + } + else + { + popup_menu(); +// bool ok = MythPopupBox::showGetTextPopup(gContext->GetMainWindow(), +// tr("Create New Playback Group"), +// tr("Enter group name or press SELECT to enter text via the " +// "On Screen Keyboard"), name); + + + } + +}; + +void AutoCard::load(void) +{ + listbox->clearSelections(); + + + QStringList names = AutoCard::GetNames(); + while (!names.isEmpty()) + { + listbox->addSelection(names.front()); + names.pop_front(); + } + listbox->addSelection("Mark all cards for addition"); + listbox->addSelection("Perform actions"); + listbox->addSelection("Exit"); + listbox->setValue(lastValue); + +} + + +int AutoCard::exec(void) +{ + while (ConfigurationDialog::exec() == QDialog::Accepted) + open(listbox->getValue()); + + return QDialog::Rejected; +} + + +MythDialog* AutoCard::dialogWidget(MythMainWindow* parent, + const char* widgetName) +{ + dialog = ConfigurationDialog::dialogWidget(parent, widgetName); + connect(dialog, SIGNAL(menuButtonPressed()), this, SLOT(popup_menu())); + return dialog; +} diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h new file mode 100755 index 0000000..4948842 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/autocard.h @@ -0,0 +1,30 @@ +#ifndef AUTOCARD_H +#define AUTOCARD_H +#include <mythtv/mythdbcon.h> +#include "qstringlist.h" +#include "libmyth/settings.h" +#include "libmyth/mythwidgets.h" + +class MPUBLIC AutoCard : public QObject, public ConfigurationDialog +{ + Q_OBJECT + +public: + AutoCard(); + virtual int exec(void); + virtual void load(void); + virtual void save(void) { }; + virtual void save(QString) { }; + virtual MythDialog* dialogWidget(MythMainWindow* parent, + const char* widgetName=0); + static QStringList GetNames(void); +protected slots: + void open(QString name); + void popup_menu(void); + +protected: + ListBoxSetting *listbox; + QString lastValue; +}; + +#endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp new file mode 100755 index 0000000..7c8f4a2 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.cpp @@ -0,0 +1,55 @@ + +using namespace std; + +#include <QString> + +#include "mythcorecontext.h" +#include "commandlineparser.h" +#define MYTH_APPNAME_MYTHINSTALL "mythinstall" + +MythInstallCommandLineParser::MythInstallCommandLineParser() : + MythCommandLineParser(MYTH_APPNAME_MYTHINSTALL) +{ LoadArguments(); } + +void MythInstallCommandLineParser::LoadArguments(void) +{ + addHelp(); + addVersion(); + addSettingsOverride(); + addGeometry(); + addLogging(); + +// add(QStringList( QStringList() << "-s" << "--screen" ), "screen", "", +// "List settings screens to show", ""); + + add("-s", "screen", "", + "Start the frontend at specified jump point.", ""); + + add("-r", "readme", "", + "Show readme", ""); + + add("-H", "help", "", + "Show help screen", ""); + + add("-Q", "question", "", + "Display question with yes/no", ""); + + add("-b", "run_mythsetup", "", + "Ask to start mythtv setup", ""); + + add("-L", "show_lang", "", + "On install show lang/country screen", ""); + + + + //add(QStringList( QStringList() << "-p" << "--prompt" ), "prompt", false, + // "Always prompt for backend selection.", ""); + + +} + +QString MythInstallCommandLineParser::GetHelpHeader(void) const +{ + return "generic help msg line 34"; +} + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h new file mode 100755 index 0000000..dc45adc --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/commandlineparser.h @@ -0,0 +1,14 @@ + +#include <QString> + +#include "mythcommandlineparser.h" + +class MythInstallCommandLineParser : public MythCommandLineParser +{ + public: + MythInstallCommandLineParser(); + void LoadArguments(void); + protected: + QString GetHelpHeader(void) const; +}; + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp new file mode 100755 index 0000000..22d784f --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.cpp @@ -0,0 +1,157 @@ +#include "mythuihelper.h" +#include "settings.h" +#include "compat-mv.h" + + +void ImageSelectSetting::addImageSelection(const QString& label, + QImage* image, + QString value, + bool select) { + images.push_back(image); + addSelection(label, value, select); +} + +ImageSelectSetting::~ImageSelectSetting() +{ + Teardown(); +} + +void ImageSelectSetting::deleteLater(void) +{ + Teardown(); + SelectSetting::deleteLater(); +} + +void ImageSelectSetting::Teardown(void) +{ + while (images.size()) + { + QImage *tmp = images.back(); + images.pop_back(); + delete tmp; + } + bxwidget = NULL; + imagelabel = NULL; + combo = NULL; +} + +void ImageSelectSetting::imageSet(int num) +{ + if (num >= (int)images.size()) + return; + + if (!images[current]) + return; + + QImage temp = *(images[current]); + temp = temp.scaled((int)(184 * m_hmult), (int)(138 * m_hmult), + Qt::KeepAspectRatio); + + QPixmap tmppix = QPixmap::fromImage(temp); + imagelabel->setPixmap(tmppix); +} + +QWidget* ImageSelectSetting::configWidget(ConfigurationGroup *cg, + QWidget* parent, + const char* widgetName) +{ + int width = 0, height = 0; + + GetMythUI()->GetScreenSettings(width, m_wmult, height, m_hmult); + + bxwidget = new QWidget(parent); + bxwidget->setObjectName(widgetName); + + QBoxLayout *layout = NULL; + if (labelAboveWidget) + { + layout = new QVBoxLayout(); + bxwidget->setSizePolicy(QSizePolicy(QSizePolicy::Preferred, + QSizePolicy::Maximum)); + } + else + layout = new QHBoxLayout(); + + layout->setContentsMargins(0,0,0,0); + layout->setSpacing(0); + + if (getLabel() != "") + { + QLabel *label = new QLabel(); + label->setText(getLabel() + ":"); + layout->addWidget(label); + } + + combo = new MythComboBox(false); + layout->addWidget(combo); + + QLabel *testlabel = new QLabel(); + testlabel->setText(" "); + layout->addWidget(testlabel); + + connect(bxwidget, SIGNAL(destroyed(QObject*)), + this, SLOT(widgetDeleted(QObject*))); + + imagelabel = new QLabel(); + layout->addWidget(imagelabel); + + for (unsigned int i = 0 ; i < images.size() ; ++i) + combo->insertItem(labels[i]); + + if (isSet) + combo->setCurrentIndex(current); + else + current = 0; + + if (images.size() != 0 && current < images.size() && images[current]) + { + QImage temp = *(images[current]); + temp = temp.scaled((int)(184 * m_hmult), (int)(138 * m_hmult), + Qt::KeepAspectRatio); + + QPixmap tmppix = QPixmap::fromImage(temp); + imagelabel->setPixmap(tmppix); + imagelabel->setMinimumHeight(tmppix.height()); + } + else + { + QPixmap tmppix((int)(184 * m_hmult), (int)(138 * m_hmult)); + tmppix.fill(Qt::black); + + imagelabel->setPixmap(tmppix); + imagelabel->setMinimumHeight(tmppix.height()); + } + + connect(combo, SIGNAL(highlighted(int)), this, SLOT(setValue(int))); + connect(combo, SIGNAL(highlighted(int)), this, SLOT(imageSet(int))); + connect(combo, SIGNAL(activated(int)), this, SLOT(setValue(int))); + connect(combo, SIGNAL(activated(int)), this, SLOT(imageSet(int))); + + connect(this, SIGNAL(selectionsCleared()), + combo, SLOT(clear())); + + if (cg) + connect(combo, SIGNAL(changeHelpText(QString)), cg, + SIGNAL(changeHelpText(QString))); + + bxwidget->setLayout(layout); + + return bxwidget; +} + +void ImageSelectSetting::widgetInvalid(QObject *obj) +{ + if (bxwidget == obj) + { + bxwidget = NULL; + imagelabel = NULL; + combo = NULL; + } +} + +void ImageSelectSetting::setHelpText(const QString &str) +{ + if (combo) + combo->setHelpText(str); + SelectSetting::setHelpText(str); +} diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h new file mode 100755 index 0000000..bc2c4cb --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/compat-mv.h @@ -0,0 +1,43 @@ +#include "settings.h" +#include "mythstorage.h" + +class MPUBLIC ImageSelectSetting: public SelectSetting { + Q_OBJECT +public: + ImageSelectSetting(Storage *_storage) : + SelectSetting(_storage), + bxwidget(NULL), imagelabel(NULL), combo(NULL), + m_hmult(1.0f), m_wmult(1.0f) { } + virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent, + const char* widgetName = 0); + virtual void widgetInvalid(QObject *obj); + virtual void deleteLater(void); + virtual void setHelpText(const QString &str); + + virtual void addImageSelection(const QString& label, + QImage* image, + QString value=QString::null, + bool select=false); + +protected slots: + void imageSet(int); + +protected: + void Teardown(void); + virtual ~ImageSelectSetting(); + +protected: + vector<QImage*> images; + QWidget *bxwidget; + QLabel *imagelabel; + MythComboBox *combo; + float m_hmult, m_wmult; +}; + + +class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage +{ +public: + HostImageSelect(const QString &name) : + ImageSelectSetting(this), HostDBStorage(this, name) { } +};
\ No newline at end of file diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp new file mode 100755 index 0000000..58804a5 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.cpp @@ -0,0 +1,319 @@ +#include <unistd.h> +#include "misc_settings.h" +#include "mv_common.h" +//Added by qt3to4: + +#include <Q3TextStream> +#include <unistd.h> +#include <stdio.h> +#include <QtNetwork> + +#include <stdlib.h> +#include "mythprogressdialog.h" +#include "mythsystemlegacy.h" + + +#include "mythuihelper.h" + +#include "fileshare.h" + +extern HostParms hostparm; +using namespace std; + +//________________Client (NFS) Screen SETTINGS_________________________ +static HostComboBox *HostHaveCentralNFS() +{ + HostComboBox *gc = new HostComboBox("HostHaveCentralNFS"); + gc->setLabel(QObject::tr("Central NFS Server")); + gc->addSelection("no"); + gc->addSelection("yes") ; + gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the master backend. Select no if you are unsure.")); + + return gc; +} + +static HostComboBox *HostCentralNFSIP() +{ + HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true); + gc->setLabel(QObject::tr("NFS Server")); + gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, For example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file.")); + gc->addSelection("example ip:share") ; + gc->addSelection("file:nfsmap_auto") ; + gc->addSelection("file:nfsmap") ; + gc->addSelection("silverraid:/raid0/data/media/"); + gc->addSelection("") ; + return gc; +}; + +static HostComboBox *HostNFSmountpoint() +{ +// #ifdef __MVAPP__ +// HostComboBox *gc = new HostComboBox("HostNFSmountpoint"); +// gc->addSelection("/data/storage/central_nfs"); +// #else +// HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true); +// gc->addSelection("/myth"); +// #endif + + HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true); + gc->addSelection("/data/storage/central_nfs"); + gc->setLabel(QObject::tr("Mount Point")); + gc->setHelpText(QObject::tr("")); + return gc; +} + +static HostCheckBox *HostCentralNFSallhosts() +{ + HostCheckBox *gc = new HostCheckBox("HostCentralNFSallhosts"); + gc->setLabel(QObject::tr("All Hosts Use This Share")); + gc->setValue(true); + gc->setHelpText(QObject::tr("If checked then all new hosts added to the cluster will try to access the same share.")); + return gc; +}; + + + + + +ClientNFSSettings::ClientNFSSettings(): +TriggeredConfigurationGroup(false,false,false,true,true,false,false,true) +{ + setLabel(QObject::tr("Client NFS configuration")); + + Setting* havenfs = HostHaveCentralNFS(); + addChild(havenfs); + setTrigger(havenfs); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(); + QString systemtype = gCoreContext->GetSetting("HostSystemType"); + + if ( systemtype == "Master_backend" ) + { + settings->addChild(HostCentralNFSallhosts()); + } + + + + + + + + settings->addChild(HostCentralNFSIP()); + settings->addChild(HostNFSmountpoint()); + + addTarget("no", new VerticalConfigurationGroup()); + addTarget("yes", settings); +}; + + + +//_______________Client NFS Frame +FileShareMainFrameClient::FileShareMainFrameClient(): +VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("File Sharing Settings (1/2)")); + VerticalConfigurationGroup* fileshareframeclientsettings = + new VerticalConfigurationGroup(false, true,false,false); + + ClientNFSSettings *clientnfssettings = new ClientNFSSettings(); + fileshareframeclientsettings->addChild(clientnfssettings); + addChild(fileshareframeclientsettings); +} + + +//-------------------------------------- + +static HostCheckBox *HostServiceNFS() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceNFS"); + gc->setLabel(QObject::tr("File Sharing using NFS")); + gc->setValue(true); + gc->setHelpText(QObject::tr("If checked, any device on the network can access media via NFS.")); + return gc; +}; +static HostCheckBox *HostServiceSamba() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba"); + gc->setLabel(QObject::tr("File Sharing using SMB (Windows Sharing)")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked, any device on the network can access media via Windows SMB file sharing.")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_write() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write"); + gc->setLabel(QObject::tr("ReadOnly")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities.")); + return gc; +}; + + +static HostCheckBox *HostServiceSamba_writehome() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome"); + gc->setLabel(QObject::tr("ReadOnly")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked, remote clients will have write and delete abilities.")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_media() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media"); + gc->setLabel(QObject::tr("Share media")); + gc->setValue(true); + gc->setHelpText(QObject::tr(" ")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_home() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home"); + gc->setLabel(QObject::tr("Share home")); + gc->setValue(true); + gc->setHelpText(QObject::tr(" ")); + return gc; +}; + + + +static HostComboBox *HostServiceSamba_domain() +{ + HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true); + gc->setLabel(QObject::tr("Workgroup")); + gc->setHelpText(QObject::tr("Workgroup for Windows SMB shares.")); + gc->addSelection("WORKGROUP"); + QString currentitem; + QString line; + QFile file("/tmp/smbdomainlist"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("domain")) + { + currentitem = line.section( " ", 1, 1 ); + if ( currentitem != "-" ) + gc->addSelection(currentitem); + } + } + file.close(); + } + gc->addSelection("type_workgroup_here"); + return gc; +}; + +class SAMBAsettings: public TriggeredConfigurationGroup { +public: + + SAMBAsettings(): + TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) { + SetVertical(true); + Setting* trigger = HostServiceSamba() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new GridConfigurationGroup(2,false,false); + //settings->addChild(HostServiceSamba()); + settings->addChild(HostServiceSamba_media()); + settings->addChild(HostServiceSamba_write()); + settings->addChild(HostServiceSamba_home()); + settings->addChild(HostServiceSamba_writehome()); + settings->addChild(HostServiceSamba_domain()); + + addTarget("0", new GridConfigurationGroup(2,false, false)); + addTarget("1", settings); + }; +}; + +void smb_busy_box() { + system ("nmbscan -d > /tmp/smbdomainlist & "); + QString msgtext="Searching for Windows Workgroups"; + int return_code; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, + "installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + int progressbar=1; + MythProgressDialog *popupProgress = NULL; + popupProgress = new MythProgressDialog(msgtext, 50); + if (popupProgress) + { + popupProgress->setProgress(progressbar); + } + + + + while ( return_code == 0 ) + { + + progressbar++; + popupProgress->setProgress(progressbar); + if (progressbar > 50 ) + progressbar = 10; + + return_code = myth_system("ps -ef|grep nmbscan|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + + if (popupProgress) + { + popupProgress->Close(); + popupProgress->deleteLater(); + } +} + + +//_______________Server NFS Frame +FileShareMainFrameServer::FileShareMainFrameServer(): +VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("File Sharing Settings (2/2)")); + + VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true); + TransLabelSetting *deniedlabel = new TransLabelSetting(); + deniedlabel->setValue(" File sharing is not available for frontend_only systems." ); + denied->addChild(deniedlabel); + + VerticalConfigurationGroup* fileshare_frame_serversettings = + new VerticalConfigurationGroup(false,false,false,false); + fileshare_frame_serversettings->addChild(HostServiceNFS()); + fileshare_frame_serversettings->addChild(new SAMBAsettings); + + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); + if (hostparm.ThisSystemType == "Frontend_only" ) + { + addChild(denied); + } + else + { + smb_busy_box(); + addChild(fileshare_frame_serversettings); + } + +} + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h new file mode 100755 index 0000000..68be528 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/fileshare.h @@ -0,0 +1,45 @@ +#include <mythcontext.h> +#include <unistd.h> +#include <iostream> +#include <fstream> +#include <stdio.h> +#include "settings.h" +#include "installsettings.h" +#include <qsqldatabase.h> +#include <qsqlquery.h> + +#include <stdlib.h> +#include <cstdlib> +#include <mythtv/mythdbcon.h> +#include <qdir.h> +#include <qapplication.h> +#include "mythmiscutil.h" + + + + +class FileShareMainFrameClient: public VerticalConfigurationGroup { +public: + FileShareMainFrameClient(); +}; + + +class FileShareMainFrameServer: public VerticalConfigurationGroup { +public: + FileShareMainFrameServer(); +}; + + + + + + + +class ClientNFSSettings: public +TriggeredConfigurationGroup { +public: + ClientNFSSettings(); + +}; + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp new file mode 100755 index 0000000..34a2a33 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.cpp @@ -0,0 +1,733 @@ +#include <unistd.h> +#include <stdlib.h> +#include "infrared.h" +#include <Q3TextStream> + +using namespace std; + +extern HostParms hostparm; + +// READS IN REMOTES DESIGNATED AS favorites +HostRemoteTypeIR_favorites::HostRemoteTypeIR_favorites(): + HostImageSelect("HostRemoteType_favorites") { + setLabel(QObject::tr("Remote")); + QString dirtxt; + QString previewpath; + //scan templates + dirtxt=MV_ROOT; + dirtxt.append("templates/remotes/favorites"); + QDir remotes_global(dirtxt); + remotes_global.setFilter(QDir::Dirs); + remotes_global.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs); + QString previewpath_global; + previewpath_global = dirtxt; + for( QFileInfoList::iterator it = fil_global.begin(); + it != fil_global.end(); + ++it ) + { + QFileInfo &remote = *it; + previewpath=dirtxt; + previewpath+="/"; + previewpath+=remote.fileName() ; + previewpath+="/preview.jpg" ; + QFileInfo preview_global(previewpath); + if ( !preview_global.exists() ) + { + continue; + } + QImage* previewImage = new QImage(preview_global.absFilePath()); + addImageSelection(remote.fileName(), previewImage); + } +}; + +// READS IN REMOTES DESIGNATED AS OTHER +HostRemoteTypeIR_other::HostRemoteTypeIR_other(): + HostImageSelect("HostRemoteType_other") { + setLabel(QObject::tr("Remote")); + QString dirtxt; + QString previewpath; + //scan templates + + dirtxt=MV_ROOT; + dirtxt.append("templates/remotes/other"); + QDir remotes_global(dirtxt); + remotes_global.setFilter(QDir::Dirs); + remotes_global.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs); + QString previewpath_global; + previewpath_global = dirtxt; + for( QFileInfoList::iterator it = fil_global.begin(); + it != fil_global.end(); + ++it ) + { + QFileInfo &remote = *it; + previewpath=dirtxt; + previewpath+="/"; + previewpath+=remote.fileName() ; + previewpath+="/preview.jpg" ; + QFileInfo preview_global(previewpath); + if ( !preview_global.exists() ) + { + continue; + } + QImage* previewImage = new QImage(preview_global.absFilePath()); + addImageSelection(remote.fileName(), previewImage); + } +}; + + +// READS IN REMOTES DESIGNATED AS hauppauge +HostRemoteTypeIR_hauppauge::HostRemoteTypeIR_hauppauge(): + HostImageSelect("HostRemoteType_hauppauge") { + setLabel(QObject::tr("Remote")); + QString dirtxt; + QString previewpath; + //scan templates + + dirtxt=MV_ROOT; + dirtxt.append("templates/remotes/hauppauge"); + QDir remotes_global(dirtxt); + remotes_global.setFilter(QDir::Dirs); + remotes_global.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs); + QString previewpath_global; + previewpath_global = dirtxt; + for( QFileInfoList::iterator it = fil_global.begin(); + it != fil_global.end(); + ++it ) + { + QFileInfo &remote = *it; + previewpath=dirtxt; + previewpath+="/"; + previewpath+=remote.fileName() ; + previewpath+="/preview.jpg" ; + QFileInfo preview_global(previewpath); + if ( !preview_global.exists() ) + { + continue; + } + QImage* previewImage = new QImage(preview_global.absFilePath()); + addImageSelection(remote.fileName(), previewImage); + } +}; + + + +// READS IN REMOTES DESIGNATED AS ATI +HostRemoteTypeIR_ATI::HostRemoteTypeIR_ATI(): + HostImageSelect("HostRemoteType_ATI") { + setLabel(QObject::tr("Remote")); + QString dirtxt; + QString previewpath; + //scan templates + + dirtxt=MV_ROOT; + dirtxt.append("templates/remotes/ATI"); + QDir remotes_global(dirtxt); + remotes_global.setFilter(QDir::Dirs); + remotes_global.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs); + QString previewpath_global; + previewpath_global = dirtxt; + for( QFileInfoList::iterator it = fil_global.begin(); + it != fil_global.end(); + ++it ) + { + QFileInfo &remote = *it; + previewpath=dirtxt; + previewpath+="/"; + previewpath+=remote.fileName() ; + previewpath+="/preview.jpg" ; + QFileInfo preview_global(previewpath); + if ( !preview_global.exists() ) + { + continue; + } + QImage* previewImage = new QImage(preview_global.absFilePath()); + addImageSelection(remote.fileName(), previewImage); + } +}; + + + +// READS IN REMOTES DESIGNATED AS USER +HostRemoteTypeIR_user::HostRemoteTypeIR_user(): + HostImageSelect("HostRemoteType_user") { + setLabel(QObject::tr("Remote")); + QString dirtxt; + QString previewpath; + //scan home dir $HOME/remotes + dirtxt=QDir::homePath() ; + dirtxt.append("/remotes"); + + QDir remotes_global(dirtxt); + remotes_global.setFilter(QDir::Dirs); + remotes_global.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil_global = remotes_global.entryInfoList(QDir::Dirs); + QString previewpath_global; + previewpath_global = dirtxt; + int count = 0; + for( QFileInfoList::iterator it = fil_global.begin(); + it != fil_global.end(); + ++it ) + { + QFileInfo &remote = *it; + previewpath=dirtxt; + previewpath+="/"; + previewpath+=remote.fileName() ; + previewpath+="/preview.jpg" ; + QFileInfo preview_global(previewpath); + if ( !preview_global.exists() ) + { + continue; + } + QImage* previewImage = new QImage(preview_global.absFilePath()); + addImageSelection(remote.fileName(), previewImage); + count++; + } + QFileInfo preview_global(previewpath); + QImage* previewImage = new QImage(preview_global.absFilePath()); + if ( count == 0 ) + addImageSelection("none found", previewImage); + +}; + + + + + +static HostComboBox *HostReceiverType() +{ + HostComboBox *gc = new HostComboBox("HostReceiverType"); + gc->setLabel(QObject::tr("Receiver")); + gc->addSelection("Default"); + gc->addSelection("tinker"); + gc->addSelection("serial"); + gc->addSelection("streamzap"); + gc->addSelection("mce"); + //gc->addSelection("imon"); + gc->addSelection("Hauppauge"); + gc->addSelection("hd_pvr"); + gc->addSelection("CommandIR"); + gc->addSelection("iguanaIR-usb"); + gc->addSelection("SiliconDust_HDHR"); + + gc->setHelpText(QObject::tr("The type of infrared receiver used. Default will use ALL remote devices found.")); + gc->setValue("Default"); + return gc; +}; + + + +static HostComboBox *HostSerialPortlirc() +{ + HostComboBox *gc = new HostComboBox("HostSerialPortlirc",false); + gc->setLabel(QObject::tr("Serial Port")); + gc->addSelection("ttyS0"); + gc->addSelection("ttyS1"); + gc->addSelection("ttyS2"); + gc->addSelection("ttyS3"); + gc->setHelpText(QObject::tr("Serial port with the lirc receiver or transmitter")); + return gc; +} + +static HostComboBox *HostHDHRlirc_device() +{ + QString temphdhr; + temphdhr = gCoreContext->GetSetting("HostHDHRlirc_device"); + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HostHDHRlirc_device'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + HostComboBox *gc = new HostComboBox("HostHDHRlirc_device",false); + system ("hdhomerun_config discover > /tmp/.hdhrdiscover"); + gc->setLabel(QObject::tr("HDHR device")); + gc->setHelpText(QObject::tr("HDHomeRun device to use as remote receiver. Identifier listed is the Device id found on the bottom of the HDHomeRun.")); + QString currentitem; + QString line; + QFile file("/tmp/.hdhrdiscover"); + bool foundhdhr; + foundhdhr = false; + + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("hdhomerun device")) + { + currentitem = line.section( " ", 2, 2 ); + gc->addSelection(currentitem); + foundhdhr = true; + } + } + file.close(); + } + + //These are all hoops to jump through to clear out the device list and save when the combobox isn't touched by the user and they just accept the defaults + if ( foundhdhr == false ) + { + gc->clearSelections(); + gc->addSelection("No devices found"); + gc->setValue("No devices found"); + gCoreContext->SaveSetting("HostHDHRlirc_device","No devices found"); + } + else + { + int findhdhr=gc->findSelection(temphdhr); + //JM VERBOSE(VB_IMPORTANT, findhdhr); + if ( findhdhr > -1 ) + { + gc->addSelection(temphdhr); + gc->setValue(temphdhr); + gCoreContext->SaveSetting("HostHDHRlirc_device", temphdhr ); + } + else + { + gCoreContext->SaveSetting("HostHDHRlirc_device", gc->getValue()); + } + } + + return gc; +} + + + +class LIRC_ReceiverSettings: public TriggeredConfigurationGroup { +public: + LIRC_ReceiverSettings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + Setting* trigger = HostReceiverType() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true); + + ConfigurationGroup* settings = new GridConfigurationGroup(2,true); + settings->addChild(HostSerialPortlirc()); + + ConfigurationGroup* hdhrsettings = new GridConfigurationGroup(2,true); + hdhrsettings->addChild(HostHDHRlirc_device()); + + + + addTarget("Default", blanksettings); + addTarget("tinker", blanksettings ); + addTarget("serial", settings); + addTarget("imon", blanksettings ); + //addTarget("Hauppauge",blanksettings); + addTarget("hd_pvr",blanksettings); + addTarget("CommandIR", blanksettings); + addTarget("iguanaIR-usb", blanksettings); + addTarget("mce", blanksettings); + addTarget("streamzap", blanksettings); + addTarget("SiliconDust_HDHR", hdhrsettings); + + }; +}; + +static HostComboBox *HostRemotebucket() +{ + HostComboBox *gc = new HostComboBox("HostRemotebucket"); + gc->setLabel(QObject::tr("Remote Class")); + gc->addSelection("favorites"); + gc->addSelection("hauppauge"); + gc->addSelection("ATI"); + gc->addSelection("user"); + gc->addSelection("other"); + + gc->setHelpText(QObject::tr("Remote classification. Favorites are remotes fully supported by LinHES.")); + + return gc; +}; + + +class Remote_bucket: public TriggeredConfigurationGroup { +public: + Remote_bucket(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + Setting* trigger = HostRemotebucket() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true); + ConfigurationGroup* favorites_def = new GridConfigurationGroup(2,true); + favorites_def-> addChild(new HostRemoteTypeIR_favorites()); + + ConfigurationGroup* other_def = new GridConfigurationGroup(2,true); + other_def-> addChild(new HostRemoteTypeIR_other()); + + ConfigurationGroup* hauppauge_def = new GridConfigurationGroup(2,true); + hauppauge_def-> addChild(new HostRemoteTypeIR_hauppauge()); + + ConfigurationGroup* ATI_def = new GridConfigurationGroup(2,true); + ATI_def-> addChild(new HostRemoteTypeIR_ATI()); + + + ConfigurationGroup* user_def = new GridConfigurationGroup(2,true); + user_def-> addChild(new HostRemoteTypeIR_user()); + + addTarget("favorites", favorites_def); + addTarget("hauppauge", hauppauge_def); + addTarget("ATI", ATI_def); + addTarget("user", user_def); + addTarget("other", other_def); + + + + + }; +}; + + + + + + + +IRFrame::IRFrame(): + VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("Remotes Settings")); + LIRC_ReceiverSettings *receiversettings = new LIRC_ReceiverSettings(); + //addChild(new HostRemoteTypeIR()); + addChild(new Remote_bucket()); + addChild(receiversettings); +} + + +//----------------transmit settings-------------- +static HostComboBox *HostTransmitproto_1() +{ + HostComboBox *gc = new HostComboBox("HostTransmitproto_1",false); + gc->setLabel(QObject::tr("Transmitter 1")); + gc->addSelection("none"); + gc->setValue(0); + gc->setHelpText(QObject::tr("Remote codes to control a cable box")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/transmit"); + QDir transmit(dirtxt); + transmit.setFilter(QDir::Dirs); + transmit.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil = transmit.entryInfoList(QDir::Dirs); + for( QFileInfoList::iterator it = fil.begin(); + it != fil.end(); + ++it ) + { + QFileInfo ¤titem = *it; + // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); + if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") + { + gc->addSelection(currentitem.fileName()); + } + } + return gc; +}; + + + + + +static HostComboBox *HostTransmitproto_2() +{ + HostComboBox *gc = new HostComboBox("HostTransmitproto_2",false); + gc->setLabel(QObject::tr("Transmitter 2")); + gc->addSelection("none"); + gc->setValue(0); + gc->setHelpText(QObject::tr("Remote codes to control a cable box")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/transmit"); + QDir transmit(dirtxt); + transmit.setFilter(QDir::Dirs); + transmit.setSorting(QDir::Name | QDir::IgnoreCase); + QFileInfoList fil = transmit.entryInfoList(QDir::Dirs); + for( QFileInfoList::iterator it = fil.begin(); + it != fil.end(); + ++it ) + { + QFileInfo ¤titem = *it; + // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); + if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") + { + gc->addSelection(currentitem.fileName()); + } + } + return gc; +}; + +static HostComboBox *HostTransmitproto_3() +{ + HostComboBox *gc = new HostComboBox("HostTransmitproto_3",false); + gc->setLabel(QObject::tr("Transmitter 3")); + gc->addSelection("none"); + gc->setValue(0); + gc->setHelpText(QObject::tr("Remote codes to control a cable box")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/transmit"); + QDir transmit(dirtxt); + transmit.setFilter(QDir::Dirs); + QFileInfoList fil = transmit.entryInfoList(QDir::Dirs); + for( QFileInfoList::iterator it = fil.begin(); + it != fil.end(); + ++it ) + { + QFileInfo ¤titem = *it; + // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); + if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") + { + gc->addSelection(currentitem.fileName()); + } + } + return gc; +}; + +static HostComboBox *HostTransmitproto_4() +{ + HostComboBox *gc = new HostComboBox("HostTransmitproto_4",false); + gc->setLabel(QObject::tr("Transmitter 4")); + gc->addSelection("none"); + gc->setValue(0); + gc->setHelpText(QObject::tr("Remote codes to control a cable box")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/transmit"); + QDir transmit(dirtxt); + QFileInfoList fil = transmit.entryInfoList(QDir::Dirs); + for( QFileInfoList::iterator it = fil.begin(); + it != fil.end(); + ++it ) + { + QFileInfo ¤titem = *it; + // //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); + if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") + { + gc->addSelection(currentitem.fileName()); + } + } + return gc; +}; + + +static HostComboBox *HostBlasterType() +{ + HostComboBox *gc = new HostComboBox("HostBlasterType"); + gc->setLabel(QObject::tr("Blaster")); + gc->addSelection("None"); + gc->addSelection("Receiver"); + gc->addSelection("serial"); + gc->addSelection("CommandIR"); + + //gc->addSelection("Hauppauge"); + gc->addSelection("mce"); + //gc->addSelection("pvr150"); + gc->addSelection("iguanaIR-usb"); + gc->addSelection("hd_pvr"); + gc->setHelpText(QObject::tr("The type of infrared transmitter being used. Selecting CommandIR or iguanaIR-usb will use that device for both transmitting and receiving. All other receivers will be disabled.")); + gc->setValue("None"); + return gc; +}; + +static HostComboBox *HostSerialPort_blasterlirc() +{ + HostComboBox *gc = new HostComboBox("HostSerialPort_blasterlirc",false); + gc->setLabel(QObject::tr("Serial Port")); + gc->addSelection("ttyS0"); + gc->addSelection("ttyS1"); + gc->addSelection("ttyS2"); + gc->addSelection("ttyS3"); + gc->setHelpText(QObject::tr("Serial port with the lirc transmitter")); + return gc; +} + + +static HostSpinBox *HostTransmitDelay_1() +{ + HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_1", 1 , 200, 1, true); + gc->setLabel(QObject::tr("Delay")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits")); + return gc; +} +static HostComboBox *HostTransmitSend_after_1() +{ + HostComboBox *gc = new HostComboBox("HostTransmitSend_after_1",false); + gc->setLabel(QObject::tr("Key:")); + gc->addSelection("Enter"); + gc->addSelection("Select"); + gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select")); + return gc; +} + +static HostSpinBox *HostTransmitDelay_2() +{ + HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_2", 1 , 200, 1, true); + gc->setLabel(QObject::tr("Delay")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits")); + return gc; +} +static HostComboBox *HostTransmitSend_after_2() +{ + HostComboBox *gc = new HostComboBox("HostTransmitSend_after_2",false); + gc->setLabel(QObject::tr("Key:")); + gc->addSelection("Enter"); + gc->addSelection("Select"); + gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select")); + return gc; +} + + +static HostSpinBox *HostTransmitDelay_3() +{ + HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_3", 1 , 200, 1, true); + gc->setLabel(QObject::tr("Delay")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits")); + return gc; +} +static HostComboBox *HostTransmitSend_after_3() +{ + HostComboBox *gc = new HostComboBox("HostTransmitSend_after_3",false); + gc->setLabel(QObject::tr("Key:")); + gc->addSelection("Enter"); + gc->addSelection("Select"); + gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select")); + return gc; +} + + +static HostSpinBox *HostTransmitDelay_4() +{ + HostSpinBox *gc = new HostSpinBox("HostTransmitDelay_4", 1 , 200, 1, true); + gc->setLabel(QObject::tr("Delay")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Amount of delay in tenths of a second between transmits")); + return gc; +} +static HostComboBox *HostTransmitSend_after_4() +{ + HostComboBox *gc = new HostComboBox("HostTransmitSend_after_4",false); + gc->setLabel(QObject::tr("Key:")); + gc->addSelection("Enter"); + gc->addSelection("Select"); + gc->setHelpText(QObject::tr("Name of the key to send after transmitting the numbers. For example Enter or Select")); + return gc; +} + + + + + + + +class LIRC_BlasterSettings: public TriggeredConfigurationGroup { +public: + LIRC_BlasterSettings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + Setting* trigger = HostBlasterType() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true); + + ConfigurationGroup* transmit_1 = new GridConfigurationGroup(3,true); + transmit_1->addChild(HostTransmitproto_1()); + transmit_1->addChild(HostTransmitDelay_1()); + //transmit_1->addChild(HostTransmitSend_after_1()); + + ConfigurationGroup* transmit_2 = new GridConfigurationGroup(3,true); + transmit_2->addChild(HostTransmitproto_2()); + transmit_2->addChild(HostTransmitDelay_2()); + //transmit_2->addChild(HostTransmitSend_after_2()); + + + ConfigurationGroup* transmit_3 = new GridConfigurationGroup(3,true); + transmit_3->addChild(HostTransmitproto_3()); + transmit_3->addChild(HostTransmitDelay_3()); + //transmit_3->addChild(HostTransmitSend_after_3()); + + ConfigurationGroup* transmit_4 = new GridConfigurationGroup(3,true); + transmit_4->addChild(HostTransmitproto_4()); + transmit_4->addChild(HostTransmitDelay_4()); + //transmit_4->addChild(HostTransmitSend_after_4()); + + ConfigurationGroup* CommandIRsettings = new GridConfigurationGroup(1,true); + CommandIRsettings->addChild(transmit_1); + CommandIRsettings->addChild(transmit_2); + CommandIRsettings->addChild(transmit_3); + CommandIRsettings->addChild(transmit_4); + + ConfigurationGroup* mcesettings = new GridConfigurationGroup(1,true); + mcesettings->addChild(transmit_1); + mcesettings->addChild(transmit_2); + + ConfigurationGroup* serial_settings = new GridConfigurationGroup(1,true); + serial_settings->addChild(HostSerialPort_blasterlirc()); + serial_settings->addChild(transmit_1); + + addTarget("None", blanksettings); + addTarget("Receiver", transmit_1); + addTarget("Serial", serial_settings); + addTarget("CommandIR", CommandIRsettings); + //addTarget("pvr150",blanksettings); + addTarget("hd_pvr",transmit_1); + addTarget("mce",mcesettings); + addTarget("iguanaIR-usb",mcesettings); +// addTarget("tinker", blanksettings ); + }; +}; + +IR_TransmitFrame::IR_TransmitFrame(): + VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("Blaster Settings")); + LIRC_BlasterSettings *blastersettings = new LIRC_BlasterSettings(); + addChild(blastersettings); +} + +//------------------LCD settings------------- + + + +static HostComboBox *HostLCDType() +{ + HostComboBox *gc = new HostComboBox("HostLCDType",false); + gc->setLabel(QObject::tr("LCD/VFD model")); + gc->addSelection("no_lcd"); + gc->addSelection("tinker"); + gc->setValue(0); + gc->setHelpText(QObject::tr("VFD or LCD")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/LCD"); + QDir transmit(dirtxt); + transmit.setFilter(QDir::Dirs); + QFileInfoList fil = transmit.entryInfoList(QDir::Dirs); + for( QFileInfoList::iterator it = fil.begin(); + it != fil.end(); + ++it ) + { + QFileInfo ¤titem = *it; + //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); + if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") + { + gc->addSelection(currentitem.fileName()); + } + } + return gc; +}; + +LCDFrame::LCDFrame(): + VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("LCD Settings")); + addChild(HostLCDType()); +} + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h new file mode 100755 index 0000000..e11c49d --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/infrared.h @@ -0,0 +1,67 @@ +#include <mythcontext.h> +#include <unistd.h> +#include <iostream> +#include <fstream> +#include <stdio.h> +#include "settings.h" +#include "installsettings.h" +#include <qsqldatabase.h> +#include <qsqlquery.h> + +#include <stdlib.h> +#include <cstdlib> +#include <mythtv/mythdbcon.h> +#include <qdir.h> +#include <qapplication.h> +#include "mythmiscutil.h" + +class IRFrame: public VerticalConfigurationGroup { +public: + IRFrame(); +}; + + +class HostRemoteTypeIR_favorites: public HostImageSelect { +public: + HostRemoteTypeIR_favorites(); +}; + +class HostRemoteTypeIR_other: public HostImageSelect { +public: + HostRemoteTypeIR_other(); +}; + +class HostRemoteTypeIR_hauppauge: public HostImageSelect { +public: + HostRemoteTypeIR_hauppauge(); +}; + +class HostRemoteTypeIR_ATI: public HostImageSelect { +public: + HostRemoteTypeIR_ATI(); +}; + + +class HostRemoteTypeIR_user: public HostImageSelect { +public: + HostRemoteTypeIR_user(); +}; + + +class IR_TransmitFrame: public VerticalConfigurationGroup { +public: + IR_TransmitFrame(); + +}; + +class LCDFrame: public VerticalConfigurationGroup { +public: + LCDFrame(); + +}; + + + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml b/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml new file mode 100755 index 0000000..c03d962 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/install-ui.xml @@ -0,0 +1,148 @@ +<mythuitheme> + + <window name="welcome_screen"> + <!-- <font name="title" face="Arial"> + <color>#ffff00</color> + <dropcolor>#000000</dropcolor> + <size>24</size> + <shadow>3,3</shadow> + <bold>yes</bold> + </font> + + <font name="time" face="Arial"> + <color>#9999cc</color> + <size>18</size> + <bold>yes</bold> + </font> + + <font name="label" face="Arial"> + <color>#ffff00</color> + <dropcolor>#000000</dropcolor> + <size>18</size> + <shadow>3,3</shadow> + <bold>yes</bold> + </font> + + <font name="info" face="Arial"> + <color>#ffffff</color> + <size>18</size> + <bold>yes</bold> + </font> + + <font name="biginfo" face="Arial"> + <color>#ffffff</color> + <size>50</size> + <bold>yes</bold> + </font> + <font name="warning" face="Arial"> + <color>#ff0000</color> + <dropcolor>#000000</dropcolor> + <size>16</size> + <shadow>2,2</shadow> + <bold>yes</bold> + </font> + + <font name="buttons" face="Arial"> + <color>#ffff00</color> + <size>14</size> + <bold>yes</bold> + </font> + <font name="tinyinfo" face="Arial"> + <color>#9999cc</color> + <size>12</size> + <bold>no</bold> + </font>--> + + <textarea name="title" from="basetextarea"> + <area>50,10,700,40</area> + <font>title</font> + <align>allcenter</align> + <value>Welcome to MythVantage!</value> + </textarea> + + + <textarea name="time_text" draworder="0" align="right"> + <multiline>no</multiline> + <font>time</font> + <area>660,520,110,30</area> + <value></value> + </textarea> + + <textarea name="date_text" > + <multiline>yes</multiline> + <font>warning</font> + <area>20,55,740,100</area> + <value></value> + <align>allcenter</align> + </textarea> + + <!-- + current myth status + --> + + <textarea name="status_text"> + <multiline>yes</multiline> + <font>info</font> + <area>20,300,760,60</area> + <value></value> + <align>center</align> + </textarea> + + <!-- + current recordings status + --> + + <textarea name="recording_label" draworder="1" align="center"> + <font>label</font> + <area>20,140,760,30</area> + <!--<value>Percent Complete </value>--> + <value></value> + </textarea> + + <textarea name="recording_text"> + <multiline>yes</multiline> + <font>biginfo</font> + <area>20,140,760,150</area> + <value></value> + <align>allcenter</align> + </textarea> + + <textarea name="scheduled_label" draworder="1" align="center"> + <font>label</font> + <area>20,320,760,30</area> + <value></value> + </textarea> + + <textarea name="scheduled_text"> + <multiline>yes</multiline> + <font>biginfo</font> + <area>20,400,760,120</area> + <value></value> + <align>allcenter</align> + </textarea> + + <textarea name="mythvantage_text"> + <multiline>no</multiline> + <font>tinyinfo</font> + <area>20,540,760,30</area> + <value></value> + <align>right</align> + </textarea> + <imagetype name="logo"> + <position>10,10</position> + <preserveaspect>true</preserveaspect> + <crop>x,y,w,h</crop> + <filepattern low="0" high="3000">/usr/MythVantage/logos/logo-%1.png</filepattern> + <delay>5000</delay> + </imagetype> + + <imagetype name="logo1"> + <position>550,10</position> + <filename>/usr/MythVantage/logos/</filename> + <preserveaspect>true</preserveaspect> + <crop>x,y,w,h</crop> + </imagetype> + + </window> + +</mythuitheme> diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh b/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh new file mode 100755 index 0000000..a1a722e --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/install_proxy.sh @@ -0,0 +1,353 @@ +#!/bin/bash +disk=$2 +rootfs=$3 +rootsize=$4 +datafs=$5 +datasize=$6 +swapsize=$7 +mountpoint="/new_boot" +run=/root/install_functions.sh +. /etc/systemconfig 2>/dev/null + + +progress () { +mypercent=`echo "$1" | cut -d. -f1` +if [ x$mypercent = x ] +then +echo "" > /tmp/.install_percent +else +echo "${mypercent}% complete" > /tmp/.install_percent +fi + + +} + +full_install () { + if [ -f /tmp/.this_is_upgrade ] + then + rm /tmp/.this_is_upgrade + fi + echo "Partitioning $disk" > /tmp/.install_state + progress 1 + sleep 1 + $run partition_it $disk $rootsize $datasize $swapsize + + echo "Formating $disk" > /tmp/.install_state + progress 2 + sleep 1 + $run format_it $disk $rootfs $datafs + + echo "Preparing $disk" > /tmp/.install_state + progress 3 + sleep 1 + $run mount_it $disk + + startsize=`statgrab -M disk.|grep $disk.write_bytes|cut -d= -f 2|tr -d " "` + + echo "STARTSIZE=$startsize">/tmp/.startsize.io + echo "Installing data" > /tmp/.install_state + + sleep 1 + $run copy_it $disk ALL + $run fstab_fix_it $disk $rootfs $datafs + + progress 99 + sleep 1 + $run grub_it $disk + + echo "Configuring system" > /tmp/.install_state + progress 100 + sleep 1 + cp -f /etc/systemconfig "$mountpoint"/etc + #run save syssettings to save settings, then copy to new mountpoint + /root/restore_default_settings.sh -c save -t syssettings -h myhost -d 127.0.0.1 + SE=/usr/share/templates/settings/syssettings + mkdir -p ${mountpoint}$SE + cp -rp $SE/* ${mountpoint}$SE/ + chown root:mythtv "$mountpoint"/etc/systemconfig + chown -R mythtv:mythtv ${mountpoint}$SE + + chmod -R 775 ${mountpoint}$SE + chmod 775 "$mountpoint"/etc/systemconfig + #copy over any updates that might have occured + cp -f /root/*.sh "$mountpoint"/root/ + chmod -R 755 ${mountpoint}/root + cp /etc/mtab "$mountpoint"/etc/mtab + chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network + + if [ $SystemType = "Master_backend" -o $SystemType = "Standalone" ] + then + #installing DB to local machine + + chroot "$mountpoint" /root/install_db_chroot.sh + else + #update remotedb with this host settings + chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t Default + chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t syssettings + #Run second time + chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network + fi + echo "Done" > /tmp/.install_state + $run unmount_it $disk +} + + + + +function upgrade () { + touch /tmp/.this_is_upgrade + + if [ ! x$rootfs = "xDo_not_format" ] + then + echo "Formating $disk" > /tmp/.install_state + progress 2 + sleep 1 + $run format_it $disk $rootfs NO + fi + + + echo "Preparing $disk" > /tmp/.install_state + progress 3 + sleep 1 + $run mount_it $disk + startsize=`statgrab -M disk.|grep $disk.write_bytes|cut -d= -f 2|tr -d " "` + echo "STARTSIZE=$startsize">/tmp/.startsize.io + echo "Installing data" > /tmp/.install_state + sleep 1 + cp -rf /tmp/etc /new_boot/etc.old + cp -rf /tmp/oss /new_boot/var/lib/oss.old + $run copy_it $disk bin.lzm,boot.lzm,etc.lzm,home.lzm,lib.lzm,opt.lzm,root.lzm,sbin.lzm,usr.lzm,var.lzm + + if [ x$rootfs = "xDo_not_format" ] + then + rootfs=`grep ${disk}1 /tmp/etc/fstab |awk ' { print $3 } '` + fi + datafs=`grep ${disk}3 /tmp/etc/fstab |awk ' { print $3 } '` + $run fstab_fix_it $disk $rootfs $datafs + + echo "Writing boot sector" > /tmp/.install_state + progress 99 + sleep 1 + $run grub_it $disk + + + echo "Configuring system" > /tmp/.install_state + progress + sleep 1 + cp /etc/mtab "$mountpoint"/etc/mtab + cp -f /etc/systemconfig "$mountpoint"/etc + cp -f /root/*.sh "$mountpoint"/root/ + chmod -R 755 ${mountpoint}/root + chown root:mythtv "$mountpoint"/etc/systemconfig + chmod 775 "$mountpoint"/etc/systemconfig + chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network + # chroot "$mountpoint" /root/restore_default_settings.sh restore Default + chroot "$mountpoint" /root/restore_default_settings.sh -c restore -t syssettings + #Run second time + chroot "$mountpoint" /root/systemconfig.sh misc,hostype,network + # fi + + echo "Done" > /tmp/.install_state + + $run unmount_it $disk +} + + + +function killdhcp () { +if [ -f /etc/dhcpc/dhcpcd-eth0.pid ] + then + pid=`cat /etc/dhcpc/dhcpcd-eth0.pid` + kill -9 $pid + rm -f /etc/dhcpc/dhcpcd-eth0.pid + rm -f /var/run/dhcpcd* + fi +if [ -f /var/run/dhcpcd-eth0.pid ] + then + pid=`cat /var/rundhcpcd-eth0.pid` + kill -9 $pid + rm -f /var/run/dhcpcd-eth0.pid* + fi +ip address flush dev eth0 +} + +function network_setup () { +DEVICE=eth0 + if [ ! -f /etc/systemconfig ] + then + exit 1 + fi +killdhcp + +if [ $UseDHCP = 0 ] +then + /sbin/dhcpcd $DEVICE + if [ ! $? = 0 ] + then + exit 2 + fi +fi + +if [ $UseDHCP = 1 ] +then + + /sbin/ifconfig $DEVICE $ip + /sbin/route add default gw $route + echo "nameserver $nameserver" > /etc/resolv.conf +fi + + +} + +function SANE_SYSETTINGS () { +sed -e '/HOSTrootfstype/d' \ + -e '/HOSTrootfstype/d' \ + -e '/HOSTdatafstype/d' \ + -e '/HOSTOSsize/d' \ + -e '/HostUseALLdata/d' \ + -e '/HOSTDATAsize/d' \ + -e '/HOSTuprootfstype/d' \ + -e '/HostUseSWAP/d' \ + -e '/HOSTSWAPsize/d ' /tmp/usr/share/templates/settings/syssettings/settings.txt > /tmp/settings.new + mv /tmp/settings.new /tmp/usr/share/templates/settings/syssettings/settings.txt +} + +case $1 in + full_install_it ) + + full_install + ;; + find_update) + #TRY TO mount first partition of drive + #copy /etc/systemconfig to live, import settings into db + #umount drive + $run mount_it $disk + if [ -f /new_boot/etc/systemconfig ] + then + ###########ADD templates + mkdir -p /tmp/usr/share/templates + cp -pr /new_boot/usr/share/templates /tmp/usr/share + SANE_SYSETTINGS + cp -rp /tmp/usr/share/templates/settings /usr/share/templates + + + cp /new_boot/etc/systemconfig /etc/systemconfig + cp -rf /new_boot/etc /tmp/etc + cp -rf /new_boot/var/lib/oss /tmp/oss + + /root/restore_default_settings.sh -c restore -t syssettings -h myhost -d 127.0.0.1 + fi + $run umount_it $disk + ;; + + upgrade_it) + #"/root/install_proxy.sh upgrade_it " + install_drive + " " + rootfs + "&" + upgrade + + ;; + disk_model_it) + model="unknown" + size="xxx" + case $2 in + + h* ) + model=`cat /proc/ide/$2/model` + ;; + s*) model=`sginfo /dev/$2|grep Product|awk ' { print $2 } '` + ;; + esac + size=`parted /dev/$2 print |grep Disk|awk ' { print $3 } ' ` + + + echo ""$model" $size " >/tmp/model + + ;; + network_check_it) + #Should never return from check_network + case $2 in + setup_network) network_setup + ;; + + check_self) + myipeth0=`ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'|head -n1` + ping -c 1 $myipeth0 + if [ ! $? = 0 ] + then + exit 3 + #can't ping yourself + fi + ;; + check_gw) + #check gateway + mygweth0=`/sbin/route |grep eth0|grep UG|awk '{ print $2}'` + ping -c 1 $mygweth0 + if [ ! $? = 0 ] + then + exit 4 + #can't ping the gw + fi + ;; + check_ns) + #check nameserver + mydns=`cat /etc/resolv.conf|grep nameserver|head -1|awk '{ print $2}'` + ping -c 1 $mydns + if [ ! $? = 0 ] + then + exit 5 + #can't ping the gw + fi + ;; + check_names) + host google.com + if [ ! $? = 0 ] + then + exit 6 + #can't ping the gw + fi + ;; + esac + exit 0 + ;; + + + * ) + state=`cat /tmp/.install_state` + if [ x"${state}" = "xConfiguring system" ] + then + progress "" + else + #finding the drive + ddrive=`df | grep $mountpoint | head -n1 | awk -F/ ' { print $3 } ' | cut -d" " -f 1|cut -b1,2,3 ` + used=`statgrab -M disk.|grep ${ddrive}.write_bytes|cut -d= -f 2|tr -d " "` + . /tmp/.startsize.io + used=`echo $used-$STARTSIZE|bc` + echo $used + + if [ ! x$used = x ] + then + . /root/.install_size + #somehow find if it's an install or update + if [ -f /tmp/.this_is_upgrade ] + then + total=$UPGRADESIZE + else + total=$TOTALSIZE + fi + percent=`echo "scale=2 ; ($used/$total) * 100 " |bc ` + cond2=$(echo "$percent > 100" |bc ) + if [ $cond2 -eq 1 ] + then + percent=100 + fi + cond3=$(echo "$percent < 3" |bc ) + if [ $cond3 -eq 0 ] + then + progress $percent + fi + fi + fi + ;; +esac + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp new file mode 100755 index 0000000..80bd5d5 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.cpp @@ -0,0 +1,272 @@ +#include <mythcontext.h> +#include <unistd.h> +#include "installationtype.h" +//Added by qt3to4: +#include <Q3TextStream> + +#include <qdir.h> +#include "mv_common.h" + + +int mythinstalltype (QString tmp_install_drive) +{ + + Mythinstalltype setting; + //FINDME this is needed to populate the default values and have the triggered config work + setting.Load(); + setting.Save(); + + int retc = 1 ; + if ( setting.exec() == QDialog::Accepted ) + { + retc = 0; + } + return retc; + +}; + +static HostComboBox *HOSTinstallationtype() +{ + HostComboBox *gc = new HostComboBox("HOSTinstallationtype"); + gc->setLabel(QObject::tr("Installation Type")); + gc->addSelection("Full/Auto") ; + + gc->addSelection("Upgrade"); + + //gc->setValue("Full/Auto"); + gc->setHelpText(QObject::tr("Full install will erase the entire drive and repartition. Upgrade will format only the first parition of the drive. Only LinHES R8.0 or newer can use Upgrade.")); + + return gc; +} + +static HostSpinBox *HOSTOSsize() +{ +#ifdef __MVAPP__ + HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 2, 15, 1, true); +#else + HostSpinBox *gc = new HostSpinBox("HOSTOSsize", 3, 25, 1, true); +#endif + gc->setLabel(QObject::tr("OS size (GB)")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Amount of space allocated for the root OS." )); + + return gc; +} + +static HostSpinBox *HOSTDATAsize() +{ + HostSpinBox *gc = new HostSpinBox("HOSTDATAsize", 2, 1500, 1, true); + gc->setLabel(QObject::tr("Data size (GB)")); + gc->setValue(3); + gc->setHelpText(QObject::tr("" )); + + return gc; +} + +static HostSpinBox *HOSTHOMEsize() +{ + HostSpinBox *gc = new HostSpinBox("HOSTHOMEsize", 1, 1500, 1, true); + gc->setLabel(QObject::tr("Home dir size (GB)")); + gc->setValue(3); + gc->setHelpText(QObject::tr("Amount of space allocated for the home directories partition. Three to five GB will be sufficient for most people. The home partition will be the same filesystem as the root OS." )); + + return gc; +} + + +static HostSpinBox *HOSTDatabasesize() +{ + HostSpinBox *gc = new HostSpinBox("HOSTDatabasesize", 1, 20, 1, true); + gc->setLabel(QObject::tr("Database partition size (GB)")); + gc->setValue(4); + gc->setHelpText(QObject::tr("Amount of space allocated for the database partition. Two GB is more then enough for most people. The database partition space will be formatted with the ext3 filesystem." )); + + return gc; +} + + + + +static HostSpinBox *HOSTSWAPsize() +{ + QString currentitem; + QString line; + QFile file("/proc/meminfo"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + line = t.readLine(); + if ( line.startsWith("MemTotal:")) + { + currentitem = line.simplifyWhiteSpace(); + currentitem = currentitem.section( " ", 1, 1 ); + } + } + file.close(); + bool ok; + int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE + mem = mem/1024 ; + if ( ! ok ) + mem = 120 ; + HostSpinBox *gc = new HostSpinBox("HOSTSWAPsize", 128, 128000, 128, true); + gc->setLabel(QObject::tr("Swapspace size (MB)")); + gc->setValue(mem); + gc->setHelpText(QObject::tr("Amount of space allocated for the swap partition." )); + + return gc; +} + +static HostCheckBox *HostUseSWAP() +{ + HostCheckBox *gc = new HostCheckBox("HostUseSWAP"); + gc->setLabel(QObject::tr("Use swap partition")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Enable or disable the swap partition.")); + return gc; +}; + +static HostCheckBox *HostUseALLdata() +{ + HostCheckBox *gc = new HostCheckBox("HostUseALLdata"); + gc->setLabel(QObject::tr("Use all remaining space for data")); + gc->setValue(true); + gc->setHelpText(QObject::tr("If checked the remaining space on the drive will be used for storage. Otherwise you can set the size of the partition.")); + return gc; +}; + + +static HostComboBox *HOSTdatafstype() +{ + HostComboBox *gc = new HostComboBox("HOSTdatafstype"); + gc->setLabel(QObject::tr("Data filesystem")); + gc->addSelection("ext3") ; + gc->addSelection("ext4") ; + // gc->addSelection("reiserfs"); + gc->addSelection("jfs"); + gc->addSelection("xfs"); + //gc->addSelection("btrfs"); + + gc->setHelpText(QObject::tr("Filesystem type for data storage.")); + + return gc; +} + +static HostComboBox *HOSTuprootfstype() +{ + HostComboBox *gc = new HostComboBox("HOSTuprootfstype"); + gc->setLabel(QObject::tr("OS file system")); + gc->addSelection("ext3") ; + gc->addSelection("ext4") ; + gc->addSelection("reiserfs"); + gc->addSelection("jfs"); + //gc->addSelection("xfs"); + //gc->addSelection("btrfs"); + gc->addSelection("Do_not_format"); + + gc->setHelpText(QObject::tr("Filesystem type for OS. ")); + + return gc; +} + +static HostComboBox *HOSTrootfstype() +{ + HostComboBox *gc = new HostComboBox("HOSTrootfstype"); + gc->setLabel(QObject::tr("Root filesystem format")); + gc->addSelection("ext3") ; + gc->addSelection("ext4") ; + gc->addSelection("reiserfs"); + gc->addSelection("jfs"); + //gc->addSelection("btrfs"); + //gc->addSelection("xfs"); + + gc->setHelpText(QObject::tr("Filesystem type for root OS.")); + + return gc; +} + +class USESwap: + public TriggeredConfigurationGroup { +public: + USESwap(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + SetVertical(false); + Setting* useswap = HostUseSWAP(); + addChild(useswap); + setTrigger(useswap); + + + ConfigurationGroup* swapyes = new VerticalConfigurationGroup(false); + swapyes->addChild(HOSTSWAPsize()); + addTarget("1", swapyes ); + addTarget("0", new VerticalConfigurationGroup(true)); + }; +}; + +class DATAsize: + public TriggeredConfigurationGroup { +public: + DATAsize(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + SetVertical(false); + Setting* datasize = HostUseALLdata(); + addChild(datasize); + setTrigger(datasize); + + ConfigurationGroup* alldatano = new VerticalConfigurationGroup(false); + alldatano->addChild(HOSTDATAsize()); + alldatano->addChild(HOSTdatafstype()); + + + ConfigurationGroup* alldatayes = new VerticalConfigurationGroup(false); + alldatayes->addChild(HOSTdatafstype()); + + addTarget("1", alldatayes); + addTarget("0", alldatano); + }; +}; + + + + +class Installationtype: + public TriggeredConfigurationGroup { +public: + Installationtype(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + setLabel(QObject::tr("LinHES Install")); + Setting *Mtemplate = HOSTinstallationtype(); + addChild(Mtemplate); + setTrigger(Mtemplate); + + ConfigurationGroup *ospartition = new GridConfigurationGroup(2,false); + ospartition->addChild(HOSTOSsize()); + ospartition->addChild(HOSTrootfstype()); + ospartition->addChild(HOSTHOMEsize()); + ospartition->addChild(HOSTDatabasesize()); + + ConfigurationGroup *tupgrade = new VerticalConfigurationGroup(false); + tupgrade->addChild(HOSTuprootfstype()); + + ConfigurationGroup *tfull = new VerticalConfigurationGroup(false); +// tfull->addChild(HOSTOSsize()); +// tfull->addChild(HOSTrootfstype()); + tfull->addChild(ospartition); + tfull->addChild(new USESwap); + tfull->addChild(new DATAsize); + + addTarget("Upgrade",tupgrade ); + addTarget("Full/Auto", tfull); + }; +}; + +Mythinstalltype::Mythinstalltype() +{ + //Reseting the install type to remove "NET" + if ( gCoreContext->GetSetting("Hostinstallationtype") == "NET") + gCoreContext->SaveSetting("HOSTinstallationtype","Full/Auto"); + Installationtype *installationtype = new Installationtype(); + addChild(installationtype); +}; + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h new file mode 100755 index 0000000..e043f0a --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installationtype.h @@ -0,0 +1,11 @@ +#include <settings.h> +#include "mythdialogs.h" + +class Mythinstalltype: public ConfigurationWizard { +public: + Mythinstalltype(); + +}; + +int mythinstalltype(QString); + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp new file mode 100755 index 0000000..ac72a0b --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.cpp @@ -0,0 +1,1179 @@ +#include <qapplication.h> +//Added by qt3to4: +#include <Q3TextStream> +#include <unistd.h> +#include <fstream> + +#include "mythcontext.h" +//#include "tv.h" +#include "uitypes.h" +#include "installdialog.h" +#include "installsettings.h" +#include "installationtype.h" +#include "mv_common.h" +#include "mythprogressdialog.h" + +#include <stdlib.h> + +#include "mythversion.h" +#include "mythsystemlegacy.h" + +#define UPDATE_STATUS_INTERVAL 5000 +#define UPDATE_SCREEN_INTERVAL 5000 + + + +WelcomeDialog::WelcomeDialog(MythScreenStack *parent, const char *name) + :MythScreenType(parent, name), + m_status_text(NULL), m_recording_text(NULL), m_scheduled_text(NULL), + m_time_text(NULL), m_date_text(NULL), + m_menuPopup(NULL), m_mv_text(NULL) + +{ +// system("rm -f /tmp/.install_state"); +// system("rm -f /tmp/.install_percent"); +// system("rm -f /tmp/.install_error"); + install_drive = "" ; + recording_text = ""; + scheduled_text = ""; + install_text = ""; + version_text = ""; + I_AM_BUSY = false; + WORKING_ON_INSTALL = false; + current_hostname = ""; + + gCoreContext->addListener(this); + m_timeFormat = gCoreContext->GetSetting("TimeFormat", "h:mm AP"); + + m_updateStatusTimer = new QTimer(this); + connect(m_updateStatusTimer, SIGNAL(timeout()), this, + SLOT(updateStatus())); + m_updateStatusTimer->start(UPDATE_STATUS_INTERVAL); + + m_updateScreenTimer = new QTimer(this); + connect(m_updateScreenTimer, SIGNAL(timeout()), this, + SLOT(updateScreen())); + + m_timeTimer = new QTimer(this); + connect(m_timeTimer, SIGNAL(timeout()), this, + SLOT(updateTime())); + m_timeTimer->start(1000); + + reboot_box = NULL; + m_menuPopup = NULL; + //QTimer::singleShot(6000, this, showPopup()); + + // JM + QTimer::singleShot(1000, this, SLOT(showPopup())); + +} + +bool WelcomeDialog::Create(void) +{ + bool foundtheme = false; + + // Load the theme for this screen + foundtheme = LoadWindowFromXML("install-ui.xml", "welcome_screen", this); + + if (!foundtheme) + return false; + + bool err = false; + UIUtilE::Assign(this, m_status_text, "status_text", &err); + UIUtilE::Assign(this, m_recording_text, "recording_text", &err); + UIUtilE::Assign(this, m_scheduled_text, "scheduled_text", &err); + UIUtilE::Assign(this, m_time_text, "time_text", &err); + UIUtilE::Assign(this, m_date_text, "date_text", &err); + UIUtilE::Assign(this, m_mv_text, "mythvantage_text", &err); + if (err) + { + //JM VERBOSE(VB_IMPORTANT, "Cannot load screen 'welcome_screen'"); + return false; + } + + BuildFocusList(); + updateTime(); + + return true; +} + +void WelcomeDialog::shutdownNow(int rc) +{ + QString NETBOOT = getenv("NETBOOT"); + NETBOOT=NETBOOT.stripWhiteSpace(); +// system("rm -f /tmp/.install_state"); +// system("rm -f /tmp/.install_percent"); +// system("rm -f /tmp/.install_error"); + if (rc == 1) + system("/sbin/halt"); + else + system("/sbin/reboot"); +} + +void WelcomeDialog::runLIVECD(void) +{ + ask_validate_network(); + if ( runsettings(true) == 1 ) + { + QString PAINTER = gCoreContext->GetSetting("ThemePainter"); + QString startFECmd = ("MYTHCONFDIR=/tmp mythfrontend -O ThemePainter=" + PAINTER ); + myth_system(startFECmd.ascii()); + } + else + { + showPopup(); + } + + +} + +bool WelcomeDialog::keyPressEvent(QKeyEvent *event) +{ + bool handled = false; + QStringList actions; + handled=GetMythMainWindow()->TranslateKeyPress("Welcome", event, actions); + + for (int i = 0; i < actions.size() && !handled; i++) + { + QString action = actions[i]; + handled = true; + + if (action == "ESCAPE") + { + return true; // eat escape key + } + else if (action == "MENU") + { + showPopup(); + } + else if (action == "NEXTVIEW") + { + Close(); + } + else if (action == "STARTXTERM") + { + QString cmd = gCoreContext->GetSetting("MythShutdownXTermCmd", ""); + if (!cmd.isEmpty()) + { + QByteArray tmp = cmd.toAscii(); + system(tmp); + } + } + else + handled = false; + } + + if (!handled && MythScreenType::keyPressEvent(event)) + handled = true; + return handled; +} + +void WelcomeDialog::closeDialog() +{ + Close(); + exit(0); +} + + +// void WelcomeDialog::slotPopup() +// { +// showPopup(); +// } + +WelcomeDialog::~WelcomeDialog() +{ + gCoreContext->removeListener(this); + if (m_updateStatusTimer) + delete m_updateStatusTimer; + + if (m_updateScreenTimer) + delete m_updateScreenTimer; + + if (m_timeTimer) + delete m_timeTimer; +} + +void WelcomeDialog::updateTime(void) +{ + QString releasefile="/etc/"; + releasefile.append(RELEASEFILE); + + QString distro_line; + QFile file(releasefile); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + distro_line = t.readLine(); + file.close(); + } + QString s=""; + s.append(distro_line); + s.append( "\nMythtv source:" ); + //s.append(MYTH_SOURCE_VERSION); + //s.append(" "); + s.append(MYTH_SOURCE_PATH); + m_date_text->SetText(s); +} + +void WelcomeDialog::updateStatus(void) +{ + updateStatusMessage(); + updateScreen(); +} + +void WelcomeDialog::updateScreen(void) +{ + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh " ); + system(cmdtxt); + recording_text=" "; + mythvantage_text=" "; + error_text=" "; + scheduled_text=" "; + QFile mystatus("/tmp/.install_state"); + QFile mypercent("/tmp/.install_percent"); + QFile myerror("/tmp/.install_error"); + QFile mylog("/tmp/mythvantage_install.log"); + if ( mystatus.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &mystatus ); // use a text stream + scheduled_text = t.readLine(); + mystatus.close(); + } + + if ( mypercent.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &mypercent ); // use a text stream + recording_text = t.readLine(); + mypercent.close(); + } + + if ( myerror.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &myerror ); // use a text stream + error_text = t.readLine(); + myerror.close(); + scheduled_text = error_text; + recording_text = "FAILED"; + WORKING_ON_INSTALL = false; + } + + if ( WORKING_ON_INSTALL ) + { + if ( mylog.open( QIODevice::ReadOnly| QIODevice::Text ) ) + { + Q3TextStream t( &mylog ); + while ( !t.atEnd() ) + { + mythvantage_text=t.readLine(); + } + mylog.close(); + } + } + else + mythvantage_text=""; + m_recording_text->SetText(recording_text); + m_scheduled_text->SetText(scheduled_text); + m_mv_text->SetText(mythvantage_text); + + if ( install_drive != "" ) + install_text = ""; + + m_status_text->SetText(install_text ); + m_updateScreenTimer->start(UPDATE_SCREEN_INTERVAL, true); + if ( scheduled_text == "Done" ) + { + Reboot_popup () ; + } + // shows the busy box when configuring the system + if ( scheduled_text == "Configuring system") + { + if ( ! I_AM_BUSY ) + busy_box(); + } +}; + +void WelcomeDialog::busy_box(void) +{ + QString msgtext = "Please wait, " ; + msgtext.append(current_hostname); + msgtext.append(" is preparing for life"); + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + + while ( scheduled_text == "Configuring system" ) + { + qApp->processEvents (); + usleep(900); + I_AM_BUSY = true; + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + I_AM_BUSY = false; +} + +void WelcomeDialog::busy_find_oldsettings(void) +{ + + QString msgtext = "Importing old settings" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, + "importsettingsbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + int return_code = 0; + while ( return_code == 0 ) + { + qApp->processEvents (); + usleep(900); + I_AM_BUSY = true; + return_code = myth_system("ps -ef|grep install_proxy.sh|grep -v grep > /dev/null"); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + I_AM_BUSY = false; + +} + + +bool WelcomeDialog::updateRecordingList() +{ + //JM VERBOSE(VB_IMPORTANT, "updateRecordingList"); + return true; +} + +bool WelcomeDialog::updateScheduledList() +{ + //JM VERBOSE(VB_IMPORTANT, "updateScheduled list"); + updateStatus(); + updateScreen(); + return true; +} + +void WelcomeDialog::updateStatusMessage(void) +{ + return ; +} + +void WelcomeDialog::showPopup(void) +{ + +// if (m_menuPopup) + // return; +// +// QString label = tr("MythVantage Menu"); +// MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); +// m_menuPopup = new MythDialogBox(label, mainStack, "menuPopup"); +// +// if (m_menuPopup->Create()) +// mainStack->AddScreen(m_menuPopup); +// +// m_menuPopup->SetReturnEvent(this, "action"); + + MythScreenStack *popupStack = GetMythMainWindow()->GetMainStack(); + + m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu"); + + if (m_menuPopup->Create()) + popupStack->AddScreen(m_menuPopup); + + m_menuPopup->SetReturnEvent(this, "action"); + + + + + + // This is a bad way to lock the buttons but it works for now. + if ( scheduled_text.length() <= 2 ) + { + m_menuPopup->AddButton(tr("Install or Upgrade "), + SLOT(Display_2ndpopup())); + m_menuPopup->AddButton(tr("Run MythFrontend"), + SLOT(runLIVECD())); + m_menuPopup->AddButton(tr("Exit"), + SLOT(closeDialog())); + m_menuPopup->AddButton(tr("Close menu")) ; + } + else + { + m_menuPopup->AddButton(tr("Exit"), + SLOT(closeDialog())); + m_menuPopup->AddButton(tr("Close menu")); + } + +} +// switch (override_menu) +// { +// case 2: +// case 4: +// // shutdown +// m_menuPopup->SetReturnEvent(this,"popmenu_shutdown"); +// m_menuPopup->AddButton(tr("Shutdown")); +// break; +// case 5: +// // reboot +// m_menuPopup->SetReturnEvent(this,"popmenu_reboot"); +// m_menuPopup->AddButton(tr("Reboot")); +// break; +// case 3: +// case 6: +// // both +// m_menuPopup->SetReturnEvent(this,"popmenu_exit"); +// m_menuPopup->AddButton(tr("Shutdown")); +// m_menuPopup->AddButton(tr("Reboot")); +// break; +// case 0: +// default: +// m_menuPopup->SetReturnEvent(this,"popmenu_noexit"); +// break; +// } +// +// m_menuPopup->AddButton(tr("About")); +// m_menuPopup->AddButton(tr("Cancel")); +// +// } + + + + +// MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); +// +// m_menuPopup = new MythDialogBox("Menu", popupStack, "actionmenu"); +// +// if (m_menuPopup->Create()) +// popupStack->AddScreen(m_menuPopup); +// +// m_menuPopup->SetReturnEvent(this, "action"); +// // This is a bad way to lock the buttons but it works for now. +// if ( scheduled_text.length() <= 2 ) +// { +// m_menuPopup->AddButton(tr("Install or Upgrade "), +// SLOT(Display_2ndpopup())); +// m_menuPopup->AddButton(tr("Run MythFrontend"), +// SLOT(runLIVECD())); +// m_menuPopup->AddButton(tr("Exit"), +// SLOT(closeDialog())); +// m_menuPopup->AddButton(tr("Close menu")) ; +// } +// else +// { +// m_menuPopup->AddButton(tr("Exit"), +// SLOT(closeDialog())); +// m_menuPopup->AddButton(tr("Close menu")); +// } +// } + + +QString WelcomeDialog::diskmodel(QString drive , QString tsize) +{ + string line; + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh disk_model_it " + drive + " " + tsize ); + myth_system(cmdtxt); + + ifstream model("/tmp/model"); + if (model.is_open()) + getline (model,line); + model.close(); + + QString qline( QString::fromStdString( line ) ); + return qline; +} + +QString WelcomeDialog::findinstallsouce(void) +{ + string line; + QString currentitem; + ifstream mountfile("/proc/mounts"); + while (! mountfile.eof() ) + { + getline (mountfile,line); + if ( line.empty() ) + line = "oops didn't find andthing"; + + currentitem= ( QString::fromStdString( line ) ); + + if ( ! currentitem.contains("/dev")) + currentitem="not the right line"; + // LOG(VB_GENERAL, LOG_ERR, currentitem); + + if ( currentitem.contains("bootmnt") ) + { + int ndx = line.find(" "); + currentitem =QString::fromStdString(line.substr(0,ndx)); + ndx = currentitem.findRev("/"); + currentitem = currentitem.mid(ndx+1,3); + return currentitem; + }; + } +}; + +void WelcomeDialog::showPopup_2(void) +{ + MythScreenStack *popupStack = GetMythMainWindow()->GetMainStack(); + + m_menuPopup = new MythDialogBox("Select the drive to install to", popupStack, "actionmenu"); + + if (m_menuPopup->Create()) + popupStack->AddScreen(m_menuPopup); + + m_menuPopup->SetReturnEvent(this, "action"); + QString currentitem; + + string sizeitem; + QString disksize; + string line; + bool installsource = false; + + QString NETBOOT = getenv("NETBOOT"); + NETBOOT=NETBOOT.stripWhiteSpace(); + if ( NETBOOT == "YES" ) + m_menuPopup->AddButton(("Diskless Frontend " ), SLOT(install_net() ) ); + + QString INSTALLSOURCE = findinstallsouce(); + ifstream partitions("/proc/partitions"); + if (partitions.is_open()) + { + while (! partitions.eof() ) + { + getline (partitions,line); + if ( line.empty() ) + { + line = "oops didn't find anything"; + } + int ndx = line.rfind(" "); + ndx = ndx +1; + int linelength = line.length(); + currentitem = QString::fromStdString(line.substr(ndx,linelength)); + sizeitem = line.substr(0,ndx-1); + linelength = sizeitem.length(); + ndx = sizeitem.rfind(" "); + disksize = QString::fromStdString(sizeitem.substr(ndx+1,linelength)); + + if ( currentitem == INSTALLSOURCE ) + installsource = true; + + if (! installsource ) + { + if ( currentitem == "sde" ) + m_menuPopup->AddButton(("sde " + diskmodel(currentitem,disksize)), SLOT(install_sde() ) ); + if ( currentitem == "sdf" ) + m_menuPopup->AddButton(("sdf " + diskmodel(currentitem,disksize)), SLOT(install_sdf() ) ); + if ( currentitem == "sdg" ) + m_menuPopup->AddButton(("sdg " + diskmodel(currentitem,disksize)), SLOT(install_sdg() ) ); + if ( currentitem == "sdh" ) + m_menuPopup->AddButton(("sdh " + diskmodel(currentitem,disksize)), SLOT(install_sdh() ) ); + if (currentitem == "sda" ) + m_menuPopup->AddButton(("sda " + diskmodel(currentitem,disksize)), SLOT(install_sda() ) ); + if (currentitem == "sdb" ) + m_menuPopup->AddButton(("sdb " + diskmodel(currentitem,disksize)), SLOT(install_sdb() ) ); + if (currentitem == "sdc" ) + m_menuPopup->AddButton(("sdc "+ diskmodel(currentitem,disksize)), SLOT(install_sdc() ) ); + if (currentitem == "sdd" ) + m_menuPopup->AddButton(("sdd "+ diskmodel(currentitem,disksize)), SLOT(install_sdd() ) ); + } + installsource = false; + } + } + partitions.close(); + m_menuPopup->AddButton(tr("Cancel"), SLOT(MAINPopup())); +} + +void WelcomeDialog::GO_popup(QString go_text) +{ + DialogCode retval = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), + QString("Start the process"), + QObject::tr(go_text), + QObject::tr("Start the process"), QObject::tr("Cancel"), kDialogCodeButton0); + + if ( retval == kDialogCodeButton0 ) + { + install_it(); + } + else + { + showPopup(); + } +} + + +void WelcomeDialog::Reboot_popup(void) +{ if (reboot_box) + return; + QString prompt1; + QFile updbstatus("/tmp/.upgrade_db_failed"); + if ( updbstatus.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + prompt1 = QObject::tr(" "); + prompt1.append("\n"); + prompt1.append("An error occured while attempting to restore the database!"); + prompt1.append("\n"); + prompt1.append("The old database could not be restored, so a new database was created"); + prompt1.append("\n"); + } + else + prompt1 = QObject::tr("Ready to go!"); + + reboot_box = new DialogBox(GetMythMainWindow(), prompt1); + reboot_box->AddButton(QObject::tr("Reboot")); + reboot_box->AddButton(QObject::tr("Power off")); + + int returncode = 0; + DialogCode dcode = reboot_box->exec(); + reboot_box->deleteLater(); + if (kDialogCodeButton0 == dcode ) + returncode = 0; + if (kDialogCodeButton1 == dcode ) + returncode = 1; + if (kDialogCodeButton2 == dcode ) + returncode = 2; + + reboot_box = NULL; + shutdownNow(returncode); +} + + + +void WelcomeDialog::MAINPopup(void) +{ +// if (!popup) +// return; +// popup->hide(); +// popup->deleteLater(); + popup = NULL; + showPopup(); + +} + +void WelcomeDialog::Display_2ndpopup(void) +{ + //JM VERBOSE(VB_GENERAL, "Display_2ndpopup"); + showPopup_2(); +} + +void WelcomeDialog::install_sde(void) +{ + install_drive = "sde" ; + install_generic(); +} + +void WelcomeDialog::install_sdf(void) +{ + install_drive = "sdf" ; + install_generic(); +} + +void WelcomeDialog::install_sdg(void) +{ + install_drive = "sdg" ; + install_generic(); +} + +void WelcomeDialog::install_sdh(void) +{ + install_drive = "sdh" ; + install_generic(); +} + +void WelcomeDialog::install_sda(void) +{ install_drive = "sda" ; + install_generic(); +} +void WelcomeDialog::install_sdb(void) +{ install_drive = "sdb" ; + install_generic(); +} + +void WelcomeDialog::install_sdc(void) +{ install_drive = "sdc" ; + install_generic(); +} + +void WelcomeDialog::install_sdd(void) +{ + install_drive = "sdd" ; + install_generic(); +} + +void WelcomeDialog::install_net(void) +{ + install_drive = "NET" ; + //gCoreContext->ActivateSettingsCache(false); + gCoreContext->SaveSetting("HOSTinstallationtype","NET"); + install_generic(); +} + +void WelcomeDialog::write_install_conf(QString rootdisk) +{ + //1077 + QString op; + //QString rootdisk; + QString rootfs; + QString uprootfs; + QString rootsize; + QString homesize; + QString sqlsize; + QString usealldata; + QString datasize; + QString datafs; + QString datadisk; + QString swapsize; + QString useswap; + + op = gCoreContext->GetSetting("HOSTinstallationtype"); + if ( op == "Full/Auto" ) + op = "full_install"; + if ( op == "Upgrade" ) + op = "upgrade"; + //rootdisk = install_drive; + rootfs = gCoreContext->GetSetting("HOSTrootfstype"); + uprootfs = gCoreContext->GetSetting("HOSTuprootfstype"); + rootsize = gCoreContext->GetSetting("HOSTOSsize"); + homesize = gCoreContext->GetSetting("HOSTHOMEsize"); + sqlsize = gCoreContext->GetSetting("HOSTDatabasesize"); + + //datasize + usealldata = gCoreContext->GetSetting("HostUseALLdata"); + datasize = gCoreContext->GetSetting("HOSTDATAsize"); + if ( usealldata == "1" ) + datasize="ALL"; + else + datasize=datasize + "000"; + + datafs = gCoreContext->GetSetting("HOSTdatafstype"); + datadisk = install_drive; + + //swapsize + useswap = gCoreContext->GetSetting("HostUseSWAP"); + swapsize = gCoreContext->GetSetting("HOSTSWAPsize"); + if ( useswap == "0" ) + swapsize="NO"; + + rootsize=rootsize + "000"; + homesize=homesize + "000"; + sqlsize=sqlsize + "000"; + + QFile f( "/etc/install_layout" ); + if( !f.open( IO_WriteOnly ) ) + std::cout << "Failed to open file /etc/install_layout." << std::endl; + QTextStream myfile( &f ); + + myfile << "op=" + op + "\n"; + myfile << "rootdisk=" + rootdisk + "\n"; + myfile << "rootfs=" + rootfs + "\n"; + myfile << "uprootfs=" + uprootfs + "\n"; + myfile << "rootsize=" + rootsize + "\n"; + myfile << "homesize=" + homesize + "\n"; + myfile << "homefs=" + rootfs + "\n"; + myfile << "sqlsize=" + sqlsize + "\n"; + //myfile << "sqlfs=" + sqlfs + "\n"; + myfile << "sqlfs=ext3\n"; + myfile << "datasize=" + datasize + "\n"; + myfile << "datafs=" + datafs + "\n"; + myfile << "datadisk=" + datadisk + "\n"; + myfile << "swapsize=" + swapsize + "\n"; + + f.close(); +} + + +void WelcomeDialog::install_generic(void) +{ + //write_install_conf(install_drive); + QString installwarningtext; + int runNextSetting; + runNextSetting = 1; + int tflag; + tflag = 0; + int retcode; + retcode=0; + QString installtype; + if ( install_drive != "NET") + retcode = mythinstalltype(install_drive); + if ( retcode == 0 ) + { + installtype = gCoreContext->GetSetting("HOSTinstallationtype"); + if ( installtype == "Full/Auto" ) + { + //JM VERBOSE(VB_GENERAL, "Full install"); + runNextSetting = ask_validate_network(); + installwarningtext="Warning!"; + installwarningtext.append ("\n"); + installwarningtext.append ("\n"); + installwarningtext.append ("Installation drive ("); + installwarningtext.append (install_drive); + installwarningtext.append (") is about to be erased."); + installwarningtext.append ("\n"); + } + else if ( installtype == "NET") + { + runNextSetting=0; + gCoreContext->SaveSetting("HostSystemType", "Frontend_only"); + gCoreContext->SaveSetting("HostaccesshostypeSystemtype","0"); + installwarningtext.append ("About to install "); + installwarningtext.append ("\n"); + installwarningtext.append (install_drive); + // ask for hostname + runsettings(false,true,false,false,false,false,false); + } + else if ( installtype == "Upgrade" ) + { + installwarningtext="Warning!"; + installwarningtext.append ("\n"); + installwarningtext.append ("\n"); + installwarningtext.append ("OS partition ("); + installwarningtext.append (install_drive); + installwarningtext.append ("1"); + installwarningtext.append (") will be erased."); + installwarningtext.append ("\n"); + + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh find_update " + install_drive +" &"); + system(cmdtxt); + busy_find_oldsettings(); + bool flag = false; + QString line; + QString currentitem; + QFile file("/etc/systemconfig"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("hostname")) + { + flag=true; + currentitem = line.section( "=", 1, 1 ); + current_hostname = currentitem ; + } + } + file.close(); + } + if ( flag ) + { + //check if LinHES-release is 8.0 or newer + cout << "searching for LinHES-release" << endl; + //look for /tmp/etc/LinHES-release + QFile file("/tmp/etc/LinHES-release"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("8.") ) + { + tflag = 1; + } + } + file.close(); + } + } + if ( tflag == 0 ) + { + //popup install doesn't look like R8 + MythPopupBox::showOkPopup( + GetMythMainWindow(), + QObject::tr(""), + QObject::tr("The selected disk cannot be upgraded because it is older than LinHES R8.0.")); + runNextSetting = 1; + } + } + } + //run through the system settings + if ( runNextSetting == 0 ) + { + //DEfault settings screen for install + tflag = runsettings (false , false , true, + true , false, false, + false,true,false, false , + false, true , false , false , + false , false, false, true , true, + false); + } + //else + // { + // cancelPopup(); + //this is the popup after the upgrade + // showPopup(); + // }; + + if ( tflag == 1 ) + { + //write out the conf file + write_install_conf(install_drive); + GO_popup(installwarningtext); + } + else + { + showPopup(); + } + +} + +void busy_network(void) +{ + QString msgtext = "Starting network" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + int return_code = 0; + while ( return_code == 0 ) + { + qApp->processEvents (); + usleep(900); + return_code = myth_system("ps -ef|grep install_proxy.sh| grep setup_network |grep -v grep > /dev/null"); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + + +} + + +int WelcomeDialog::ask_validate_network(void) +{ + QString pop_text="abc"; + int retval = 1; + while ( retval != 0 ) + { + int settingsrec = runsettings(false,true,false,false,false,false,false); + if ( settingsrec != 1 ) + return 1; + else + { + MythProgressDialog *network_check = NULL; + network_check = new MythProgressDialog(QObject::tr("Please wait while the network is checked."), 7); + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it setup_network &"); + retval = system(cmdtxt); + busy_network(); + if (network_check) + { + network_check->setProgress(2); + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it check_self"); + retval = system(cmdtxt); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Could not find myself on the network"; + } + } + + if ( retval == 0) + { + network_check->setProgress(3); + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it check_gw"); + retval = system(cmdtxt); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Could not locate gateway"; + } + } + + if (retval == 0) + { + network_check->setProgress(4); + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it check_ns"); + retval = system(cmdtxt); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Could not locate nameserver"; + } + } + + if (retval == 0) + { + network_check->setProgress(5); + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it check_names"); + retval = system(cmdtxt); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Could not lookup names"; + } + } + + if (retval == 0) + { + network_check->setProgress(6); + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/install_proxy.sh network_check_it host_names"); + retval = system(cmdtxt); + if ( retval != 0 ) + { + network_check->Close(); + pop_text="Hostname already on the network"; + } + } + + network_check->setProgress(7); + if (network_check) + { + network_check->Close(); + network_check->deleteLater(); + } + + if (retval != 0 ) + { + DialogCode val = MythPopupBox::Show2ButtonPopup(GetMythMainWindow(), QString(""), QObject::tr(pop_text), QObject::tr("Continue"), QObject::tr("Try again"), kDialogCodeButton0); + if (kDialogCodeButton0 == val ) + retval = 0; + } + } + } + return 0; +} + + +void WelcomeDialog::install_it(void) +{ + QString installtype = gCoreContext->GetSetting("HOSTinstallationtype"); +// QString rootfs = gCoreContext->GetSetting("HOSTrootfstype"); +// QString datafs = gCoreContext->GetSetting("HOSTdatafstype"); +// QString rootsize = gCoreContext->GetSetting("HOSTOSsize"); +// rootsize=rootsize + "000"; +// QString usealldata = gCoreContext->GetSetting("HostUseALLdata"); +// QString datasize = gCoreContext->GetSetting("HOSTDATAsize"); +// QString uprootfs = gCoreContext->GetSetting("HOSTuprootfstype"); +// QString useswap = gCoreContext->GetSetting("HostUseSWAP"); +// QString swapsize = gCoreContext->GetSetting("HOSTSWAPsize"); + if ( installtype != "Upgrade" ) + current_hostname = gCoreContext->GetSetting("HostMyhostname"); + QString clean_upgrade = getenv("CLEAN_UPGRADE"); + if ( clean_upgrade == "YES" ) + current_hostname = gCoreContext->GetSetting("HostMyhostname"); + +//get the hostname here if upgrade then use previous declarion of hostname +// if ( usealldata == "1" ) +// { +// datasize="ALL"; +// } +// else +// { +// datasize=datasize + "000"; +// } +// if ( useswap == "0" ) +// { +// swapsize="NO"; +// }; + + + if ( installtype == "Full/Auto" ) + { + QString currentitem; + QString line; + QFile file("/proc/meminfo"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + line = t.readLine(); + if ( line.startsWith("MemTotal:")) + { + currentitem = line.simplifyWhiteSpace(); + currentitem = currentitem.section( " ", 1, 1 ); + } + } + file.close(); + bool ok; + int mem = currentitem.toInt( &ok, 10 ); // dec == 0, ok == FALSE + + +// if ( mem >= 500000 ) +// { +// if ((gCoreContext->GetSetting("HostXres")) == "1280x720" ) +// gCoreContext->SaveSetting("Theme", "syth-lacquer-wide"); +// } + + + QString cmdtxt=MV_ROOT ; + //cmdtxt.append("bin/install_proxy.sh full_install_it " + install_drive + " " + rootfs + " " + rootsize + " " + datafs + " " + datasize + " " + swapsize + "&"); + cmdtxt.append("bin/install_proxy.sh full_install_it &"); + system(cmdtxt); + } + else if ( installtype == "Upgrade" ) + { + QString cmdtxt=MV_ROOT ; + //cmdtxt.append("bin/install_proxy.sh upgrade_it " + install_drive + " " + uprootfs + "&"); + cmdtxt.append("bin/install_proxy.sh upgrade_it &"); + system(cmdtxt); + } + else if (installtype=="NET") + { + QString olddb = gCoreContext->GetSetting("HostMysqlserver"); + QString cmdtxt; + cmdtxt=MV_ROOT ; + char localhostname[1024]; + if (gethostname(localhostname, 1024)) + { + //JM VERBOSE(VB_IMPORTANT, + //"MCP: Error, could not determine host name." + ENO); + localhostname[0] = '\0'; + } + QString h; + h=localhostname; + cmdtxt.append("bin/restore_default_settings.sh -c save -t syssettings -d 127.0.0.1 -h " + h); + system(cmdtxt); + cmdtxt=MV_ROOT ; + //cmdtxt.append("bin/install_proxy.sh NETBOOT " + install_drive + " &"); + cmdtxt.append("bin/install_proxy.sh NETBOOT &"); + system(cmdtxt); + } + + WORKING_ON_INSTALL = true; + usleep (500); + updateScreen(); + usleep (500); + updateScreen(); +} diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h new file mode 100755 index 0000000..9d54c39 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installdialog.h @@ -0,0 +1,111 @@ +#ifndef WELCOMEDIALOG_H_ +#define WELCOMEDIALOG_H_ + +#include <iostream> +//Added by qt3to4: +#include <QKeyEvent> +using namespace std; + +#include <qdatetime.h> +#include "mythdialogs.h" +#include "libmyth/dialogbox.h" + + + +#include "remoteutil.h" +#include "programinfo.h" +#include "mythscreentype.h" +#include "mythuibutton.h" +#include "mythuitext.h" +#include "mythdialogbox.h" +#include "langsettings.h" + +class WelcomeDialog : public MythScreenType +{ + + Q_OBJECT + +public: + WelcomeDialog(MythScreenStack *parent, const char *name); + ~WelcomeDialog(); + bool Create(void); + bool keyPressEvent(QKeyEvent *event); + + +protected slots: + void updateStatus(void); + void updateScreen(void); + void closeDialog(); + void updateTime(); + void showPopup(); + void showPopup_2(); + void GO_popup(QString); + void Reboot_popup(); + void MAINPopup(); + QString diskmodel(QString,QString); + QString findinstallsouce(void); + void Display_2ndpopup(); + bool updateRecordingList(void); + bool updateScheduledList(void); + void shutdownNow(int); + + void install_sde(void); + void install_sdf(void); + void install_sdg(void); + void install_sdh(void); + void install_sda(void); + void install_sdb(void); + void install_sdc(void); + void install_sdd(void); + void install_net(void); + void write_install_conf(QString); + void install_generic(void); + void install_it(void); + void runLIVECD(void); + void busy_box(void); + void busy_find_oldsettings(void); + int ask_validate_network(void); +private: + void updateStatusMessage(void); + + MythPopupBox *popup; //can remove this + MythDialogBox *m_menuPopup; + DialogBox *reboot_box; + DialogBox *upgrade_box; + // + // GUI stuff + // + + MythUIText *m_status_text; + MythUIText *m_recording_text; + MythUIText *m_scheduled_text; + MythUIText *m_mv_text; + + MythUIText *m_warning_text; + MythUIText *m_time_text; + MythUIText *m_date_text; + MythUIButton *m_startfrontend_button; + + QTimer *m_updateStatusTimer; + QTimer *m_updateScreenTimer; + QTimer *m_timeTimer; + + QString m_installDir; + QString m_timeFormat; + QStringList m_statusList; + QString install_drive ; + QString install_text; + QString version_text; + QString recording_text; + QString scheduled_text; + QString error_text; + QString mythvantage_text; + string bin_prefix; + QString current_hostname; + + bool I_AM_BUSY; + bool WORKING_ON_INSTALL; + +}; + +#endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp new file mode 100755 index 0000000..2e505f1 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.cpp @@ -0,0 +1,4910 @@ +//_include <mythcontext.h> +#include <unistd.h> +#include <stdio.h> +#include <QtNetwork> + + +//Added by qt3to4: +#include <Q3TextStream> +//#include "tv.h" +#include <stdlib.h> +#include "mythprogressdialog.h" +#include "mythsystemlegacy.h" + +#include "xorgsettings.h" +#include "password_manage.h" +#include "misc_settings.h" +#include "infrared.h" +#include "supplemental.h" +#include "vnc.h" +#include "fileshare.h" + + + +int timezone_unknown = FALSE; +extern HostParms hostparm; +//extern DDCinfo ddcinfo; + + + +bool displaymysqlonly = false ; +bool displayshownetwork =false ; +bool displayshowhostype = false ; +bool displayshowmisc =false ; +bool displayshowshutdown =false ; +bool displayshowadvanced = false; +bool displayshowsound = false ; +bool displayshowadvancedX = false; +bool displayaccesscontrol= false; +bool displayplugins = false; +bool displaysoftware = false; +bool displayuser = false; +bool displaywebuser = false; +bool displayddns = false; +bool displayinfrared = false; +bool displayscreensaver = false; +//bool install_hobbit = false; +bool displaysupplemental = false; +bool displayremotesonly = false; +bool displayvnc = false; +bool displayfileshare = false; + + +static HostComboBox *ThemePainter() +{ + HostComboBox *gc = new HostComboBox("ThemePainter"); + gc->setLabel(QObject::tr("Paint Engine")); + gc->addSelection(QObject::tr("Qt"), "qt"); + gc->addSelection(QObject::tr("OpenGL"), "opengl"); + gc->setHelpText(QObject::tr("This selects what Myth uses to draw. If you have decent hardware, select OpenGL. Changing this requires a restart.")); + return gc; + +} + + +static HostLineEdit *HostDDnslogin() +{ + HostLineEdit *gc = new HostLineEdit("HostDDnslogin"); + gc->setLabel(QObject::tr("Login")); + gc->setValue(""); + gc->setHelpText(QObject::tr("Login for DDNS account.")); + return gc; +}; + +static HostLineEdit *HostDDnspassword() +{ + HostLineEdit *gc = new HostLineEdit("HostDDnspassword"); + gc->setLabel(QObject::tr("Password")); + gc->setValue(""); + gc->SetPasswordEcho(true); + gc->setHelpText(QObject::tr("Password for DDNS account.")); + return gc; +}; + +static HostLineEdit *HostDDnshostname() +{ + HostLineEdit *gc = new HostLineEdit("HostDDnshostname"); + gc->setLabel(QObject::tr("DDNS hostname")); + gc->setValue(""); + gc->setHelpText(QObject::tr("Hostname used for DDNS.")); + return gc; +}; + +static HostCheckBox *HostDDnsEnable() +{ + HostCheckBox *gc = new HostCheckBox("HostDDnsEnable"); + gc->setLabel(QObject::tr("Enable DDNS")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Update DDNS records at dyndns.com. Visit http://dyndns.com to setup your account.")); + return gc; +}; + +class DDnssettings: public TriggeredConfigurationGroup { +public: + DDnssettings(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("DDNS Settings")); + SetVertical(true); + Setting* trigger = HostDDnsEnable() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); + settings->addChild(HostDDnshostname()); + settings->addChild(HostDDnslogin()); + settings->addChild(HostDDnspassword()); + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + + + +QString findnet() +{ + + QString netdev=""; + //QString netdev="eth0 eth1 wlan0 wlan1 ath0 "; + //QString netdev="eth0 eth1"; + QList<QNetworkInterface> ifaces = QNetworkInterface::allInterfaces(); + for (int i = 0; i < ifaces.count(); ++i) + { + netdev+=ifaces[i].name(); + } + return netdev; +} + +/* + system("/sbin/ifconfig -a > /tmp/.netinfo"); + QString line; + QFile file("/tmp/.netinfo"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("HWaddr")) + { + QString s = line.simplifyWhiteSpace(); + s = s.section( " ", 0, 0 ); // s == "surname" + netdev+=s; + netdev+=" "; + } + } + file.close(); + } + return netdev;*/ +//} + +QString findnet_wireless() +{ + + QString netdev=""; +//QString netdev="eth0 eth1 wlan0 wlan1 ath0 "; + system("/usr/sbin/iwconfig > /tmp/.netinfo_wireless"); + QString line; + QFile file("/tmp/.netinfo_wireless"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("Nickname") || line.contains("ESSID")) + { + QString s = line.simplifyWhiteSpace(); + s = s.section( " ", 0, 0 ); // s == "surname" + netdev+=s; + netdev+=" "; + } + } + file.close(); + } + return netdev; +} + +static HostComboBox *HostNetDevice() +{ + HostComboBox *gc = new HostComboBox("HostNetDevice"); + gc->setLabel(QObject::tr("Device")); + QString foundnet=findnet(); + + if (foundnet.contains(hostparm.ThisHostnetOLD)) + { + QString s = "HostActiveonboot"; + s+=hostparm.ThisHostnetOLD; + gCoreContext->SaveSetting(s, hostparm.ThisHostnetActiveOLD ); + } + + if (foundnet.contains("eth0")) + gc->addSelection("eth0"); + + if (foundnet.contains("eth1")) + gc->addSelection("eth1"); + + if (foundnet.contains("wlan0")) + gc->addSelection("wlan0"); + + if (foundnet.contains("wlan1")) + gc->addSelection("wlan1"); + + if (foundnet.contains("ath0")) + gc->addSelection("ath0"); + + int findoldnetdevice=gc->findSelection(hostparm.ThisHostnetOLD); + gc->setValue(findoldnetdevice); + + + + gc->setHelpText(QObject::tr("Network interface")); + return gc; +}; + + +static HostCheckBox *HostActiveonboot() +{ + HostCheckBox *gc = new HostCheckBox("HostActiveonboot"); + gc->setLabel(QObject::tr("Device is active on boot")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Network is started on boot")); + return gc; +}; + +/* +static HostCheckBox *HostServiceSamba() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba"); + gc->setLabel(QObject::tr("Windows sharing")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Allow window machines to access recorded files")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_write() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_write"); + gc->setLabel(QObject::tr("Readonly")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. ")); + return gc; +}; + + +static HostCheckBox *HostServiceSamba_writehome() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_writehome"); + gc->setLabel(QObject::tr("Readonly")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked, all remote connections will be read only. If not checked then remote clients will have write and delete abilites. ")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_media() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_media"); + gc->setLabel(QObject::tr("share media")); + gc->setValue(true); + gc->setHelpText(QObject::tr(" ")); + return gc; +}; + +static HostCheckBox *HostServiceSamba_home() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceSamba_home"); + gc->setLabel(QObject::tr("share home")); + gc->setValue(true); + gc->setHelpText(QObject::tr(" ")); + return gc; +}; + + + +static HostComboBox *HostServiceSamba_domain() +{ + HostComboBox *gc = new HostComboBox("HostServiceSamba_domain",true); + gc->setLabel(QObject::tr("Workgroup")); + gc->setHelpText(QObject::tr("Workgroup for smb share")); + gc->addSelection("WORKGROUP"); + QString currentitem; + QString line; + QFile file("/tmp/smbdomainlist"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("domain")) + { + currentitem = line.section( " ", 1, 1 ); + if ( currentitem != "-" ) + gc->addSelection(currentitem); + } + } + file.close(); + } + gc->addSelection("type_workgroup_here"); + return gc; +};*/ + +static HostCheckBox *HostLircWait() +{ + HostCheckBox *gc = new HostCheckBox("HostLircWait"); + gc->setLabel(QObject::tr("Wait for lirc")); + gc->setValue(false); + gc->setHelpText(QObject::tr("System will wait for lirc before starting the UI ")); + return gc; +}; + +static HostCheckBox *HostBEWait() +{ + HostCheckBox *gc = new HostCheckBox("HostBEWait"); + gc->setLabel(QObject::tr("Delay starting mythfrontend until mythbackend is running")); + gc->setValue(true); + gc->setHelpText(QObject::tr("The system will check if mythbackend is online before starting mythfrontend. This will avoid connection errors and configuration screens.")); + return gc; +}; + + + +// static HostComboBox *HostEvrouterConfig() +// { +// HostComboBox *gc = new HostComboBox("HostEvrouterConfig",true); +// gc->setLabel(QObject::tr("Key Configuration")); +// gc->setHelpText(QObject::tr("Choose the key definations that will be used by the event router")); +// QString dirtxt; +// dirtxt=MV_ROOT; +// dirtxt.append("templates/evrouter"); +// QDir evrouter(dirtxt); +// +// evrouter.setSorting(QDir::Name | QDir::IgnoreCase); +// QFileInfoList fil = evrouter.entryInfoList(QDir::Dirs); +// for( QFileInfoList::iterator it = fil.begin(); +// it != fil.end(); +// ++it ) +// { +// QFileInfo ¤titem = *it; +// //JM VERBOSE(VB_IMPORTANT, currentitem.fileName()); +// if ( currentitem.fileName() != ".." && currentitem.fileName() != "." && currentitem.fileName() != "") +// { +// gc->addSelection(currentitem.fileName()); +// } +// } +// gc->addSelection("tinker"); +// return gc; +// }; + + +// static HostCheckBox *HostServiceNFS() +// { +// HostCheckBox *gc = new HostCheckBox("HostServiceNFS"); +// gc->setLabel(QObject::tr("Standard file sharing")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("Allow all machines to access recorded files with nfs")); +// return gc; +// }; + + +static HostCheckBox *HostServiceMythWEB() +{ + HostCheckBox *gc = new HostCheckBox("HostServiceMythWEB"); + gc->setLabel(QObject::tr("Enable MythWeb")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Allow MythTV scheduling using a web browser.")); + return gc; +}; + +// static HostCheckBox *HostServiceHobbitclient() +// { +// HostCheckBox *gc = new HostCheckBox("HostServiceHobbitclient"); +// gc->setLabel(QObject::tr("Hobbit-client")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Report stats and other stuff to the master backend")); +// return gc; +// }; +// +// static GlobalCheckBox *GlobalServiceHobbitserver() +// { +// GlobalCheckBox *gc = new GlobalCheckBox("GlobalServiceHobbitserver"); +// gc->setLabel(QObject::tr("Hobbit-server")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("Run the hobbit server to collect stats and other stuff")); +// return gc; +// }; + + +// static HostCheckBox *HostServiceRRD() +// { +// HostCheckBox *gc = new HostCheckBox("HostServiceRRD"); +// gc->setLabel(QObject::tr("rrd_stats")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Collect stats and create graphs of various system resources.")); +// return gc; +// }; + +static HostCheckBox *HostUseDHCP() +{ + HostCheckBox *gc = new HostCheckBox("HostUseDHCP"); + gc->setLabel(QObject::tr("Static ip address")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); + return gc; +}; + +static HostCheckBox *HostRunDHCP() +{ + HostCheckBox *gc = new HostCheckBox("HostRunDHCP"); + gc->setLabel(QObject::tr("DHCP Server")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Only one DHCP server should run on a network. Leave this unchecked if you are not sure.")); + return gc; +}; + +// static HostCheckBox *HostRunEvrouter() +// { +// HostCheckBox *gc = new HostCheckBox("HostRunEvrouter"); +// gc->setLabel(QObject::tr("Use evrouter")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Evrouter will run custom actions, based on the user defined events.")); +// return gc; +// }; + +static HostCheckBox *HostUsemythfrontend() +{ + HostCheckBox *gc = new HostCheckBox("HostUseMythWelcome"); + gc->setLabel(QObject::tr("Run MythWelcome")); + gc->setValue(false); + gc->setHelpText(QObject::tr("If checked mythwelcome will be started instead of mythfrontend.")); + return gc; +}; + +static HostCheckBox *HostRunFrontend() +{ + HostCheckBox *gc = new HostCheckBox("HostRunFrontend"); + gc->setLabel(QObject::tr("Run Frontend")); + gc->setValue(true); + gc->setHelpText(QObject::tr("If checked the frontend X windows GUI will start. Most people will want this checked. Disable the frontend if you want the system to run without a display connected.")); + return gc; +}; + + +static HostComboBox *HostMysqlserverip_listbox() +{ + HostComboBox *gc = new HostComboBox("HostMysqlServer",true); + gc->setLabel(QObject::tr("Mysql server")); + + QString currentitem; + QString prevline; + QString line; + QFile file("/tmp/mysqllist"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith(" address")) + { + currentitem = line.section( " ", 5, 5 ); + currentitem = currentitem.section( "[" , 1,1 ); + currentitem = currentitem.section( "]" , 0, 0 ); + + currentitem = currentitem + "\t" + prevline.section( " ",5,5 ); + gc->addSelection(currentitem); + } + prevline = line; + } + file.close(); + //system ("rm -f /tmp/mysqllist"); + } + gc->addSelection("Manual: type ip here"); + gc->setHelpText(QObject::tr("")); + + QString NETBOOT = getenv("NETBOOT"); + NETBOOT=NETBOOT.stripWhiteSpace(); + if ( NETBOOT != "YES" ) + { + if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" )) + gc->setEnabled(false); + } + + return gc; +} + + + +static HostCheckBox *HostRemoteBackup() +{ + HostCheckBox *gc = new HostCheckBox("HostRemoteBackup"); + gc->setLabel(QObject::tr("Remote Backup")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Copy the system backup file to another directory or host.")); + return gc; +}; + + +static HostComboBox *HostRemoteBackupDir() +{ + QString tempItem; + HostComboBox *gc = new HostComboBox("HostRemoteBackupDir",true); + gc->setLabel(QObject::tr(" Dir or Host" )); + gc->addSelection("dir:/data/storage/disk0"); + MSqlQuery query(MSqlQuery::InitCon()); + + + query.prepare( "SELECT DISTINCT hostname from settings where hostname is not null and not (hostname=:HOSTNAME);"); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + if (query.exec() && query.isActive() && query.size() > 0) + { + while (query.next()) + { + tempItem = query.value(0).toString(); + gc->addSelection(tempItem); + } + } + + gc->setHelpText(QObject::tr("Remote host that will receive a copy of the backup file. To copy the file to a local dir instead of a remote host use dir:/backup_dir_name")); + + return gc; +}; + +class Backupsettings: public TriggeredConfigurationGroup { +public: + Backupsettings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + SetVertical(false); + setLabel(QObject::tr("Backup Settings")); + Setting* trigger = HostRemoteBackup(); + addChild(trigger); + setTrigger(trigger); + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); + settings->addChild(HostRemoteBackupDir()); + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + + }; +}; + + + +// static HostCheckBox *HostPKG_MIRROR() +// { +// HostCheckBox *gc = new HostCheckBox("HostPKG_MIRROR"); +// gc->setLabel(QObject::tr("Use Local mirror")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Master Backend will be used as the repo source.")); +// return gc; +// }; + +// static GlobalCheckBox *GlobalPKG_MIRROR() +// { +// GlobalCheckBox *gc = new GlobalCheckBox("GlobalPKG_MIRROR"); +// gc->setLabel(QObject::tr("Local mirror")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Keep a local copy of the packages. Allow other frontends to install from the local copy.")); +// return gc; +// }; + + + +static HostCheckBox *HostncidClient() +{ + HostCheckBox *gc = new HostCheckBox("HostncidClient"); + gc->setLabel(QObject::tr("Show CallerID")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Show CallerID popup. The backend must be running the CallerID program.")); + return gc; +}; + +static HostCheckBox *HostncidDaemon() +{ + HostCheckBox *gc = new HostCheckBox("HostncidDaemon"); + gc->setLabel(QObject::tr("Run CallerID")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Run daemon to collect CallerID information.")); + return gc; +}; + +static HostComboBox *HostSerialPortncid() +{ + HostComboBox *gc = new HostComboBox("HostSerialPortncid",false); + gc->setLabel(QObject::tr("Serial Port")); + gc->addSelection("ttyS0"); + gc->addSelection("ttyS1"); + gc->addSelection("ttyS2"); + gc->addSelection("ttyS3"); + gc->addSelection("ttyACM0"); + gc->setHelpText(QObject::tr("Serial port where callerid capable modem is connected")); + return gc; +} + +static HostCheckBox *HostNcidDeviceNetCallerID() +{ + HostCheckBox *gc = new HostCheckBox("HostNcidDeviceNetCallerID"); + gc->setLabel(QObject::tr("Using a NetCallerID")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Instead of a typical modem, the serial device is a NetCallerID")); + return gc; +}; + + +static HostCheckBox *Hostbootsplash() +{ + HostCheckBox *gc = new HostCheckBox("Hostbootsplash"); + gc->setLabel(QObject::tr("Enable Boot Splash")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Covers up boot messages with LinHES logo.")); + return gc; +}; + +//-------------------------------------screensaver settings------------------- + +static HostComboBox *HostScreensaverType() +{ + HostComboBox *gc = new HostComboBox("HostScreensaverType"); + gc->setLabel(QObject::tr("Screensaver Program")); + gc->addSelection("xscreensaver"); + //gc->addSelection("gscreensaver"); + gc->addSelection("none"); + gc->addSelection("tinker"); + gc->setHelpText(QObject::tr("Set the screensaver program.")); + gc->setValue("none"); + return gc; +}; + +static HostSpinBox *HostScreensaverIdle() +{ + HostSpinBox *gc = new HostSpinBox("HostScreensaverIdle", 5, 60, 1, true); + gc->setLabel(QObject::tr("Idle Time")); + gc->setValue(5); + gc->setHelpText(QObject::tr("Number of minutes to wait before starting the screensaver." )); + return gc; +} + +static HostCheckBox *HostScreensaverBlank() +{ + HostCheckBox *gc = new HostCheckBox("HostScreensaverBlank"); + gc->setLabel(QObject::tr("Blank")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Blank the screen instead of using a screensaver")); + return gc; +}; + +static HostCheckBox *HostScreensaverRandom() +{ + HostCheckBox *gc = new HostCheckBox("HostScreensaverRandom"); + gc->setLabel(QObject::tr("Random")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Use a random screensaver.")); + return gc; +}; + + + +static HostComboBox *HostGScreensaverTheme() +{ + HostComboBox *gc = new HostComboBox("HostGScreensaverTheme"); + gc->setLabel(QObject::tr("Screensaver")); + gc->setHelpText(QObject::tr("Screen saver program to use.")); + QString line; + QString dirtxt=MV_ROOT; + dirtxt.append("templates/gscreensavers"); + QFile file(dirtxt); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + gc->addSelection(line); + } + file.close(); + } + return gc; +}; + +static HostComboBox *HostXScreensaverTheme() +{ + HostComboBox *gc = new HostComboBox("HostXScreensaverTheme"); + gc->setLabel(QObject::tr("Screensaver")); + gc->setHelpText(QObject::tr("Screensaver to display.")); + QString dirtxt; + dirtxt=MV_ROOT; + dirtxt.append("templates/xscreensavers"); + //read in from a file. + QString line; + QFile file(dirtxt); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + gc->addSelection(line); + } + file.close(); + } + return gc; +}; + +class Screensaverhostsettings: public TriggeredConfigurationGroup { +public: + Screensaverhostsettings(): + + TriggeredConfigurationGroup() { + SetVertical(true); + setLabel(QObject::tr("Screensaver Settings")); + Setting* trigger = HostScreensaverType() ; + addChild(trigger); + setTrigger(trigger); + ConfigurationGroup* screensaversettings = new GridConfigurationGroup(2); + screensaversettings->addChild(HostScreensaverBlank()); + screensaversettings->addChild(HostScreensaverRandom()); + + ConfigurationGroup* xscreensaversettings = new VerticalConfigurationGroup(); + xscreensaversettings->addChild(screensaversettings); + xscreensaversettings->addChild(HostScreensaverIdle()); + xscreensaversettings->addChild(HostXScreensaverTheme()); + + + ConfigurationGroup* gscreensaversettings = new VerticalConfigurationGroup(); + gscreensaversettings->addChild(screensaversettings); + gscreensaversettings->addChild(HostScreensaverIdle()); + gscreensaversettings->addChild(HostGScreensaverTheme()); + + + + addTarget("tinker", new VerticalConfigurationGroup(false, false)); + addTarget("none", new VerticalConfigurationGroup(false, false)); + addTarget("gscreensaver", gscreensaversettings); + addTarget("xscreensaver", xscreensaversettings); + }; +}; + + + + +//-------------------------------------access setting---------------------- + +static HostCheckBox *Hostaccessnetwork() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessnetwork"); + gc->setLabel(QObject::tr("Network")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Control access to Network Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccesshostype() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccesshostype"); + gc->setLabel(QObject::tr("Host")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Host Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *HostaccesshostypeSystemtype() +{ + HostCheckBox *gc = new HostCheckBox("HostaccesshostypeSystemtype"); + gc->setLabel(QObject::tr("Change System Type")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Ability to change the System Type in Host Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessmisc() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessmisc"); + gc->setLabel(QObject::tr("Miscellanous")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Miscellanous Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccesssleep() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccesssleep"); + gc->setLabel(QObject::tr("Shutdown")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Shutdown Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessadvanced() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessadvanced"); + gc->setLabel(QObject::tr("Advanced")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Advanced Settings. Checked means the screen is enabled. ")); + return gc; +}; + +static HostCheckBox *HostaccessadvancedX() +{ + HostCheckBox *gc = new HostCheckBox("HostaccessadvancedX"); + gc->setLabel(QObject::tr("Display")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Display Settings. Checked means the screen is enabled. ")); + return gc; +}; +static HostCheckBox *Hostaccessddns() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessddns"); + gc->setLabel(QObject::tr("Dynamic DNS")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to DDNS Settings. Checked means the screen is enabled. ")); + return gc; +}; + +static HostCheckBox *Hostaccesssound() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccesssound"); + gc->setLabel(QObject::tr("Audio")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Audio Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessscreensaver() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessscreensaver"); + gc->setLabel(QObject::tr("Screensaver")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Screensaver Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessir() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessir"); + gc->setLabel(QObject::tr("Remotes")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Remotes Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessplugins() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessplugins"); + gc->setLabel(QObject::tr("Programs")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Programs. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessuser() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessuser"); + gc->setLabel(QObject::tr("User Accounts")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Control access to User Accounts. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccesswebuser() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccesswebuser"); + gc->setLabel(QObject::tr("Web Security")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Web Security Settings. Checked means the screen is enabled.")); + return gc; +}; + +static HostCheckBox *Hostaccessvnc() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessvnc"); + gc->setLabel(QObject::tr("Screen Sharing")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to Screen Sharing Settings. Checked means the screen is enabled.")); + return gc; +}; + + +static HostCheckBox *Hostaccessfileshare() +{ + HostCheckBox *gc = new HostCheckBox("Hostaccessfileshare"); + gc->setLabel(QObject::tr("File Sharing")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Control access to File Sharing Settings. Checked means the screen is enabled.")); + return gc; +}; + + +class ACCESShostsettings: public TriggeredConfigurationGroup { +public: + ACCESShostsettings(): + TriggeredConfigurationGroup(false,false,false,false) { + SetVertical(false); + Setting* trigger = Hostaccesshostype () ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); + //settings->addChild(HostServiceSamba()); + settings->addChild(HostaccesshostypeSystemtype()); + + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + + +//---------------------------------- PLUGINS ---------------------- + +static HostCheckBox *Hostpluginmytharchive() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmytharchive"); + gc->setLabel(QObject::tr("MythArchive")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythArchive.")); + return gc; +}; + + +static HostCheckBox *Hostpluginmythbrowser() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythbrowser"); + gc->setLabel(QObject::tr("MythBrowser")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythBrowser.")); + return gc; +}; + + +// static HostCheckBox *Hostpluginmythcontrols() +// { +// HostCheckBox *gc = new HostCheckBox("Hostpluginmythcontrols"); +// gc->setLabel(QObject::tr("mythcontrols")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("check to enable mythcontrols")); +// return gc; +// }; + + +static HostCheckBox *Hostpluginmythnetvision() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythnetvision"); + gc->setLabel(QObject::tr("MythNetvision")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Check to enable MythNetvision.")); + return gc; +}; + + +static HostCheckBox *Hostpluginmythgallery() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythgallery"); + gc->setLabel(QObject::tr("MythGallery")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Check to enable MythGallery.")); + return gc; +}; + + +static HostCheckBox *Hostpluginmythgame() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythgame"); + gc->setLabel(QObject::tr("MythGame")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythGame.")); + return gc; +}; + +static HostCheckBox *Hostpluginmythgamesnes9x() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamesnes9x"); + gc->setLabel(QObject::tr("snes9x")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Super Nintendo emulator")); + return gc; +}; + +static HostCheckBox *Hostpluginmythgamefceux() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamefceux"); + gc->setLabel(QObject::tr("fceux")); + gc->setValue(false); + gc->setHelpText(QObject::tr("NES emulator")); + return gc; +}; + +static HostCheckBox *HostpluginmythgameMame() +{ + HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMame"); + gc->setLabel(QObject::tr("mame")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Mame, Multiple Arcade Machine Emulator")); + return gc; +}; + +static HostCheckBox *HostpluginmythgameMednafen() +{ + HostCheckBox *gc = new HostCheckBox("HostpluginmythgameMednafen"); + gc->setLabel(QObject::tr("Mednafen")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Mednafen is a portable, utilizing OpenGL and SDL, command-line driven multi-system emulator with many advanced features.")); + return gc; +}; + +static HostCheckBox *HostpluginmythgameROMDB() +{ + HostCheckBox *gc = new HostCheckBox("HostpluginmythgameROMDB"); + gc->setLabel(QObject::tr("RomDB")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Table used my MythGame to store information about games. If you are into games, this is recommended.")); + return gc; +}; + +static HostCheckBox *Hostpluginmythgamemupen64() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythgamemupen64"); + gc->setLabel(QObject::tr("mupen64")); + gc->setValue(false); + gc->setHelpText(QObject::tr("n64 emulator")); + return gc; +}; + +static HostCheckBox *HostpluginmythgameDolphin() +{ + HostCheckBox *gc = new HostCheckBox("HostpluginmythgameDolphin"); + gc->setLabel(QObject::tr("Dolphin")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Nintendo Wii emulator")); + return gc; +}; + +static HostCheckBox *HostpluginmythgameXe() +{ + HostCheckBox *gc = new HostCheckBox("HostpluginmythgameXe"); + gc->setLabel(QObject::tr("Xe")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Xe is a multisystem emulator. http://www.xe-emulator.com/ for the complete list.")); + return gc; +}; + + +/* +static HostCheckBox *Hostpluginmythmovietime() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythmovietime"); + gc->setLabel(QObject::tr("mythmovietime")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Check to enable mythmovietime")); + return gc; +};*/ + + +static HostCheckBox *Hostpluginmythmusic() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythmusic"); + gc->setLabel(QObject::tr("MythMusic")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Check to enable MythMusic.")); + return gc; +}; + + +static HostCheckBox *Hostpluginmythnews() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythnews"); + gc->setLabel(QObject::tr("MythNews")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythNews.")); + return gc; +}; + + +// static HostCheckBox *Hostpluginmythsmolt() +// { +// HostCheckBox *gc = new HostCheckBox("Hostpluginmythsmolt"); +// gc->setLabel(QObject::tr("mythsmolt")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("check to enable mythsmolt")); +// return gc; +// }; + + +// static HostCheckBox *Hostpluginmythvideo() +// { +// HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo"); +// gc->setLabel(QObject::tr("mythvideo")); +// gc->setValue(true); +// gc->setHelpText(QObject::tr("check to enable mythvideo")); +// return gc; +// }; + +static HostCheckBox *Hostpluginmythvideo_dvdcss() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythvideo_dvdcss"); + gc->setLabel(QObject::tr("dvdcss")); + gc->setValue(false); + gc->setHelpText(QObject::tr("libdvdcss is a simple library designed for accessing DVDs like a block device without having to bother about the decryption.")); + return gc; +}; + + + +// static HostCheckBox *Hostpluginmythstream() +// { +// HostCheckBox *gc = new HostCheckBox("Hostpluginmythstream"); +// gc->setLabel(QObject::tr("mythstream")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("MythStream is an unofficial MythTv plugin that plays Internet audio and video streams.")); +// return gc; +// }; + +static HostCheckBox *Hostpluginmythappletrailers() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythappletrailers"); + gc->setLabel(QObject::tr("MythAppleTrailers")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Stream trailer's from Apple's website.")); + return gc; +}; + + +static HostCheckBox *Hostpluginmythweather() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythweather"); + gc->setLabel(QObject::tr("MythWeather")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythWeather.")); + return gc; +}; + + +static HostCheckBox *HostMiro() +{ + HostCheckBox *gc = new HostCheckBox("HostMiro"); + gc->setLabel(QObject::tr("Miro")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Miro is a popular, free, and open internet TV application. It brings video channels from thousands of sources and has more free HD than any other platform.")); + return gc; +}; + + +// static HostCheckBox *HostXine() +// { +// HostCheckBox *gc = new HostCheckBox("HostXine"); +// gc->setLabel(QObject::tr("Xine")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Xine is a free multimedia player")); +// return gc; +// }; + + +// static HostCheckBox *Hostwebmin() +// { +// HostCheckBox *gc = new HostCheckBox("Hostwebmin"); +// gc->setLabel(QObject::tr("Webmin")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Webmin is a web-based interface for system administration for Unix. Once installed, you can access it at https://ip.of.back.end:10000 using your root password.")); +// return gc; +// }; + +// static HostCheckBox *Hostfuppes() +// { +// HostCheckBox *gc = new HostCheckBox("Hostfuppes"); +// gc->setLabel(QObject::tr("Fuppes")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Upnp server")); +// return gc; +// }; + +static HostCheckBox *Hostfoldingathome() +{ + HostCheckBox *gc = new HostCheckBox("Hostfoldingathome"); + gc->setLabel(QObject::tr("Folding@home")); + gc->setValue(false); + gc->setHelpText(QObject::tr("A distributed computing project which studies protein folding, misfolding, aggregation, and related diseases.")); + return gc; +}; + + + +static HostCheckBox *Hostwebonlinhes() +{ + HostCheckBox *gc = new HostCheckBox("Hostwebonlinhes"); + gc->setLabel(QObject::tr("Web On LinHES")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Includes Google Chrome and multiple websites with 10' UIs in Media Library --> Online Content.")); + return gc; +}; + +static HostCheckBox *HostHuluDesktop() +{ + HostCheckBox *gc = new HostCheckBox("HostHuluDesktop"); + gc->setLabel(QObject::tr("Hulu Desktop")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Hulu Desktop for Linux.")); + return gc; +}; + + +static HostComboBox *Hostfoldingusername() +{ + // If there is an old R5.5 style folding directory /myth/folding@home, attempt + // to retrieve the old username. + + FILE *username_pipe; + username_pipe = + popen ( + "grep username= /myth/folding@home/client.cfg 2> /dev/null | " + "sed 's/username=//g'", "r"); + + if (username_pipe) + { + char username[200]; + if (fgets (username, sizeof (username), username_pipe)) + { + char *new_line; + username[sizeof(username)-1]=0; + if ((new_line = strchr (username, '\n'))) + new_line[0] = 0; + + cout << "found old username " << username << endl; + //FIXME?? + //gCoreContext->SetSetting("Hostfoldingusername", username); + gCoreContext->SaveSetting("Hostfoldingusername", username); + } + pclose (username_pipe); + } + + HostComboBox *gc = new HostComboBox("Hostfoldingusername",true); + gc->setLabel(QObject::tr("Folding Username")); + gc->setValue(""); + + gc->setHelpText(QObject::tr("The username associated to the work-units you return.")); + return gc; +}; + +static HostComboBox *Hostfoldingworksize() +{ + HostComboBox *gc = new HostComboBox("Hostfoldingworksize"); + gc->setLabel(QObject::tr("Work Packet Size")); + gc->addSelection("Big", "big"); + gc->addSelection("Normal", "normal"); + gc->addSelection("Small", "small"); + gc->setHelpText(QObject::tr("Acceptable size of work assignment and work result packets (bigger units may have large memory demands).")); + return gc; +}; + +// static HostCheckBox *HostXscreensaver() +// { +// HostCheckBox *gc = new HostCheckBox("HostXscreensaver"); +// gc->setLabel(QObject::tr("Screensaver")); +// gc->setValue(false); +// gc->setHelpText(QObject::tr("Run screensaver after 10 minutes of inactivity.")); +// return gc; +// }; + + +static HostCheckBox *Hostpluginmythzoneminder() +{ + HostCheckBox *gc = new HostCheckBox("Hostpluginmythzoneminder"); + gc->setLabel(QObject::tr("MythZoneMinder")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Check to enable MythZoneMinder.")); + return gc; +}; + + +// -------------End plugins-------------------------------- + + + +class NCIDsettings: public TriggeredConfigurationGroup { +public: + NCIDsettings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + SetVertical(true); + Setting* trigger = HostncidDaemon() ; + addChild(trigger); + setTrigger(trigger); + ConfigurationGroup* settings = new GridConfigurationGroup(1,false,false); + settings->addChild(HostSerialPortncid()); + settings->addChild(HostNcidDeviceNetCallerID()); + addTarget("0", new HorizontalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + +// class SAMBAsettings: public TriggeredConfigurationGroup { +// public: +// SAMBAsettings(): +// TriggeredConfigurationGroup(false, true, true, true,false, false, true, true) { +// SetVertical(false); +// Setting* trigger = HostServiceSamba() ; +// addChild(trigger); +// setTrigger(trigger); +// +// ConfigurationGroup* settings = new GridConfigurationGroup(2,false,false); +// //settings->addChild(HostServiceSamba()); +// settings->addChild(HostServiceSamba_media()); +// settings->addChild(HostServiceSamba_write()); +// settings->addChild(HostServiceSamba_home()); +// settings->addChild(HostServiceSamba_writehome()); +// settings->addChild(HostServiceSamba_domain()); +// +// addTarget("0", new GridConfigurationGroup(2,false, false)); +// addTarget("1", settings); +// }; +// }; + + +// class Evroutersettings: public TriggeredConfigurationGroup { +// public: +// Evroutersettings(): +// TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { +// setLabel(QObject::tr("Evrouter config")); +// Setting* trigger = HostRunEvrouter() ; +// addChild(trigger); +// setTrigger(trigger); +// +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false); +// settings->addChild(HostEvrouterConfig()); +// +// addTarget("0", new VerticalConfigurationGroup(false, false)); +// addTarget("1", settings); +// }; +// }; + +class MythGamesettings: public TriggeredConfigurationGroup { +public: + MythGamesettings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + setLabel(QObject::tr("Programs - Games")); + Setting* trigger = Hostpluginmythgame() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new GridConfigurationGroup(3,true,true); + settings->addChild(HostpluginmythgameROMDB()); + settings->addChild(Hostpluginmythgamesnes9x()); + settings->addChild(Hostpluginmythgamefceux()); + settings->addChild(HostpluginmythgameMame()); + settings->addChild(HostpluginmythgameMednafen()); + settings->addChild(Hostpluginmythgamemupen64()); + settings->addChild(HostpluginmythgameDolphin()); + settings->addChild(HostpluginmythgameXe()); + + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + + +//____________________________________________________________________________ +class eth0_settings: public TriggeredConfigurationGroup { +public: + eth0_settings(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + + HostComboBox *HOSTESSIDeth0 = new HostComboBox("HOSTESSIDeth0",true); + HOSTESSIDeth0->setLabel(QObject::tr("ESSID")); + HOSTESSIDeth0->addSelection("MythVantage"); + HOSTESSIDeth0->addSelection("home_lan"); + HOSTESSIDeth0->addSelection("type_it_here"); + HOSTESSIDeth0->setHelpText(QObject::tr("ESSID")); + addChild(HOSTESSIDeth0); + + HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0"); + HostUseEncryptioneth0->setLabel(QObject::tr("Encryption")); + HostUseEncryptioneth0->setHelpText(QObject::tr("WPA uses a shared key phrase this is the most secure. For WEP use the generated key, this type of encryption is not recommended.")); + HostUseEncryptioneth0->addSelection("none"); + HostUseEncryptioneth0->addSelection("WPA"); + HostUseEncryptioneth0->addSelection("WEP"); + + Setting* HostUseEncryption = HostUseEncryptioneth0; + addChild(HostUseEncryption); + setTrigger(HostUseEncryption); + + HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0"); + Hostkeyeth0->setLabel(QObject::tr("key")); + Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption.")); + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(Hostkeyeth0); + addTarget("none", new GridConfigurationGroup(1,false)); + addTarget("WPA", settings); + addTarget("WEP", settings); + }; +}; + + +NetworkSettingseth0::NetworkSettingseth0(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("Network Settings")); + HostLineEdit *HostIPeth0 = new HostLineEdit("HostIPeth0"); + HostIPeth0->setLabel(QObject::tr("IP Address")); + HostIPeth0->setValue("192.168.1.12"); + HostIPeth0->setHelpText(QObject::tr("IP address of the new installation.")); + + HostComboBox *HostNETMASKeth0 = new HostComboBox("HostNETMASKeth0"); + HostNETMASKeth0->setLabel(QObject::tr("Netmask")); + HostNETMASKeth0->addSelection("/0 0.0.0.0"); + HostNETMASKeth0->addSelection("/1 128.0.0.0"); + HostNETMASKeth0->addSelection("/2 192.0.0.0"); + HostNETMASKeth0->addSelection("/3 224.0.0.0"); + HostNETMASKeth0->addSelection("/4 240.0.0.0"); + HostNETMASKeth0->addSelection("/5 248.0.0.0"); + HostNETMASKeth0->addSelection("/6 252.0.0.0"); + HostNETMASKeth0->addSelection("/7 254.0.0.0"); + HostNETMASKeth0->addSelection("/8 255.0.0.0"); + HostNETMASKeth0->addSelection("/9 255.128.0.0"); + HostNETMASKeth0->addSelection("/10 255.192.0.0 "); + HostNETMASKeth0->addSelection("/11 255.224.0.0"); + HostNETMASKeth0->addSelection("/12 255.240.0.0"); + HostNETMASKeth0->addSelection("/13 255.248.0.0"); + HostNETMASKeth0->addSelection("/14 255.252.0.0"); + HostNETMASKeth0->addSelection("/15 255.254.0.0"); + HostNETMASKeth0->addSelection("/16 255.255.0.0"); + HostNETMASKeth0->addSelection("/17 255.255.128.0"); + HostNETMASKeth0->addSelection("/18 255.255.192.0"); + HostNETMASKeth0->addSelection("/19 255.255.224.0"); + HostNETMASKeth0->addSelection("/20 255.255.240.0"); + HostNETMASKeth0->addSelection("/21 255.255.248.0"); + HostNETMASKeth0->addSelection("/22 255.255.252.0"); + HostNETMASKeth0->addSelection("/23 255.255.254.0"); + HostNETMASKeth0->addSelection("/24 255.255.255.0"); + HostNETMASKeth0->addSelection("/25 255.255.255.128"); + HostNETMASKeth0->addSelection("/26 255.255.255.192"); + HostNETMASKeth0->addSelection("/27 255.255.255.224"); + HostNETMASKeth0->addSelection("/28 255.255.255.240"); + HostNETMASKeth0->addSelection("/29 255.255.255.248"); + HostNETMASKeth0->addSelection("/30 255.255.255.252"); + HostNETMASKeth0->addSelection("/31 255.255.255.254"); + HostNETMASKeth0->addSelection("/32 255.255.255.255"); + HostNETMASKeth0->setHelpText(QObject::tr("Netmask")); + HostNETMASKeth0->setValue(24); + + HostLineEdit *HostGWeth0 = new HostLineEdit("HostGWeth0"); + HostGWeth0->setLabel(QObject::tr("Gateway")); + HostGWeth0->setValue("192.168.1.1"); + HostGWeth0->setHelpText(QObject::tr("This is the default route.")); + + + HostLineEdit *HostDNSeth0 = new HostLineEdit("HostDNSeth0"); + HostDNSeth0->setLabel(QObject::tr("Name Server")); + HostDNSeth0->setValue("192.168.1.1"); + HostDNSeth0->setHelpText(QObject::tr("Name server")); + + + HostCheckBox *HostActiveonbooteth0 = new HostCheckBox("HostActiveonbooteth0"); + HostActiveonbooteth0->setLabel(QObject::tr("Active")); + HostActiveonbooteth0->setValue(true); + HostActiveonbooteth0->setHelpText(QObject::tr("Network is started on boot.")); + + HostDefaulteth0 = new HostCheckBox("HostDefaulteth0"); + HostDefaulteth0->setLabel(QObject::tr("Default")); + HostDefaulteth0->setValue(true); + HostDefaulteth0->setHelpText(QObject::tr("Will be used as the primary interface.")); + + connect(HostDefaulteth0, SIGNAL(valueChanged(bool)), this, SLOT(eth0_disable_others())); + + HostCheckBox *HostUseDHCPeth0 = new HostCheckBox("HostUseDHCPeth0"); + HostUseDHCPeth0 ->setLabel(QObject::tr("Static IP Address")); + HostUseDHCPeth0 ->setValue(false); + HostUseDHCPeth0 ->setHelpText(QObject::tr("Enable to use a static IP address, otherwise DHCP will be used.")); + + wirelessbuttoneth0 = new TransButtonSetting(); + wirelessbuttoneth0->setLabel(tr("Wireless Settings")); + connect(wirelessbuttoneth0, SIGNAL(pressed()), this, SLOT(eth0_wireless_settings())); + + ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, true, true); + settings1->addChild(HostActiveonbooteth0); + settings1->addChild(HostDefaulteth0); + settings1-> addChild(wirelessbuttoneth0); + addChild(settings1); + + + Setting* dhcpEnabled = HostUseDHCPeth0; + addChild(dhcpEnabled); + setTrigger(dhcpEnabled); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false, false, false); + settings->addChild(HostIPeth0); + settings->addChild(HostNETMASKeth0); + settings->addChild(HostGWeth0); + settings->addChild(HostDNSeth0); + + addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); + addTarget("1", settings); +}; + +eth0options::eth0options() +{ + + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Wireless configuration for eth0")); + //rec->setUseLabel(true); + rec->addChild(new eth0_settings); + addChild(rec); +} + +void NetworkSettingseth0::eth0_disable_others() +{ + QString my_current_value; + my_current_value = HostDefaulteth0->getValue(); + if ( my_current_value == "1" ) + { + hostparm.ThisHostDefaultInterface="eth0"; + emit eth0_is_default(); + } +} +void NetworkSettingseth0::eth0_disabled() +{ + HostDefaulteth0->setValue(0); +} +void NetworkSettingseth0::eth0_wireless_settings(void) +{ + eth0options eth0screen; + eth0screen.exec(); +} + +void NetworkSettingseth0::eth0_wireless_disable() +{ + wirelessbuttoneth0->setEnabled(false); +} + +class eth1_settings: public TriggeredConfigurationGroup { +public: + eth1_settings(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + + HostComboBox *HOSTESSIDeth1 = new HostComboBox("HOSTESSIDeth1",true); + HOSTESSIDeth1->setLabel(QObject::tr("ESSID")); + HOSTESSIDeth1->addSelection("MythVantage"); + HOSTESSIDeth1->addSelection("home_lan"); + HOSTESSIDeth1->addSelection("type_it_here"); + HOSTESSIDeth1->setHelpText(QObject::tr("ESSID")); + addChild(HOSTESSIDeth1); + HostComboBox *HostUseEncryptioneth0 = new HostComboBox("HostUseEncryptioneth0"); + HostUseEncryptioneth0->setLabel(QObject::tr("Encryption")); + HostUseEncryptioneth0->setHelpText(QObject::tr("WPA, WEP, none")); + HostUseEncryptioneth0->addSelection("none"); + HostUseEncryptioneth0->addSelection("WPA"); + HostUseEncryptioneth0->addSelection("WEP"); + + Setting* HostUseEncryption = HostUseEncryptioneth0; + addChild(HostUseEncryption); + setTrigger(HostUseEncryption); + + HostLineEdit *Hostkeyeth0 = new HostLineEdit("Hostkeyeth0"); + Hostkeyeth0->setLabel(QObject::tr("key")); + Hostkeyeth0->setHelpText(QObject::tr("Key to use for encryption")); + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(Hostkeyeth0); + addTarget("none", new GridConfigurationGroup(1,false)); + addTarget("WPA", settings); + addTarget("WEP", settings); + }; +}; + + +NetworkSettingseth1::NetworkSettingseth1(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("Network Settings")); + HostLineEdit *HostIPeth1 = new HostLineEdit("HostIPeth1"); + HostIPeth1->setLabel(QObject::tr("Ip address")); + HostIPeth1->setValue("192.168.1.12"); + HostIPeth1->setHelpText(QObject::tr("IP address of the new installation")); + + HostComboBox *HostNETMASKeth1 = new HostComboBox("HostNETMASKeth1"); + HostNETMASKeth1->setLabel(QObject::tr("Netmask")); + HostNETMASKeth1->addSelection("/0 0.0.0.0"); + HostNETMASKeth1->addSelection("/1 128.0.0.0"); + HostNETMASKeth1->addSelection("/2 192.0.0.0"); + HostNETMASKeth1->addSelection("/3 224.0.0.0"); + HostNETMASKeth1->addSelection("/4 240.0.0.0"); + HostNETMASKeth1->addSelection("/5 248.0.0.0"); + HostNETMASKeth1->addSelection("/6 252.0.0.0"); + HostNETMASKeth1->addSelection("/7 254.0.0.0"); + HostNETMASKeth1->addSelection("/8 255.0.0.0"); + HostNETMASKeth1->addSelection("/9 255.128.0.0"); + HostNETMASKeth1->addSelection("/10 255.192.0.0 "); + HostNETMASKeth1->addSelection("/11 255.224.0.0"); + HostNETMASKeth1->addSelection("/12 255.240.0.0"); + HostNETMASKeth1->addSelection("/13 255.248.0.0"); + HostNETMASKeth1->addSelection("/14 255.252.0.0"); + HostNETMASKeth1->addSelection("/15 255.254.0.0"); + HostNETMASKeth1->addSelection("/16 255.255.0.0"); + HostNETMASKeth1->addSelection("/17 255.255.128.0"); + HostNETMASKeth1->addSelection("/18 255.255.192.0"); + HostNETMASKeth1->addSelection("/19 255.255.224.0"); + HostNETMASKeth1->addSelection("/20 255.255.240.0"); + HostNETMASKeth1->addSelection("/21 255.255.248.0"); + HostNETMASKeth1->addSelection("/22 255.255.252.0"); + HostNETMASKeth1->addSelection("/23 255.255.254.0"); + HostNETMASKeth1->addSelection("/24 255.255.255.0"); + HostNETMASKeth1->addSelection("/25 255.255.255.128"); + HostNETMASKeth1->addSelection("/26 255.255.255.192"); + HostNETMASKeth1->addSelection("/27 255.255.255.224"); + HostNETMASKeth1->addSelection("/28 255.255.255.240"); + HostNETMASKeth1->addSelection("/29 255.255.255.248"); + HostNETMASKeth1->addSelection("/30 255.255.255.252"); + HostNETMASKeth1->addSelection("/31 255.255.255.254"); + HostNETMASKeth1->addSelection("/32 255.255.255.255"); + HostNETMASKeth1->setHelpText(QObject::tr("Netmask")); + HostNETMASKeth1->setValue(24); + + HostLineEdit *HostGWeth1 = new HostLineEdit("HostGWeth1"); + HostGWeth1->setLabel(QObject::tr("Gateway")); + HostGWeth1->setValue("192.168.1.1"); + HostGWeth1->setHelpText(QObject::tr("This is the default route")); + + + HostLineEdit *HostDNSeth1 = new HostLineEdit("HostDNSeth1"); + HostDNSeth1->setLabel(QObject::tr("Name server")); + HostDNSeth1->setValue("192.168.1.1"); + HostDNSeth1->setHelpText(QObject::tr("Name server")); + + + HostCheckBox *HostActiveonbooteth1 = new HostCheckBox("HostActiveonbooteth1"); + HostActiveonbooteth1->setLabel(QObject::tr("Active")); + HostActiveonbooteth1->setValue(false); + HostActiveonbooteth1->setHelpText(QObject::tr("Network is started on boot")); + + HostDefaulteth1 = new HostCheckBox("HostDefaulteth1"); + HostDefaulteth1->setLabel(QObject::tr("Default")); + HostDefaulteth1->setValue(false); + HostDefaulteth1->setHelpText(QObject::tr("Will be used as the primary interface")); + connect(HostDefaulteth1, SIGNAL(valueChanged(bool)), this, SLOT(eth1_disable_others())); + + HostCheckBox *HostUseDHCPeth1 = new HostCheckBox("HostUseDHCPeth1"); + HostUseDHCPeth1 ->setLabel(QObject::tr("Static ip address")); + HostUseDHCPeth1 ->setValue(false); + HostUseDHCPeth1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); + + wirelessbuttoneth1 = new TransButtonSetting(); + wirelessbuttoneth1->setLabel(tr("Wireless Settings")); + connect(wirelessbuttoneth1, SIGNAL(pressed()), this, SLOT(eth1_wireless_settings())); + + ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); + settings1->addChild(HostActiveonbooteth1); + settings1->addChild(HostDefaulteth1); + settings1-> addChild(wirelessbuttoneth1); + + addChild(settings1); + + Setting* dhcpEnabled = HostUseDHCPeth1; + addChild(dhcpEnabled); + setTrigger(dhcpEnabled); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + settings->addChild(HostIPeth1); + settings->addChild(HostNETMASKeth1); + settings->addChild(HostGWeth1); + settings->addChild(HostDNSeth1); + + addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); + addTarget("1", settings); +}; +eth1options::eth1options() +{ + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Wireless configuration for eth1")); + rec->addChild(new eth1_settings); + addChild(rec); +} + +void NetworkSettingseth1::eth1_disable_others() +{ + QString my_current_value; + my_current_value = HostDefaulteth1->getValue(); + if ( my_current_value == "1" ) + { + hostparm.ThisHostDefaultInterface="eth1"; + emit eth1_is_default(); + } +} +void NetworkSettingseth1::eth1_disabled() +{ + HostDefaulteth1->setValue(0); +} + +void NetworkSettingseth1::eth1_wireless_settings(void) +{ + eth1options eth1screen; + eth1screen.exec(); +} + +void NetworkSettingseth1::eth1_wireless_disable() +{ + wirelessbuttoneth1->setEnabled(false); +} + + +class wlan0_settings: public TriggeredConfigurationGroup { +public: + wlan0_settings(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + + HostComboBox *HOSTESSIDwlan0 = new HostComboBox("HOSTESSIDwlan0",true); + HOSTESSIDwlan0->setLabel(QObject::tr("ESSID")); + HOSTESSIDwlan0->addSelection("MythVantage"); + HOSTESSIDwlan0->addSelection("home_lan"); + HOSTESSIDwlan0->addSelection("type_it_here"); + HOSTESSIDwlan0->setHelpText(QObject::tr("ESSID")); + addChild(HOSTESSIDwlan0); + HostComboBox *HostUseEncryptionwlan0 = new HostComboBox("HostUseEncryptionwlan0"); + HostUseEncryptionwlan0->setLabel(QObject::tr("Encryption")); + HostUseEncryptionwlan0->setHelpText(QObject::tr("WPA, WEP, none")); + HostUseEncryptionwlan0->addSelection("none"); + HostUseEncryptionwlan0->addSelection("WPA"); + HostUseEncryptionwlan0->addSelection("WEP"); + + Setting* HostUseEncryption = HostUseEncryptionwlan0; + addChild(HostUseEncryption); + setTrigger(HostUseEncryption); + + HostLineEdit *Hostkeywlan0 = new HostLineEdit("Hostkeywlan0"); + Hostkeywlan0->setLabel(QObject::tr("key")); + Hostkeywlan0->setHelpText(QObject::tr("Key to use for encryption")); + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(Hostkeywlan0); + addTarget("none", new GridConfigurationGroup(1,false)); + addTarget("WPA", settings); + addTarget("WEP", settings); + }; +}; + +NetworkSettingswlan0::NetworkSettingswlan0(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("Network Settings")); + + HostIPwlan0 = new HostLineEdit("HostIPwlan0"); + HostIPwlan0->setLabel(QObject::tr("Ip address")); + HostIPwlan0->setValue("192.168.1.12"); + HostIPwlan0->setHelpText(QObject::tr("IP address of the new installation")); + + HostNETMASKwlan0 = new HostComboBox("HostNETMASKwlan0"); + HostNETMASKwlan0->setLabel(QObject::tr("Netmask")); + HostNETMASKwlan0->addSelection("/0 0.0.0.0"); + HostNETMASKwlan0->addSelection("/1 128.0.0.0"); + HostNETMASKwlan0->addSelection("/2 192.0.0.0"); + HostNETMASKwlan0->addSelection("/3 224.0.0.0"); + HostNETMASKwlan0->addSelection("/4 240.0.0.0"); + HostNETMASKwlan0->addSelection("/5 248.0.0.0"); + HostNETMASKwlan0->addSelection("/6 252.0.0.0"); + HostNETMASKwlan0->addSelection("/7 254.0.0.0"); + HostNETMASKwlan0->addSelection("/8 255.0.0.0"); + HostNETMASKwlan0->addSelection("/9 255.128.0.0"); + HostNETMASKwlan0->addSelection("/10 255.192.0.0 "); + HostNETMASKwlan0->addSelection("/11 255.224.0.0"); + HostNETMASKwlan0->addSelection("/12 255.240.0.0"); + HostNETMASKwlan0->addSelection("/13 255.248.0.0"); + HostNETMASKwlan0->addSelection("/14 255.252.0.0"); + HostNETMASKwlan0->addSelection("/15 255.254.0.0"); + HostNETMASKwlan0->addSelection("/16 255.255.0.0"); + HostNETMASKwlan0->addSelection("/17 255.255.128.0"); + HostNETMASKwlan0->addSelection("/18 255.255.192.0"); + HostNETMASKwlan0->addSelection("/19 255.255.224.0"); + HostNETMASKwlan0->addSelection("/20 255.255.240.0"); + HostNETMASKwlan0->addSelection("/21 255.255.248.0"); + HostNETMASKwlan0->addSelection("/22 255.255.252.0"); + HostNETMASKwlan0->addSelection("/23 255.255.254.0"); + HostNETMASKwlan0->addSelection("/24 255.255.255.0"); + HostNETMASKwlan0->addSelection("/25 255.255.255.128"); + HostNETMASKwlan0->addSelection("/26 255.255.255.192"); + HostNETMASKwlan0->addSelection("/27 255.255.255.224"); + HostNETMASKwlan0->addSelection("/28 255.255.255.240"); + HostNETMASKwlan0->addSelection("/29 255.255.255.248"); + HostNETMASKwlan0->addSelection("/30 255.255.255.252"); + HostNETMASKwlan0->addSelection("/31 255.255.255.254"); + HostNETMASKwlan0->addSelection("/32 255.255.255.255"); + HostNETMASKwlan0->setHelpText(QObject::tr("Netmask")); + HostNETMASKwlan0->setValue(24); + + HostGWwlan0 = new HostLineEdit("HostGWwlan0"); + HostGWwlan0->setLabel(QObject::tr("Gateway")); + HostGWwlan0->setValue("192.168.1.1"); + HostGWwlan0->setHelpText(QObject::tr("This is the default route")); + + + HostDNSwlan0 = new HostLineEdit("HostDNSwlan0"); + HostDNSwlan0->setLabel(QObject::tr("Name server")); + HostDNSwlan0->setValue("192.168.1.1"); + HostDNSwlan0->setHelpText(QObject::tr("Name server")); + + + HostActiveonbootwlan0 = new HostCheckBox("HostActiveonbootwlan0"); + HostActiveonbootwlan0->setLabel(QObject::tr("Active")); + HostActiveonbootwlan0->setValue(false); + HostActiveonbootwlan0->setHelpText(QObject::tr("Network is started on boot")); + + HostDefaultwlan0 = new HostCheckBox("HostDefaultwlan0"); + HostDefaultwlan0->setLabel(QObject::tr("Default")); + HostDefaultwlan0->setValue(false); + HostDefaultwlan0->setHelpText(QObject::tr("Will be used as the primary interface")); + connect(HostDefaultwlan0, SIGNAL(valueChanged(bool)), this, SLOT(wlan0_disable_others())); + + HostUseDHCPwlan0 = new HostCheckBox("HostUseDHCPwlan0"); + HostUseDHCPwlan0 ->setLabel(QObject::tr("Static ip address")); + HostUseDHCPwlan0 ->setValue(false); + HostUseDHCPwlan0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); + + wirelessbuttonwlan0 = new TransButtonSetting(); + wirelessbuttonwlan0->setLabel(tr("Wireless Settings")); + connect(wirelessbuttonwlan0, SIGNAL(pressed()), this, SLOT(wlan0_wireless_settings())); + + + ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); + settings1->addChild(HostActiveonbootwlan0); + settings1->addChild(HostDefaultwlan0); + settings1-> addChild(wirelessbuttonwlan0); + addChild(settings1); + + Setting* dhcpEnabled = HostUseDHCPwlan0; + addChild(dhcpEnabled); + setTrigger(dhcpEnabled); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + settings->addChild(HostIPwlan0); + settings->addChild(HostNETMASKwlan0); + settings->addChild(HostGWwlan0); + settings->addChild(HostDNSwlan0); + + addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); + addTarget("1", settings); + +}; + +Wlan0options::Wlan0options() +{ + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Wireless configuration for wlan0")); + rec->addChild(new wlan0_settings); + addChild(rec); +} + +void NetworkSettingswlan0::wlan0_disable_others() +{ + QString my_current_value; + my_current_value = HostDefaultwlan0->getValue(); + if ( my_current_value == "1" ) + { + hostparm.ThisHostDefaultInterface="wlan0"; + emit wlan0_is_default(); + } + + + +} +void NetworkSettingswlan0::wlan0_disabled() +{ + HostDefaultwlan0->setValue(0); +} + + +void NetworkSettingswlan0::wlan0_wireless_settings(void) +{ + Wlan0options wlan0screen; + wlan0screen.exec(); +} +void NetworkSettingswlan0::wlan0_wireless_disable() +{ + wirelessbuttonwlan0->setEnabled(false); +} + + +class wlan1_settings: public TriggeredConfigurationGroup { +public: + wlan1_settings(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + + HostComboBox *HOSTESSIDwlan1 = new HostComboBox("HOSTESSIDwlan1",true); + HOSTESSIDwlan1->setLabel(QObject::tr("ESSID")); + HOSTESSIDwlan1->addSelection("MythVantage"); + HOSTESSIDwlan1->addSelection("home_lan"); + HOSTESSIDwlan1->addSelection("type_it_here"); + HOSTESSIDwlan1->setHelpText(QObject::tr("ESSID")); + addChild(HOSTESSIDwlan1); + + + HostComboBox *HostUseEncryptionwlan1 = new HostComboBox("HostUseEncryptionwlan1"); + HostUseEncryptionwlan1->setLabel(QObject::tr("Encryption")); + HostUseEncryptionwlan1->setHelpText(QObject::tr("WPA, WEP, none")); + HostUseEncryptionwlan1->addSelection("none"); + HostUseEncryptionwlan1->addSelection("WPA"); + HostUseEncryptionwlan1->addSelection("WEP"); + + Setting* HostUseEncryption = HostUseEncryptionwlan1; + addChild(HostUseEncryption); + setTrigger(HostUseEncryption); + + HostLineEdit *Hostkeywlan1 = new HostLineEdit("Hostkeywlan1"); + Hostkeywlan1->setLabel(QObject::tr("key")); + Hostkeywlan1->setHelpText(QObject::tr("Key to use for encryption")); + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(Hostkeywlan1); + addTarget("none", new GridConfigurationGroup(1,false)); + addTarget("WPA", settings); + addTarget("WEP", settings); + + }; +}; + +NetworkSettingswlan1::NetworkSettingswlan1(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("Network Settings")); + + HostIPwlan1 = new HostLineEdit("HostIPwlan1"); + HostIPwlan1->setLabel(QObject::tr("Ip address")); + HostIPwlan1->setValue("192.168.1.12"); + HostIPwlan1->setHelpText(QObject::tr("IP address of the new installation")); + + HostNETMASKwlan1 = new HostComboBox("HostNETMASKwlan1"); + HostNETMASKwlan1->setLabel(QObject::tr("Netmask")); + HostNETMASKwlan1->addSelection("/0 0.0.0.0"); + HostNETMASKwlan1->addSelection("/1 128.0.0.0"); + HostNETMASKwlan1->addSelection("/2 192.0.0.0"); + HostNETMASKwlan1->addSelection("/3 224.0.0.0"); + HostNETMASKwlan1->addSelection("/4 240.0.0.0"); + HostNETMASKwlan1->addSelection("/5 248.0.0.0"); + HostNETMASKwlan1->addSelection("/6 252.0.0.0"); + HostNETMASKwlan1->addSelection("/7 254.0.0.0"); + HostNETMASKwlan1->addSelection("/8 255.0.0.0"); + HostNETMASKwlan1->addSelection("/9 255.128.0.0"); + HostNETMASKwlan1->addSelection("/10 255.192.0.0 "); + HostNETMASKwlan1->addSelection("/11 255.224.0.0"); + HostNETMASKwlan1->addSelection("/12 255.240.0.0"); + HostNETMASKwlan1->addSelection("/13 255.248.0.0"); + HostNETMASKwlan1->addSelection("/14 255.252.0.0"); + HostNETMASKwlan1->addSelection("/15 255.254.0.0"); + HostNETMASKwlan1->addSelection("/16 255.255.0.0"); + HostNETMASKwlan1->addSelection("/17 255.255.128.0"); + HostNETMASKwlan1->addSelection("/18 255.255.192.0"); + HostNETMASKwlan1->addSelection("/19 255.255.224.0"); + HostNETMASKwlan1->addSelection("/20 255.255.240.0"); + HostNETMASKwlan1->addSelection("/21 255.255.248.0"); + HostNETMASKwlan1->addSelection("/22 255.255.252.0"); + HostNETMASKwlan1->addSelection("/23 255.255.254.0"); + HostNETMASKwlan1->addSelection("/24 255.255.255.0"); + HostNETMASKwlan1->addSelection("/25 255.255.255.128"); + HostNETMASKwlan1->addSelection("/26 255.255.255.192"); + HostNETMASKwlan1->addSelection("/27 255.255.255.224"); + HostNETMASKwlan1->addSelection("/28 255.255.255.240"); + HostNETMASKwlan1->addSelection("/29 255.255.255.248"); + HostNETMASKwlan1->addSelection("/30 255.255.255.252"); + HostNETMASKwlan1->addSelection("/31 255.255.255.254"); + HostNETMASKwlan1->addSelection("/32 255.255.255.255"); + HostNETMASKwlan1->setHelpText(QObject::tr("Netmask")); + HostNETMASKwlan1->setValue(24); + + HostGWwlan1 = new HostLineEdit("HostGWwlan1"); + HostGWwlan1->setLabel(QObject::tr("Gateway")); + HostGWwlan1->setValue("192.168.1.1"); + HostGWwlan1->setHelpText(QObject::tr("This is the default route")); + + + HostDNSwlan1 = new HostLineEdit("HostDNSwlan1"); + HostDNSwlan1->setLabel(QObject::tr("Name server")); + HostDNSwlan1->setValue("192.168.1.1"); + HostDNSwlan1->setHelpText(QObject::tr("Name server")); + + + HostActiveonbootwlan1 = new HostCheckBox("HostActiveonbootwlan1"); + HostActiveonbootwlan1->setLabel(QObject::tr("Active")); + HostActiveonbootwlan1->setValue(false); + HostActiveonbootwlan1->setHelpText(QObject::tr("Network is started on boot")); + + HostUseDHCPwlan1 = new HostCheckBox("HostUseDHCPwlan1"); + HostUseDHCPwlan1 ->setLabel(QObject::tr("Static ip address")); + HostUseDHCPwlan1 ->setValue(false); + HostUseDHCPwlan1 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); + + wirelessbuttonwlan1 = new TransButtonSetting(); + wirelessbuttonwlan1->setLabel(tr("Wireless Settings")); + connect(wirelessbuttonwlan1, SIGNAL(pressed()), this, SLOT(wlan1_wireless_settings())); + + HostDefaultwlan1 = new HostCheckBox("HostDefaultwlan1"); + HostDefaultwlan1->setLabel(QObject::tr("Default")); + HostDefaultwlan1->setValue(false); + HostDefaultwlan1->setHelpText(QObject::tr("Will be used as the primary interface")); + connect(HostDefaultwlan1, SIGNAL(valueChanged(bool)), this, SLOT(wlan1_disable_others())); + + + ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false, false); + settings1->addChild(HostActiveonbootwlan1); + settings1->addChild(HostDefaultwlan1); + settings1-> addChild(wirelessbuttonwlan1); + + addChild(settings1); + + Setting* dhcpEnabled = HostUseDHCPwlan1; + addChild(dhcpEnabled); + setTrigger(dhcpEnabled); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + settings->addChild(HostIPwlan1); + settings->addChild(HostNETMASKwlan1); + settings->addChild(HostGWwlan1); + settings->addChild(HostDNSwlan1); + + addTarget("0", new VerticalConfigurationGroup(true)); + addTarget("1", settings); +}; + +wlan1options::wlan1options() +{ + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Wireless configuration for wlan1")); + rec->addChild(new wlan1_settings); + addChild(rec); +} +void NetworkSettingswlan1::wlan1_disable_others() +{ + QString my_current_value; + my_current_value = HostDefaultwlan1->getValue(); + if ( my_current_value == "1" ) + { + hostparm.ThisHostDefaultInterface="wlan1"; + emit wlan1_is_default(); + } +} + +void NetworkSettingswlan1::wlan1_disabled() +{ + HostDefaultwlan1->setValue(0); +} +void NetworkSettingswlan1::wlan1_wireless_disable() +{ + wirelessbuttonwlan1->setEnabled(false); +} + +void NetworkSettingswlan1::wlan1_wireless_settings(void) +{ + wlan1options wlan1screen; + wlan1screen.exec(); +} + +//--- + +class ath0_settings: public TriggeredConfigurationGroup { +public: + ath0_settings(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + + HostComboBox *HOSTESSIDath0 = new HostComboBox("HOSTESSIDath0",true); + HOSTESSIDath0->setLabel(QObject::tr("ESSID")); + HOSTESSIDath0->addSelection("MythVantage"); + HOSTESSIDath0->addSelection("home_lan"); + HOSTESSIDath0->addSelection("type_it_here"); + HOSTESSIDath0->setHelpText(QObject::tr("ESSID")); + addChild(HOSTESSIDath0); + + HostComboBox *HostUseEncryptionath0 = new HostComboBox("HostUseEncryptionath0"); + HostUseEncryptionath0->setLabel(QObject::tr("Encryption")); + HostUseEncryptionath0->setHelpText(QObject::tr("WPA, WEP, none")); + HostUseEncryptionath0->addSelection("none"); + HostUseEncryptionath0->addSelection("WPA"); + HostUseEncryptionath0->addSelection("WEP"); + + Setting* HostUseEncryption = HostUseEncryptionath0; + addChild(HostUseEncryption); + setTrigger(HostUseEncryption); + + HostLineEdit *Hostkeyath0 = new HostLineEdit("Hostkeyath0"); + Hostkeyath0->setLabel(QObject::tr("key")); + Hostkeyath0->setHelpText(QObject::tr("Key to use for encryption")); + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(Hostkeyath0); + addTarget("none", new GridConfigurationGroup(1,false)); + addTarget("WPA", settings); + addTarget("WEP", settings); + //- + + }; +}; + + +NetworkSettingsath0::NetworkSettingsath0(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("Network Settings")); + HostLineEdit *HostIPath0 = new HostLineEdit("HostIPath0"); + HostIPath0->setLabel(QObject::tr("Ip address")); + HostIPath0->setValue("192.168.1.12"); + HostIPath0->setHelpText(QObject::tr("IP address of the new installation")); + + HostComboBox *HostNETMASKath0 = new HostComboBox("HostNETMASKath0"); + HostNETMASKath0->setLabel(QObject::tr("Netmask")); + HostNETMASKath0->addSelection("/0 0.0.0.0"); + HostNETMASKath0->addSelection("/1 128.0.0.0"); + HostNETMASKath0->addSelection("/2 192.0.0.0"); + HostNETMASKath0->addSelection("/3 224.0.0.0"); + HostNETMASKath0->addSelection("/4 240.0.0.0"); + HostNETMASKath0->addSelection("/5 248.0.0.0"); + HostNETMASKath0->addSelection("/6 252.0.0.0"); + HostNETMASKath0->addSelection("/7 254.0.0.0"); + HostNETMASKath0->addSelection("/8 255.0.0.0"); + HostNETMASKath0->addSelection("/9 255.128.0.0"); + HostNETMASKath0->addSelection("/10 255.192.0.0 "); + HostNETMASKath0->addSelection("/11 255.224.0.0"); + HostNETMASKath0->addSelection("/12 255.240.0.0"); + HostNETMASKath0->addSelection("/13 255.248.0.0"); + HostNETMASKath0->addSelection("/14 255.252.0.0"); + HostNETMASKath0->addSelection("/15 255.254.0.0"); + HostNETMASKath0->addSelection("/16 255.255.0.0"); + HostNETMASKath0->addSelection("/17 255.255.128.0"); + HostNETMASKath0->addSelection("/18 255.255.192.0"); + HostNETMASKath0->addSelection("/19 255.255.224.0"); + HostNETMASKath0->addSelection("/20 255.255.240.0"); + HostNETMASKath0->addSelection("/21 255.255.248.0"); + HostNETMASKath0->addSelection("/22 255.255.252.0"); + HostNETMASKath0->addSelection("/23 255.255.254.0"); + HostNETMASKath0->addSelection("/24 255.255.255.0"); + HostNETMASKath0->addSelection("/25 255.255.255.128"); + HostNETMASKath0->addSelection("/26 255.255.255.192"); + HostNETMASKath0->addSelection("/27 255.255.255.224"); + HostNETMASKath0->addSelection("/28 255.255.255.240"); + HostNETMASKath0->addSelection("/29 255.255.255.248"); + HostNETMASKath0->addSelection("/30 255.255.255.252"); + HostNETMASKath0->addSelection("/31 255.255.255.254"); + HostNETMASKath0->addSelection("/32 255.255.255.255"); + HostNETMASKath0->setHelpText(QObject::tr("Netmask")); + HostNETMASKath0->setValue(24); + + HostLineEdit *HostGWath0 = new HostLineEdit("HostGWath0"); + HostGWath0->setLabel(QObject::tr("Gateway")); + HostGWath0->setValue("192.168.1.1"); + HostGWath0->setHelpText(QObject::tr("This is the default route")); + + + HostLineEdit *HostDNSath0 = new HostLineEdit("HostDNSath0"); + HostDNSath0->setLabel(QObject::tr("Name server")); + HostDNSath0->setValue("192.168.1.1"); + HostDNSath0->setHelpText(QObject::tr("Name server")); + + + HostCheckBox *HostActiveonbootath0 = new HostCheckBox("HostActiveonbootath0"); + HostActiveonbootath0->setLabel(QObject::tr("Active")); + HostActiveonbootath0->setValue(false); + HostActiveonbootath0->setHelpText(QObject::tr("Network is started on boot")); + + HostDefaultath0 = new HostCheckBox("HostDefaultath0"); + HostDefaultath0->setLabel(QObject::tr("Default")); + HostDefaultath0->setValue(false); + HostDefaultath0->setHelpText(QObject::tr("Will be used as the primary interface")); + connect(HostDefaultath0, SIGNAL(valueChanged(bool)), this, SLOT(ath0_disable_others())); + + HostCheckBox *HostUseDHCPath0 = new HostCheckBox("HostUseDHCPath0"); + HostUseDHCPath0 ->setLabel(QObject::tr("Static ip address")); + HostUseDHCPath0 ->setValue(false); + HostUseDHCPath0 ->setHelpText(QObject::tr("Enable to use a static ip address, otherwise dhcp will be used.")); + + wirelessbuttonath0 = new TransButtonSetting(); + wirelessbuttonath0->setLabel(tr("Wireless Settings")); + connect(wirelessbuttonath0, SIGNAL(pressed()), this, SLOT(ath0_wireless_settings())); + + ConfigurationGroup* settings1 = new GridConfigurationGroup(3,false, false, false,false); + settings1->addChild(HostActiveonbootath0); + settings1->addChild(HostDefaultath0); + settings1-> addChild(wirelessbuttonath0); + + addChild(settings1); + + Setting* dhcpEnabled = HostUseDHCPath0; + addChild(dhcpEnabled); + setTrigger(dhcpEnabled); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + settings->addChild(HostIPath0); + settings->addChild(HostNETMASKath0); + settings->addChild(HostGWath0); + settings->addChild(HostDNSath0); + + addTarget("0", new VerticalConfigurationGroup(false,false,false,false)); + addTarget("1", settings); +}; +ath0options::ath0options() +{ + + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Wireless configuration for ath0")); + rec->addChild(new ath0_settings); + addChild(rec); +} + +void NetworkSettingsath0::ath0_disable_others() +{ + QString my_current_value; + my_current_value = HostDefaultath0->getValue(); + if ( my_current_value == "1" ) + { + hostparm.ThisHostDefaultInterface="ath0"; + emit ath0_is_default(); + } +} +void NetworkSettingsath0::ath0_disabled() +{ + HostDefaultath0->setValue(0); +} + +void NetworkSettingsath0::ath0_wireless_settings(void) +{ + ath0options ath0screen; + ath0screen.exec(); +} + +void NetworkSettingsath0::ath0_wireless_disable() +{ + wirelessbuttonath0->setEnabled(false); +} + + +//-- + +class NetworkSettingsFrame: + public TriggeredConfigurationGroup { +public: + NetworkSettingsFrame(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + setLabel(QObject::tr("Network Settings (1/2)")); + Setting* netdevice = HostNetDevice(); + addChild(netdevice); + setTrigger(netdevice); + + NetworkSettingswlan0 *Nwlan0 = new NetworkSettingswlan0 ; + NetworkSettingswlan1 *Nwlan1 = new NetworkSettingswlan1 ; + NetworkSettingseth0 *Neth0 = new NetworkSettingseth0 ; + NetworkSettingseth1 *Neth1 = new NetworkSettingseth1 ; + NetworkSettingsath0 *Nath0 = new NetworkSettingsath0 ; + + QString found_wireless=findnet_wireless(); + + if ( not found_wireless.contains("eth0")) + { + Neth0->eth0_wireless_disable(); + hostparm.ThisHOST_iswirelesseth0="0"; + } + else + { + hostparm.ThisHOST_iswirelesseth0="1"; + } + + if ( not found_wireless.contains("eth1")) + { + Neth1->eth1_wireless_disable(); + hostparm.ThisHOST_iswirelesseth1="0"; + } + else + { + hostparm.ThisHOST_iswirelesseth1="1"; + } + + if ( not found_wireless.contains("wlan0")) + { + Nwlan0->wlan0_wireless_disable(); + hostparm.ThisHOST_iswirelesswlan0="0"; + } + else + { + hostparm.ThisHOST_iswirelesswlan0="1"; + } + + if ( not found_wireless.contains("wlan1")) + { + Nwlan1->wlan1_wireless_disable(); + hostparm.ThisHOST_iswirelesswlan1="0"; + } + else + { + hostparm.ThisHOST_iswirelesswlan0="1"; + } + + if ( not found_wireless.contains("ath0")) + { + Nath0->ath0_wireless_disable(); + hostparm.ThisHOST_iswirelessath0="0"; + } + else + { + hostparm.ThisHOST_iswirelessath0="1"; + } + connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Nwlan0, SLOT(wlan0_disabled())); + connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Neth0, SLOT(eth0_disabled())); + connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Neth1, SLOT(eth1_disabled())); + connect(Nwlan1, SIGNAL(wlan1_is_default(void)), Nath0, SLOT(ath0_disabled())); + + connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Nwlan1, SLOT(wlan1_disabled())); + connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Neth0, SLOT(eth0_disabled())); + connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Neth1, SLOT(eth1_disabled())); + connect(Nwlan0, SIGNAL(wlan0_is_default(void)), Nath0, SLOT(ath0_disabled())); + + connect(Neth1, SIGNAL(eth1_is_default(void)), Nwlan1, SLOT(wlan1_disabled())); + connect(Neth1, SIGNAL(eth1_is_default(void)), Nwlan0, SLOT(wlan0_disabled())); + connect(Neth1, SIGNAL(eth1_is_default(void)), Neth0, SLOT(eth0_disabled())); + connect(Neth1, SIGNAL(eth1_is_default(void)), Nath0, SLOT(ath0_disabled())); + + connect(Neth0, SIGNAL(eth0_is_default(void)), Nwlan0, SLOT(wlan0_disabled())); + connect(Neth0, SIGNAL(eth0_is_default(void)), Nwlan1, SLOT(wlan1_disabled())); + connect(Neth0, SIGNAL(eth0_is_default(void)), Neth1, SLOT(eth1_disabled())); + connect(Neth0, SIGNAL(eth0_is_default(void)), Nath0, SLOT(ath0_disabled())); + + connect(Nath0, SIGNAL(ath0_is_default(void)), Nwlan0, SLOT(wlan0_disabled())); + connect(Nath0, SIGNAL(ath0_is_default(void)), Nwlan1, SLOT(wlan1_disabled())); + connect(Nath0, SIGNAL(ath0_is_default(void)), Neth1, SLOT(eth1_disabled())); + connect(Nath0, SIGNAL(ath0_is_default(void)), Neth0, SLOT(eth0_disabled())); + + + HostLineEdit *HostMTUeth0 = new HostLineEdit("HostMTUeth0"); + HostMTUeth0->setLabel(QObject::tr("MTU")); + HostMTUeth0->setValue(""); + HostMTUeth0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); + + ConfigurationGroup* settingseth0 = new GridConfigurationGroup(1,false, false, false, false); + settingseth0->addChild(Neth0); + settingseth0->addChild(HostMTUeth0); + + + HostLineEdit *HostMTUeth1 = new HostLineEdit("HostMTUeth1"); + HostMTUeth1->setLabel(QObject::tr("MTU")); + HostMTUeth1->setValue(""); + HostMTUeth1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); + + ConfigurationGroup* settingseth1 = new GridConfigurationGroup(1,false, false, true, true); + settingseth1->addChild(Neth1); + settingseth1->addChild(HostMTUeth1); + + HostLineEdit *HostMTUwlan0 = new HostLineEdit("HostMTUwlan0"); + HostMTUwlan0->setLabel(QObject::tr("MTU")); + HostMTUwlan0->setValue(""); + HostMTUwlan0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); + + ConfigurationGroup* settingswlan0 = new GridConfigurationGroup(1,false, false, false, false); + settingswlan0->addChild(Nwlan0); + settingswlan0->addChild(HostMTUwlan0); + + HostLineEdit *HostMTUwlan1 = new HostLineEdit("HostMTUwlan1"); + HostMTUwlan1->setLabel(QObject::tr("MTU")); + HostMTUwlan1->setValue(""); + HostMTUwlan1->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); + + ConfigurationGroup* settingswlan1 = new GridConfigurationGroup(1,false, false, false, false); + settingswlan1->addChild(Nwlan1); + settingswlan1->addChild(HostMTUwlan1); + + HostLineEdit *HostMTUath0 = new HostLineEdit("HostMTUath0"); + HostMTUath0->setLabel(QObject::tr("MTU")); + HostMTUath0->setValue(""); + HostMTUath0->setHelpText(QObject::tr("Leave this blank for default values. Changing this setting can have adverse affects, use with caution. Not all values will be supported by the device.")); + + ConfigurationGroup* settingsath0 = new GridConfigurationGroup(1,false, false, false, false); + settingsath0->addChild(Nath0); + settingsath0->addChild(HostMTUath0); + + addTarget("wlan0", settingswlan0); + addTarget("wlan1", settingswlan1); + addTarget("eth0", settingseth0); + addTarget("eth1", settingseth1); + addTarget("ath0", settingsath0); + }; +}; + + + +NetworkOptionsFrame::NetworkOptionsFrame(): + VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("Network Settings (2/2)")); + HostMyhostname = new HostComboBox("HostMyhostname",true); + HostMyhostname->setLabel(QObject::tr("Hostname")); + HostMyhostname->addSelection("Envy"); + HostMyhostname->addSelection("Greed"); + HostMyhostname->addSelection("Lust"); + HostMyhostname->addSelection("Sloth"); + HostMyhostname->addSelection("Wrath"); + HostMyhostname->addSelection("Gluttony"); + HostMyhostname->addSelection("Pride"); + HostMyhostname->addSelection("Humility"); + HostMyhostname->addSelection("Generosity"); + HostMyhostname->addSelection("Love"); + HostMyhostname->addSelection("Kindness"); + HostMyhostname->addSelection("SelfControl"); + HostMyhostname->addSelection("Faith"); + HostMyhostname->addSelection("Zeal"); + HostMyhostname->addSelection("type_hostname_here"); + HostMyhostname->setHelpText(QObject::tr("The hostname must resolve via DNS. If DNS is not available then append .local to the end of the hostname. When using .local, names must not include an additional .")); + + FetchDhcpHostnameButton = new TransButtonSetting(); + FetchDhcpHostnameButton ->setLabel(tr("Ask DHCP server for hostname")); + connect(FetchDhcpHostnameButton, SIGNAL(pressed()), this, SLOT(fetch_hostname())); + + networklabel = new TransLabelSetting(); + QString labelstring; + labelstring = "Will use " + hostparm.ThisHostDefaultInterface + " to check for hostname"; + networklabel->setValue(labelstring); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false, false,false,false); + settings->addChild(HostMyhostname); + settings->addChild(networklabel); + settings->addChild(FetchDhcpHostnameButton); + + addChild(settings); + +} + +QString NetworkOptionsFrame::find_hostname() +{ + QString new_host; + QString cmdtxt; + new_host="null"; + cmdtxt="sudo "; + cmdtxt.append(MV_ROOT) ; + cmdtxt.append("bin/systemconfig.py -m dhcp_request -d " ); + cmdtxt.append(hostparm.ThisHostDefaultInterface); + myth_system(cmdtxt); + system(cmdtxt); + QString line; + QFile file("/tmp/mvnetwork.dhcpinfo"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("new_host_name")) + { + QString s = line.simplifyWhiteSpace(); + s = s.section( "=", 1, 1 ); // s == "surname" + new_host = s.simplifyWhiteSpace(); + } + } + file.close(); + } + + return new_host; +} + +void NetworkOptionsFrame::fetch_hostname() +{ + QString new_host; + new_host=find_hostname(); + if ( new_host != "null" ) + { + networklabel->setValue("Updated the hostname."); + HostMyhostname->addSelection(new_host); + HostMyhostname->setValue(new_host); + } + else + networklabel->setValue("DHCP server did not return a hostname."); +} + +static HostCheckBox *HostAutodown() +{ + HostCheckBox *gc = new HostCheckBox("HostAutodown"); + gc->setLabel(QObject::tr("Turn off machine at a specified time")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Will turn off this system.")); + return gc; +}; + +static HostSpinBox *HostWakeupTime() +{ + HostSpinBox *gc = new HostSpinBox("HostWakeupTime", -1, 23, 1, true); + gc->setLabel(QObject::tr("Power on time")); + gc->setValue(6); + gc->setHelpText(QObject::tr("Select the hour to auto poweron this system. Use -1 to disable" )); + return gc; +} + +static HostSpinBox *HostShutdownTime() +{ + HostSpinBox *gc = new HostSpinBox("HostShutdownTime", -1, 23, 1, true); + gc->setLabel(QObject::tr("Auto Shutdown time")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" )); + return gc; +} + +static HostSpinBox *HostShutdownTime2() +{ + HostSpinBox *gc = new HostSpinBox("HostShutdownTime2", -1, 23, 1, true); + gc->setLabel(QObject::tr("2nd auto Shutdown time")); + gc->setValue(2); + gc->setHelpText(QObject::tr("Select the hour to poweroff this syste. Times are in 24hour format. Use -1 to disable" )); + return gc; +} + + + +static HostCheckBox *HostUseWOL() +{ + HostCheckBox *gc = new HostCheckBox("HostUseWOL"); + gc->setLabel(QObject::tr("Use Wake on Lan to turn on system")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Unless you know what your doing leave it checked")); + return gc; +}; + +static HostCheckBox *HostUseNVRAM() +{ + HostCheckBox *gc = new HostCheckBox("HostUseNVRAM"); + gc->setLabel(QObject::tr("Use nvram to turn on system")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Leaved checked unless nvram causes problems.")); + return gc; +}; + + +static HostCheckBox *HostUseXLargeMouse() +{ + HostCheckBox *gc = new HostCheckBox("HostUseXLargeMouse"); + gc->setLabel(QObject::tr("Large Mouse Pointer")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Use an extra large mouse pointer. This takes effect the next time the frontend is started.")); + return gc; +}; + + + +class WakeSettings: public TriggeredConfigurationGroup { +public: + WakeSettings(): + + TriggeredConfigurationGroup(true) { + setLabel(QObject::tr("Shutdown Settings")); + Setting* Autodown = HostAutodown(); + addChild(Autodown); + setTrigger(Autodown); + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); + settings->addChild(HostShutdownTime()); + settings->addChild(HostShutdownTime2()); + // settings->addChild(HostWakeupTime()); + // settings->addChild(HostUseNVRAM()); + // settings->addChild(HostUseWOL()); + addTarget("0", new VerticalConfigurationGroup(true)); + addTarget("1", settings); + }; +}; + +class Frontend_settings_group: public TriggeredConfigurationGroup { +public: + Frontend_settings_group(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + Setting* fe = HostRunFrontend(); + addChild(fe); + setTrigger(fe); + ConfigurationGroup* setting1 = new GridConfigurationGroup(2,false); + + setting1->addChild(HostUseXLargeMouse()); + setting1->addChild(HostUsemythfrontend()); +// setting1->addChild(HostXres()); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); + settings->addChild(setting1); + +// settings->addChild(new HostRemoteType); + + addTarget("0", new VerticalConfigurationGroup(false)); + addTarget("1", settings); + + }; +}; + +SystemtypeGroup::SystemtypeGroup(): TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { + setLabel(QObject::tr("System Type")); + HostSystemType = new HostComboBox("HostSystemType"); + HostSystemType->setLabel(QObject::tr("System Type")); + HostSystemType->addSelection("Master_backend"); + HostSystemType->addSelection("Frontend_only"); +// HostSystemType->addSelection("Standalone"); + HostSystemType->addSelection("Slave_backend"); + + if ( ((gCoreContext->GetSetting("HostaccesshostypeSystemtype")) == "0" )) + HostSystemType->setEnabled(false); + + addChild(HostSystemType); + setTrigger(HostSystemType); + + ConfigurationGroup* fe1 = new GridConfigurationGroup(2,false,false,true,true); + fe1->addChild(HostUseXLargeMouse()); + fe1->addChild(HostUsemythfrontend()); + + ConfigurationGroup* standalone = new VerticalConfigurationGroup(false,false,true,true); +// standalone->addChild(HostXres()); + //FIXME +// standalone->addChild(new HostRemoteType); + standalone->addChild(fe1); + + + ConfigurationGroup* frontend = new VerticalConfigurationGroup(false,false,true,true); + frontend->addChild(HostMysqlserverip_listbox()); +// frontend->addChild(HostXres()); + //FIXME +// frontend->addChild(new HostRemoteType); + frontend->addChild(fe1); + + ConfigurationGroup* backend = new VerticalConfigurationGroup(false,false,false,false); + backend->addChild( new Frontend_settings_group); + + ConfigurationGroup* slave = new VerticalConfigurationGroup(false,false,true,true); + slave->addChild(HostMysqlserverip_listbox()); + slave->addChild( new Frontend_settings_group); + + + addTarget("Standalone", standalone); + addTarget("Frontend_only", frontend); + addTarget("Master_backend", backend); + addTarget("Slave_backend", slave); + connect(HostSystemType, SIGNAL(valueChanged(const QString&)), + this, SLOT(SystemtypeHelp())); + +}; + +void SystemtypeGroup::SystemtypeHelp(void) +{ + QString msg = (QObject::tr("Type of configuration for this system")); + QString selectedhostype; + selectedhostype = HostSystemType->getValue(); + if ( selectedhostype.isEmpty()) + { + HostSystemType->setHelpText(msg) ; + return; + } + + if (selectedhostype == "Standalone") + msg="Complete System, that doesn't allow outside connections."; + if (selectedhostype == "Frontend_only") + msg="Frontend_only needs a primary system (master backend) already on the network."; + if (selectedhostype == "Master_backend") + msg="Primary system with tuners, scheduling and database. This allows for remote frontend and slave backends."; + if (selectedhostype == "Slave_backend") + msg="Secondary system for extra tuners."; + + HostSystemType->setHelpText(msg) ; +} + + + +// HostRemoteType::HostRemoteType(): +// HostImageSelect("HostRemoteType") { +// setLabel(QObject::tr("Remote")); +// QString dirtxt; +// dirtxt=MV_ROOT; +// dirtxt.append("templates/remotes"); +// QDir remotes(dirtxt); +// remotes.setFilter(QDir::Dirs); +// remotes.setSorting(QDir::Name | QDir::IgnoreCase); +// QFileInfoList fil = remotes.entryInfoList(QDir::Dirs); +// for( QFileInfoList::iterator it = fil.begin(); +// it != fil.end(); +// ++it ) +// { +// QFileInfo &remote = *it; +// if (remote.fileName() == "." || remote.fileName() == ".." ) +// continue; +// +// QString name = remote.fileName(); +// QString defaultpreview = remotes.absolutePath(); +// defaultpreview += "/"; +// defaultpreview += name; +// defaultpreview += "/preview.jpg"; +// QFileInfo preview(defaultpreview); +// if (!preview.exists()) +// { +// LOG(VB_GENERAL, LOG_ERR, QString("Theme %1 missing preview image.").arg(remote.fileName())); +// } +// else +// { +// QImage* previewImage = new QImage(preview.absoluteFilePath()); +// if (previewImage->width() == 0 || previewImage->height() == 0) +// LOG(VB_GENERAL, LOG_ERR, QString("Problem reading remote preview %1").arg(preview.filePath())); +// +// //Add the remote +// addImageSelection(name, previewImage, remote.fileName()); +// LOG(VB_GENERAL, LOG_DEBUG, QString("Adding remote %1.").arg(name)); +// } +// } +// +// } + +class AdvancedSettings: public TriggeredConfigurationGroup { +public: + + AdvancedSettings(): + TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) + { + + setLabel(QObject::tr("Advanced Settings (1/2)")); + Setting* Autodown = HostAutodown(); + setTrigger(Autodown); + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); + ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false); + checkbox->addChild(HostServiceMythWEB()); + // checkbox->addChild(HostServiceNFS()); + checkbox->addChild(Hostbootsplash()); + checkbox->addChild(HostncidClient()); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); + if ( hostparm.ThisSystemType == "Standalone" ) + { + // smb_busy_box(); + settings->addChild(new NCIDsettings); + // settings->addChild(new SAMBAsettings); + // checkbox->addChild(HostServiceRRD() ); + settings->addChild(checkbox) ; + } + else if (hostparm.ThisSystemType == "Master_backend" ) + { + // smb_busy_box(); +// checkbox->addChild(GlobalPKG_MIRROR()); + settings->addChild(new NCIDsettings); + // settings->addChild(new SAMBAsettings); + // checkbox->addChild(HostServiceRRD() ); + settings->addChild(checkbox) ; + } + else if (hostparm.ThisSystemType == "Frontend_only" ) + { + settings->addChild(Hostbootsplash()); + settings->addChild(HostncidClient()); +// settings->addChild(HostServiceRRD() ); + } + else if (hostparm.ThisSystemType == "Slave_backend" ) + { + settings->addChild(Hostbootsplash()); + settings->addChild(HostncidClient()); + +// settings->addChild(HostServiceRRD() ); + +// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR")) == "1") +// settings->addChild(HostPKG_MIRROR()); + }; + addTarget("", settings); + }; +}; + + +class AdvancedSettings_2: public TriggeredConfigurationGroup { +public: + AdvancedSettings_2(): + TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { + setLabel(QObject::tr("Advanced Settings (2/2)")); + Setting* Autodown = HostAutodown(); + setTrigger(Autodown); + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); +/* + ConfigurationGroup *checkbox = new GridConfigurationGroup(2,false); + checkbox->addChild(HostServiceMythWEB()); + checkbox->addChild(HostServiceNFS()); + checkbox->addChild(Hostbootsplash()); + checkbox->addChild(HostncidClient());*/ + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); + if ( hostparm.ThisSystemType == "Standalone" ) + { + settings->addChild(HostRunDHCP()); + settings->addChild(HostBEWait()); + //settings->addChild(new Evroutersettings); + } + else if (hostparm.ThisSystemType == "Master_backend" ) + { + settings->addChild(new Backupsettings); + settings->addChild(HostRunDHCP()); + settings->addChild(HostBEWait()); + //settings->addChild(new Evroutersettings); + } + else if (hostparm.ThisSystemType == "Frontend_only" ) + { + //settings->addChild(new Evroutersettings); + settings->addChild(HostBEWait()); + } + else if (hostparm.ThisSystemType == "Slave_backend" ) + { + //settings->addChild(new Evroutersettings); + settings->addChild(HostBEWait()); + }; + + addTarget("", settings); + }; +}; + + +/*_______________________________Sound settings ____________________*/ +SoundSettings::SoundSettings(): + TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { + setLabel(QObject::tr("Audio Settings")); + + HostAudiotype = new HostComboBox("HostAudiotype",false); + HostAudiotype->setLabel(QObject::tr("Sound Card Driver")); + HostAudiotype->addSelection("OSS"); + HostAudiotype->addSelection("ALSA"); + HostAudiotype->addSelection("tinker"); + + HostAudiotype->setHelpText(QObject::tr("Select the sound driver, OSS or ALSA." ) ); + addChild(HostAudiotype); + setTrigger(HostAudiotype); + +// HostsyncXine = new HostCheckBox("HostsyncXine"); +// HostsyncXine->setLabel(QObject::tr("Xine")); +// HostsyncXine->setValue(true); +// +// HostsyncMplayer = new HostCheckBox("HostsyncMplayer"); +// HostsyncMplayer->setLabel(QObject::tr("mplayer")); +// HostsyncMplayer->setValue(true); +// +// HostsyncMythMusic = new HostCheckBox("HostsyncMythMusic"); +// HostsyncMythMusic->setLabel(QObject::tr("mythmusic")); +// HostsyncMythMusic->setValue(true); +// +// HostsyncMythFrontend = new HostCheckBox("HostsyncMythFrontend"); +// HostsyncMythFrontend->setLabel(QObject::tr("mythfrontend")); +// HostsyncMythFrontend->setValue(true); + + + + +// HorizontalConfigurationGroup *syncboxes = new HorizontalConfigurationGroup(false, false, true, true); +// syncboxes->addChild(HostsyncXine); +// syncboxes->addChild(HostsyncMplayer); +// syncboxes->addChild(HostsyncMythMusic); +// syncboxes->addChild(HostsyncMythFrontend); + + HorizontalConfigurationGroup *lp = new HorizontalConfigurationGroup(false, false, true, true); + HorizontalConfigurationGroup *lpalsa = new HorizontalConfigurationGroup(false, false, true, true); + + TransButtonSetting *LoadOSSbutton = new TransButtonSetting(); + LoadOSSbutton->setLabel(tr("Load OSS driver")); + TransButtonSetting *LoadALSAbutton = new TransButtonSetting(); + LoadALSAbutton->setLabel(tr("Load ALSA driver")); + + TransButtonSetting *TestAudiobutton = new TransButtonSetting(); + TestAudiobutton->setLabel(tr("Test Audio Settings")); + lp->addChild(TestAudiobutton); + lp->addChild(LoadOSSbutton); + + TransButtonSetting *TestALSAAudiobutton = new TransButtonSetting(); + TestALSAAudiobutton->setLabel(tr("Test ALSA Audio Settings")); + lpalsa->addChild(TestALSAAudiobutton); + lpalsa->addChild(LoadALSAbutton); + + TransLabelSetting *osslabel = new TransLabelSetting(); + osslabel->setValue("The original OSS! More information can be found at:"); + + TransLabelSetting *osslabel1 = new TransLabelSetting(); + osslabel1->setValue("http://www.opensound.com \n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n"); + + TransLabelSetting *AlsaLabel = new TransLabelSetting(); + AlsaLabel->setValue("ALSA, the alternative to OSS\n\nPlease note to fully configure sound visit the \nMythTV audio setup.\n"); + +// OSS GROUP + SoundOSSsettings *OSS = new SoundOSSsettings ; + ConfigurationGroup* osssettings = new VerticalConfigurationGroup(false); + osssettings->addChild(osslabel); + osssettings->addChild(osslabel1); + osssettings->addChild(OSS); + // osssettings->addChild(syncboxes); + osssettings->addChild(lp); + connect(this, SIGNAL(oss_sig()), + OSS, SLOT(soundossgathersettings())); + connect(TestAudiobutton, SIGNAL(pressed()), + this, SLOT(soundossgathersettings_1())); + connect(LoadOSSbutton, SIGNAL(pressed()), + OSS, SLOT(loadossdriver())); + +// ALSA GROUP + SoundALSAsettings *ALSA = new SoundALSAsettings ; + ConfigurationGroup* alsasettings = new VerticalConfigurationGroup(false); + alsasettings->addChild(AlsaLabel); + alsasettings->addChild(ALSA); +// alsasettings->addChild(syncboxes); + alsasettings->addChild(lpalsa); + + connect(this, SIGNAL(alsa_sig()), + ALSA, SLOT(soundalsagathersettings())); + connect(TestALSAAudiobutton, SIGNAL(pressed()), + this, SLOT(soundalsagathersettings_1())); + connect(LoadALSAbutton, SIGNAL(pressed()), + ALSA, SLOT(loadalsadriver())); + addTarget("ALSA", alsasettings); + addTarget("OSS", osssettings); + addTarget("tinker", new VerticalConfigurationGroup(false)); +}; + + +SoundOSSsettings::SoundOSSsettings(): + TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +{ + SetVertical(true); + HostSoundTypeout = new HostComboBox("HostSoundTypeout"); + HostSoundTypeout->setLabel(QObject::tr("Type")); + HostSoundTypeout->addSelection("Analog"); + HostSoundTypeout->addSelection("Digital"); + HostSoundTypeout->setHelpText(QObject::tr("")); + + HostSoundOssAnalog = new HostComboBox("HostSoundOssAnalog"); + HostSoundOssDigital = new HostComboBox("HostSoundOssDigital"); + fillossselection(); + int findossanalog=HostSoundOssAnalog->findSelection(hostparm.OLDHostSoundOSSAnalog ); + int findossdigital=HostSoundOssDigital->findSelection(hostparm.OLDHostSoundOSSDigital ); + HostSoundOssAnalog->setValue(findossanalog); + HostSoundOssDigital->setValue(findossdigital); + addChild(HostSoundTypeout); + setTrigger(HostSoundTypeout); + addTarget("Analog", HostSoundOssAnalog); + addTarget("Digital", HostSoundOssDigital); +}; + +SoundALSAsettings::SoundALSAsettings(): + TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +{ + SetVertical(true); + HostSoundALSATypeout = new HostComboBox("HostSoundALSATypeout"); + HostSoundALSATypeout->setLabel(QObject::tr("Type")); + HostSoundALSATypeout->addSelection("Analog"); + HostSoundALSATypeout->addSelection("Digital"); + HostSoundALSATypeout->setHelpText(QObject::tr("")); + + HostSoundALSAAnalog = new HostComboBox("HostSoundALSAAnalog"); + HostSoundALSADigital = new HostComboBox("HostSoundALSADigital"); + fillALSAselection(); + int findalsaanalog=HostSoundALSAAnalog->findSelection(hostparm.OLDHostSoundALSAAnalog ); + int findalsadigital=HostSoundALSADigital->findSelection(hostparm.OLDHostSoundALSADigital ); + HostSoundALSAAnalog->setValue(findalsaanalog); + HostSoundALSADigital->setValue(findalsadigital); + addChild(HostSoundALSATypeout); + setTrigger(HostSoundALSATypeout); + addTarget("Analog", HostSoundALSAAnalog); + addTarget("Digital", HostSoundALSADigital); +}; + +void SoundOSSsettings::loadossdriver() +{ +// Add info popup right here + QString cmdtxt; + cmdtxt="sudo "; + cmdtxt.append(MV_ROOT) ; + cmdtxt.append("bin/soundconfig.sh -t LOAD -i OSS &"); + system(cmdtxt); + int return_code = 0; + + QString msgtext = "Loading OSS driver" ; + + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack, + "ossbusy"); + + int progressbar=1; + MythProgressDialog *popupProgress = NULL; + popupProgress = new MythProgressDialog(msgtext, 50); + if (popupProgress) + { + popupProgress->setProgress(progressbar); + } + + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + + while ( return_code == 0 ) + { + progressbar++; + popupProgress->setProgress(progressbar); + if (progressbar > 50 ) + progressbar = 10; + + return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + + if (popupProgress) + { + popupProgress->Close(); + popupProgress->deleteLater(); + } + + fillossselection(); + +} +void SoundALSAsettings::loadalsadriver() +{ + QString cmdtxt; + cmdtxt="sudo "; + cmdtxt.append(MV_ROOT) ; + cmdtxt.append("bin/soundconfig.sh -t LOAD -i ALSA &"); + system(cmdtxt); + int return_code = 0; + QString msgtext = "Loading ALSA driver" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + + int progressbar=1; + MythProgressDialog *popupProgress = NULL; + popupProgress = new MythProgressDialog(msgtext, 50); + if (popupProgress) + { + popupProgress->setProgress(progressbar); + } + + + while ( return_code == 0 ) + { + progressbar++; + popupProgress->setProgress(progressbar); + if (progressbar > 50 ) + progressbar = 10; + + return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + if (popupProgress) + { + popupProgress->Close(); + popupProgress->deleteLater(); + } + + HostSoundALSAAnalog-> clearSelections(); + HostSoundALSADigital-> clearSelections(); + + fillALSAselection(); + +} +void SoundOSSsettings::fillossselection() +{ + myth_system("ossinfo -v1 -a |grep device > /tmp/ossdevices"); + QString currentitem; + QString currentfile = "/tmp/ossdevices"; + QString line; + QString legacy_device; + QString simpleitem; + QString currentitemtext; + QRegExp sep( "\t" ); + QFile file(currentfile); + QString ossfound="false"; + HostSoundOssAnalog->clearSelections(); + HostSoundOssDigital-> clearSelections(); + + + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if (line.contains("device index") ) + { + legacy_device = t.readLine(); + legacy_device= legacy_device.section( "/",2,2); + currentitemtext=line.section( "/" , 0 ,0 ); + simpleitem = currentitemtext.simplifyWhiteSpace(); + simpleitem = simpleitem.remove ( "(" ); + simpleitem = simpleitem.remove ( ")" ); + simpleitem.append(" ("); + simpleitem.append(legacy_device); + simpleitem.append(")"); + if (line.contains("spdout") || line.contains("digital") ) + HostSoundOssDigital->addSelection(simpleitem); + else + HostSoundOssAnalog->addSelection(simpleitem); + ossfound="true"; + } + } + if (ossfound=="false") + { + simpleitem="No cards found, try loading the OSS drivers"; + HostSoundOssAnalog->addSelection(simpleitem); + HostSoundOssDigital->addSelection(simpleitem); + } + } + return ; +}; + + +void SoundALSAsettings::fillALSAselection() +{ + HostSoundALSAAnalog-> clearSelections(); + HostSoundALSADigital-> clearSelections(); + myth_system("aplay -l > /tmp/alsadevices"); + QString currentfile = "/tmp/alsadevices"; + QString line; + QString hwdevice; + QString alsadescription; + QString alsadescription2; + QString temphwdevice; + QString simpleitem; + QFile file(currentfile); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if (line.startsWith("card") ) + { + if (line.contains("snd_ctl_card_info")) + { + simpleitem="Try loading the alsa drivers"; + HostSoundALSAAnalog->addSelection(simpleitem); + HostSoundALSADigital->addSelection(simpleitem); + break; + } + //card 0: I82801DBICH4:q [Intel 82801DB-ICH4], device 0: Intel ICH [Intel 82801DB-ICH4] + alsadescription=line.section( "," , 0 ,0 ); + alsadescription=alsadescription.section(":",1,1); + + alsadescription2=line.section( "," , 1 ,1 ); + //alsadescription2=alsadescription.section(":",0,0); + + hwdevice=line.section( ":" , 0 ,0 ); + hwdevice=hwdevice.section( " " , -1,-1 ); + //grabbing 2nd half of device + temphwdevice=line.section(",",1,1); + temphwdevice=temphwdevice.section(":",0,0); + temphwdevice=temphwdevice.section(" ",-1,-1 ); + hwdevice.append(","); + hwdevice.append(temphwdevice); + simpleitem=alsadescription2 + "(hw:" + hwdevice + ")"; + if (line.contains("IEC958") || line.contains("Digital")) + HostSoundALSADigital->addSelection(simpleitem); + else + HostSoundALSAAnalog->addSelection(simpleitem); + } + } + } + return ; + +} + +void SoundSettings::soundossgathersettings_1 (void) +{ + hostparm.ThisHostAudiotype = HostAudiotype->getValue(); +// hostparm.ThisHostsyncXine = HostsyncXine->getValue(); +// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue(); +// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue(); +// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue(); + // emit the signal to call soundossgathersetting. + emit oss_sig(); +}; +void SoundSettings::soundalsagathersettings_1 (void) +{ + hostparm.ThisHostAudiotype = HostAudiotype->getValue(); +// hostparm.ThisHostsyncXine = HostsyncXine->getValue(); +// hostparm.ThisHostsyncMplayer = HostsyncMplayer->getValue(); +// hostparm.ThisHostsyncMythMusic = HostsyncMythMusic->getValue(); +// hostparm.ThisHostsyncMythFrontend = HostsyncMythFrontend->getValue(); + // emit the signal to call soundALSAgathersetting. + emit alsa_sig(); +}; + + +void SoundOSSsettings::soundossgathersettings(void) +{ + hostparm.ThisHostSoundTypeout = HostSoundTypeout->getValue() ; + hostparm.ThisHostSoundOSSAnalog = HostSoundOssAnalog->getValue(); + hostparm.ThisHostSoundOSSDigital = HostSoundOssDigital->getValue(); + QString tempdevice; + if ( hostparm.ThisHostSoundTypeout == "Analog" ) + { + tempdevice = hostparm.ThisHostSoundOSSAnalog ; + } + else + { + tempdevice = hostparm.ThisHostSoundOSSDigital ; + }; + tempdevice = tempdevice.section( "(", 1,1 ); + tempdevice = tempdevice.section( ")", 0,0 ); + hostparm.ThisHostSoundDevice = "/dev/"; + hostparm.ThisHostSoundDevice.append(tempdevice); + // Add info popup right here + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/soundconfig.sh -t test -i OSS -d " + hostparm.ThisHostSoundDevice + "&"); + system(cmdtxt); + int return_code = 0; + QString msgtext = "Playing sample audio" ; + + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + + int progressbar=1; + MythProgressDialog *popupProgress = NULL; + popupProgress = new MythProgressDialog(msgtext, 50); + if (popupProgress) + { + popupProgress->setProgress(progressbar); + } + + + + + + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + + + + while ( return_code == 0 ) + { + progressbar++; + popupProgress->setProgress(progressbar); + if (progressbar > 50 ) + progressbar = 10; + + return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + if (popupProgress) + { + popupProgress->Close(); + popupProgress->deleteLater(); + } + +}; + +void SoundALSAsettings::soundalsagathersettings(void) +{ + + hostparm.ThisHostSoundALSATypeout = HostSoundALSATypeout->getValue() ; + hostparm.ThisHostSoundALSAAnalog = HostSoundALSAAnalog->getValue(); + hostparm.ThisHostSoundALSADigital = HostSoundALSADigital->getValue(); + + QString tempdevice; + if ( hostparm.ThisHostSoundALSATypeout == "Analog" ) + { + tempdevice = hostparm.ThisHostSoundALSAAnalog ; + } + else + { + tempdevice = hostparm.ThisHostSoundALSADigital ; + }; + tempdevice = tempdevice.section( "(", 1,1 ); + tempdevice = tempdevice.section( ")", 0,0 ); + hostparm.ThisHostSoundDevice = tempdevice; + // Add info popup right here + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/soundconfig.sh -t test -i ALSA -d " + hostparm.ThisHostSoundDevice + "&"); + system(cmdtxt); + int return_code = 0; + QString msgtext = "Playing sample audio" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + int progressbar=1; + MythProgressDialog *popupProgress = NULL; + popupProgress = new MythProgressDialog(msgtext, 50); + if (popupProgress) + { + popupProgress->setProgress(progressbar); + } + + + + while ( return_code == 0 ) + { + progressbar++; + popupProgress->setProgress(progressbar); + if (progressbar > 50 ) + progressbar = 10; + + + return_code = myth_system("ps -ef|grep soundconfig.sh|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + if (popupProgress) + { + popupProgress->Close(); + popupProgress->deleteLater(); + } + + + + +}; + + +/* __________________________ END OF CLASSES_________________________*/ + +void pre_writesettings () +{ + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); + hostparm.ThisDBhost = gCoreContext->GetSetting("HostMysqlServer"); + hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname"); + + if ( hostparm.ThisSystemType == "Standalone" ) + { + hostparm.ThisDBhost = "localhost" ; + hostparm.ThisRunfrontend = "1" ; + gCoreContext->SaveSetting("HostRunFrontend", hostparm.ThisRunfrontend ); + // disable pkgmirror +// hostparm.ThisHostPKG_MIRROR = "0"; +// //gCoreContext->SaveSetting("GlobalPKG_MIRROR", hostparm.ThisHostPKG_MIRROR ); +// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("GlobalServiceHobbitserver"); +// if (hostparm.ThisHostServiceHobbit == "" ) +// { +// hostparm.ThisHostServiceHobbit = "1"; +// QString s = "GlobalServiceHobbitserver"; +// gCoreContext->SaveSettingOnHost(s, hostparm.ThisHostServiceHobbit ,NULL); +// } + } + else if (hostparm.ThisSystemType == "Master_backend" ) + { + if ( hostparm.ThisNFS =="" && gCoreContext->GetSetting("HostServiceNFS") == "" ) + { + hostparm.ThisNFS = "1"; + gCoreContext->SaveSetting("HostServiceNFS",hostparm.ThisNFS ); + } + hostparm.ThisDBhost = "127.0.0.1" ; + //GlobalPKG is only an option for MBE +// hostparm.ThisHostPKG_MIRROR = (gCoreContext->GetSetting("GlobalPKG_MIRROR")) ; +// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("GlobalServiceHobbitserver"); +// if (hostparm.ThisHostServiceHobbit == "" ) +// { +// hostparm.ThisHostServiceHobbit = "1"; +// QString s = "GlobalServiceHobbitserver"; +// gCoreContext->SaveSettingOnHost(s, hostparm.ThisHostServiceHobbit,NULL ); +// } + } + else if (hostparm.ThisSystemType == "Frontend_only" ) + { + hostparm.ThisRunfrontend = "1" ; + hostparm.ThisSamba = "0"; + hostparm.ThisNFS = "0"; + hostparm.ThisMythWEB = "0"; + gCoreContext->SaveSetting("HostRunFrontend", hostparm.ThisRunfrontend ); + gCoreContext->SaveSetting("HostServiceSamba", hostparm.ThisSamba ); + gCoreContext->SaveSetting("HostServiceNFS", hostparm.ThisNFS ); + gCoreContext->SaveSetting("HostServiceMythWEB",hostparm.ThisMythWEB ); + // if GBL is enabled, then check for host setting, else disable it +// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR") ) == "1" ) +// { +// hostparm.ThisHostPKG_MIRROR = gCoreContext->GetSetting("HostPKG_MIRROR"); +// } +// else +// { +// hostparm.ThisHostPKG_MIRROR = "0"; +// }; +// +// if ( ((gCoreContext->GetSetting("GlobalServiceHobbitserver") ) == "1") || install_hobbit ) +// { +// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient"); +// } +// else +// { +// hostparm.ThisHostServiceHobbit = "0"; +// } +// +// gCoreContext->SaveSetting("HostPKG_MIRROR", hostparm.ThisHostPKG_MIRROR ); +// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit); + + } + else if (hostparm.ThisSystemType == "Slave_backend" ) + { + hostparm.ThisSamba = "0"; + hostparm.ThisNFS = "0"; + hostparm.ThisMythWEB = "0"; + gCoreContext->SaveSetting("HostServiceSamba", hostparm.ThisSamba ); + gCoreContext->SaveSetting("HostServiceNFS", hostparm.ThisNFS ); + gCoreContext->SaveSetting("HostServiceMythWEB",hostparm.ThisMythWEB ); +// if ( (gCoreContext->GetSetting("GlobalPKG_MIRROR") ) == "1" ) +// { +// hostparm.ThisHostPKG_MIRROR = gCoreContext->GetSetting("HostPKG_MIRROR"); +// } +// else +// { +// hostparm.ThisHostPKG_MIRROR = "0"; +// } +// if ( ((gCoreContext->GetSetting("GlobalServiceHobbitserver") ) == "1") || install_hobbit ) +// { +// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient"); +// } +// else +// { +// +// hostparm.ThisHostServiceHobbit = "0"; +// } +// +// gCoreContext->SaveSetting("HostPKG_MIRROR", hostparm.ThisHostPKG_MIRROR ); +// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit); + + }; + +// if ( hostparm.ThisHostDefaultInterface == "" ) +// { +// if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" ) +// hostparm.ThisHostDefaultInterface = "eth0"; +// else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" ) +// hostparm.ThisHostDefaultInterface = "eth1"; +// else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" ) +// hostparm.ThisHostDefaultInterface = "wlan0"; +// else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" ) +// hostparm.ThisHostDefaultInterface = "wlan1"; +// else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" ) +// hostparm.ThisHostDefaultInterface = "eth0"; +// else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" ) +// hostparm.ThisHostDefaultInterface = "eth1"; +// else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" ) +// hostparm.ThisHostDefaultInterface = "wlan0"; +// else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" ) +// hostparm.ThisHostDefaultInterface = "wlan1"; +// else +// hostparm.ThisHostDefaultInterface = "ack"; +// } +// Even after all the above, it's still possible to set the Default interface to one that isn't active. + + hostparm.ThisDBhost = hostparm.ThisDBhost.section( "\t", 0, 0 ); + if ( hostparm.ThisHostName == "" || hostparm.ThisHostName == "type_hostname_here") + hostparm.ThisHostName = "diamonds"; + //remove spaces from hostname + QString s = hostparm.ThisHostName.replace ( QRegExp(" "),""); + hostparm.ThisHostName = s; + if ( hostparm.ThisHostName == "" ) + { + hostparm.ThisHostName=gCoreContext->GetHostName(); + } + + // piece togther the timezone + QString tz; + QString tregion; + QString tsubregion; +//----------------- +//I don't think this is needed anymore + tz=gCoreContext->GetSetting("HostTimeZone"); + if ( tz.isEmpty() || (tz == "Unknown")) + timezone_unknown = TRUE; +//----------- + + tregion=gCoreContext->GetSetting("HostTimeZoneRegion"); + tsubregion=gCoreContext->GetSetting("HostTimeZoneRegion_"+tregion); + if ( tsubregion.isEmpty() ) + hostparm.ThisTimeZone = tregion; + else + hostparm.ThisTimeZone = tregion + "/" + tsubregion; + + gCoreContext->SaveSetting("HostMyhostname" , hostparm.ThisHostName ); + gCoreContext->SaveSetting("HostMysqlserver", hostparm.ThisDBhost ); + gCoreContext->SaveSetting("HostTimeZone", hostparm.ThisTimeZone ); +} + +void run_systemconfig(QString modulelist, bool restart, QString dbcommand) +{ + QString cmdtxt; + cmdtxt="sudo "; + cmdtxt.append(MV_ROOT) ; + cmdtxt.append("bin/systemconfig.sh " + modulelist + " &"); + myth_system(cmdtxt); + int return_code = 0; + QString msgtext = "Please wait while " ; + msgtext.append(gCoreContext->GetSetting("HostMyhostname")); + msgtext.append(" is configured"); + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + while ( return_code == 0 ) + { + return_code = myth_system("ps -ef|grep systemconfig.sh|grep -v grep > /dev/null"); + qApp->processEvents (); + usleep(900); + } + + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + + + if (restart) + { + return_code = 1; + int loopnumber=0 ; + bool doloop = true; + + QString msgtext = "Transferring database settings" ; + MythScreenStack *popupStack = GetMythMainWindow()->GetStack("popup stack"); + MythUIBusyDialog *busyPopup = new MythUIBusyDialog(msgtext, popupStack,"installbusy"); + if (busyPopup->Create()) + { + popupStack->AddScreen(busyPopup, false); + } + else + { + delete busyPopup; + busyPopup = NULL; + } + + + + + while ( doloop ) + { + return_code = myth_system(dbcommand); + qApp->processEvents (); + usleep(100); + loopnumber++ ; + if ( return_code == 0 || loopnumber >= 20000000 ) + doloop=false; + } + if (busyPopup) + { + busyPopup->Close(); + busyPopup = NULL; + } + + }; + + + +} + + + +int runsettings (bool mysqlonly , bool shownetwork , bool showhostype, + bool showmisc , bool showshutdown, bool showadvanced, + bool showsound,bool showadvancedX, bool showaccesscontrol, + bool showplugins , bool showsoftware, bool showuser , + bool showwebuser , bool showddns , bool showinfrared , + bool showscreensaver , bool showsupplemental, + bool showremotesonly, bool showvnc, bool showfileshare) +{ + displaymysqlonly = false ; + displayshownetwork =false ; + displayshowhostype = false ; + displayshowmisc =false ; + displayshowshutdown =false ; + displayshowadvanced = false; + displayshowsound = false ; + displayshowadvancedX = false; + displayaccesscontrol= false; + displayplugins= false; + displaysoftware= false; + displayuser = false; + displaywebuser = false; + displayddns = false; + displayinfrared = false; + displayscreensaver = false; + displaysupplemental = false; + displayremotesonly = false; + displayvnc = false; + displayfileshare = false; + + //gCoreContext->ActivateSettingsCache(true); + //gCoreContext->ClearSettingsCache(); + bool runothers=false; + bool continuerun=true; + int retc = 0 ; + displaymysqlonly = mysqlonly; + + if (displaymysqlonly ) + { + MythInstallSettings mysqlsettings; + mysqlsettings.Load(); + mysqlsettings.Save(); + if ( mysqlsettings.exec() == QDialog::Accepted ) + { + retc = 1; + } + else + { + retc=2; + }; + }; + + if ( shownetwork ) + { + displayshownetwork = shownetwork; + MythInstallSettings settings; + settings.Load(); + settings.Save(); + if ( settings.exec() == QDialog::Accepted ) + { + retc = 1; + } + else + { + continuerun=false; + retc=2; + }; + displayshownetwork = false; + }; + + if ( showhostype && continuerun ) + { + displayshowhostype = showhostype; + system ("avahi-browse -l -r -t _mysql._tcp > /tmp/mysqllist"); + MythInstallSettings settings1; + settings1.Load(); + settings1.Save(); + if ( settings1.exec() == QDialog::Accepted ) + { + retc = 1; + } + else + { + continuerun=false; + retc=2; + }; + displayshowhostype=false; + } + + if ( showmisc || showshutdown || showsound || showadvancedX || showadvanced || showaccesscontrol || showplugins || showsoftware || showuser || showwebuser || showddns || showinfrared || showscreensaver || showsupplemental || showremotesonly || showvnc || showfileshare) + { + runothers=true; + displayshowmisc = showmisc; + displayshowshutdown = showshutdown; + displayshowadvanced = showadvanced; + displayshowsound = showsound; + displayshowadvancedX = showadvancedX; + hostparm.displayshowadvancedX=showadvancedX; + displayaccesscontrol = showaccesscontrol ; + displayplugins = showplugins; + displaysoftware = showsoftware; + displayuser = showuser; + displaywebuser = showwebuser; + displayddns = showddns ; + displayinfrared = showinfrared; + displayscreensaver = showscreensaver; + displaysupplemental = showsupplemental ; + displayremotesonly = showremotesonly ; + displayvnc = showvnc ; + displayfileshare = showfileshare; +// if (displayshowadvancedX) +// { +// ReadDDCvalues(); +// } + }; + + + if ( runothers && continuerun ) + { + //do I need this prewerite? + pre_writesettings(); + //FINDME + DatabaseParams params = gContext->GetDatabaseParams(); + QString cmdtxt=MV_ROOT ; + cmdtxt.append("bin/timezip.py -m "); + QString zipcommand=cmdtxt; + zipcommand.append(hostparm.ThisDBhost); + //FINDME + zipcommand.append(" -d " + params.dbHostName ); + //cout << zipcommand << endl; + myth_system(zipcommand); + //hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode"); + hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone"); +// hostparm.ThisHostServiceHobbit = gCoreContext->GetSetting("HostServiceHobbitclient"); +// if ( hostparm.ThisHostServiceHobbit == "1" ) +// install_hobbit = true; + + MythInstallSettings settings2; + settings2.Load(); + settings2.Save(); +// gCoreContext->SaveSetting("HostServiceHobbitclient", hostparm.ThisHostServiceHobbit ); + if ( settings2.exec() == QDialog::Accepted ) + { + retc = 1; + } + else + { + continuerun=false; + retc=2; + }; + }; + pre_writesettings(); + if ( mysqlonly ) + { + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/systemconfig.sh Mysql_only " + hostparm.ThisDBhost); + myth_system(cmdtxt); + } + else + { + if (retc == 1) + writesettings(); + } + return retc; +}; + + + +void writesettings () +{ + // ofstream myfile; + gCoreContext->ClearSettingsCache(); + //gCoreContext->ActivateSettingsCache(false); + hostparm.language = gCoreContext->GetSetting("language"); + hostparm.ThisHostName = gCoreContext->GetSetting("HostMyhostname").toLower(); + hostparm.ThisTimeZone = gCoreContext->GetSetting("HostTimeZone"); + + hostparm.ThisHostIPeth0 = gCoreContext->GetSetting("HostIPeth0"); + hostparm.ThisHostNETMASKeth0 = gCoreContext->GetSetting("HostNETMASKeth0"); + hostparm.ThisHostDNSeth0 = gCoreContext->GetSetting("HostDNSeth0"); + hostparm.ThisHostUSEDHCPeth0 = gCoreContext->GetSetting("HostUseDHCPeth0"); + hostparm.ThisHostGWeth0 = gCoreContext->GetSetting("HostGWeth0"); + hostparm.ThisHostActiveonbooteth0 = gCoreContext->GetSetting("HostActiveonbooteth0"); + hostparm.ThisHOSTESSIDeth0 = gCoreContext->GetSetting("HOSTESSIDeth0"); + hostparm.ThisHostUseEncryptioneth0 = gCoreContext->GetSetting("HostUseEncryptioneth0"); + hostparm.ThisHostkeyeth0 = gCoreContext->GetSetting("Hostkeyeth0"); + hostparm.ThisHostMTUeth0 = gCoreContext->GetSetting("HostMTUeth0"); + + hostparm.ThisHostIPeth1 = gCoreContext->GetSetting("HostIPeth1"); + hostparm.ThisHostNETMASKeth1 = gCoreContext->GetSetting("HostNETMASKeth1"); + hostparm.ThisHostDNSeth1 = gCoreContext->GetSetting("HostDNSeth1"); + hostparm.ThisHostUSEDHCPeth1 = gCoreContext->GetSetting("HostUseDHCPeth1"); + hostparm.ThisHostGWeth1 = gCoreContext->GetSetting("HostGWeth1"); + hostparm.ThisHostActiveonbooteth1 = gCoreContext->GetSetting("HostActiveonbooteth1"); + hostparm.ThisHOSTESSIDeth1 = gCoreContext->GetSetting("HOSTESSIDeth1"); + hostparm.ThisHostUseEncryptioneth1 = gCoreContext->GetSetting("HostUseEncryptioneth1"); + hostparm.ThisHostkeyeth1 = gCoreContext->GetSetting("Hostkeyeth1"); + hostparm.ThisHostMTUeth1 = gCoreContext->GetSetting("HostMTUeth1"); + + hostparm.ThisHostIPwlan0 = gCoreContext->GetSetting("HostIPwlan0"); + hostparm.ThisHostNETMASKwlan0 = gCoreContext->GetSetting("HostNETMASKwlan0"); + hostparm.ThisHostDNSwlan0 = gCoreContext->GetSetting("HostDNSwlan0"); + hostparm.ThisHostUSEDHCPwlan0 = gCoreContext->GetSetting("HostUseDHCPwlan0"); + hostparm.ThisHostGWwlan0 = gCoreContext->GetSetting("HostGWwlan0"); + hostparm.ThisHostActiveonbootwlan0 = gCoreContext->GetSetting("HostActiveonbootwlan0"); + hostparm.ThisHOSTESSIDwlan0 = gCoreContext->GetSetting("HOSTESSIDwlan0"); + hostparm.ThisHostUseEncryptionwlan0 = gCoreContext->GetSetting("HostUseEncryptionwlan0"); + hostparm.ThisHostkeywlan0 = gCoreContext->GetSetting("Hostkeywlan0"); + hostparm.ThisHostMTUwlan0 = gCoreContext->GetSetting("HostMTUwlan0"); + + hostparm.ThisHostIPwlan1 = gCoreContext->GetSetting("HostIPwlan1"); + hostparm.ThisHostNETMASKwlan1 = gCoreContext->GetSetting("HostNETMASKwlan1"); + hostparm.ThisHostDNSwlan1 = gCoreContext->GetSetting("HostDNSwlan1"); + hostparm.ThisHostUSEDHCPwlan1 = gCoreContext->GetSetting("HostUseDHCPwlan1"); + hostparm.ThisHostGWwlan1 = gCoreContext->GetSetting("HostGWwlan1"); + hostparm.ThisHostActiveonbootwlan1 = gCoreContext->GetSetting("HostActiveonbootwlan1"); + hostparm.ThisHOSTESSIDwlan1 = gCoreContext->GetSetting("HOSTESSIDwlan1"); + hostparm.ThisHostUseEncryptionwlan1 = gCoreContext->GetSetting("HostUseEncryptionwlan1"); + hostparm.ThisHostkeywlan1 = gCoreContext->GetSetting("Hostkeywlan1"); + hostparm.ThisHostMTUwlan1 = gCoreContext->GetSetting("HostMTUwlan1"); + + hostparm.ThisHostIPath0 = gCoreContext->GetSetting("HostIPath0"); + hostparm.ThisHostNETMASKath0 = gCoreContext->GetSetting("HostNETMASKath0"); + hostparm.ThisHostDNSath0 = gCoreContext->GetSetting("HostDNSath0"); + hostparm.ThisHostUSEDHCPath0 = gCoreContext->GetSetting("HostUseDHCPath0"); + hostparm.ThisHostGWath0 = gCoreContext->GetSetting("HostGWath0"); + hostparm.ThisHostActiveonbootath0 = gCoreContext->GetSetting("HostActiveonbootath0"); + hostparm.ThisHOSTESSIDath0 = gCoreContext->GetSetting("HOSTESSIDath0"); + hostparm.ThisHostUseEncryptionath0 = gCoreContext->GetSetting("HostUseEncryptionath0"); + hostparm.ThisHostkeyath0 = gCoreContext->GetSetting("Hostkeyath0"); + hostparm.ThisHostMTUath0 = gCoreContext->GetSetting("HostMTUath0"); + + + // hostparm.ThisHostServiceRRD = gCoreContext->GetSetting("HostServiceRRD"); + hostparm.ThisSamba = gCoreContext->GetSetting("HostServiceSamba"); + hostparm.ThisHostServiceSamba_media = gCoreContext->GetSetting("HostServiceSamba_media"); + hostparm.ThisHostServiceSamba_write = gCoreContext->GetSetting("HostServiceSamba_write"); + hostparm.ThisHostServiceSamba_home = gCoreContext->GetSetting("HostServiceSamba_home"); + hostparm.ThisHostServiceSamba_writehome = gCoreContext->GetSetting("HostServiceSamba_writehome"); + hostparm.ThisHostServiceSamba_domain = gCoreContext->GetSetting("HostServiceSamba_domain"); + hostparm.ThisNFS = gCoreContext->GetSetting("HostServiceNFS"); + hostparm.ThisHostCentralNFSallhosts = gCoreContext->GetSetting("HostCentralNFSallhosts"); + hostparm.ThisMythWEB = gCoreContext->GetSetting("HostServiceMythWEB"); + hostparm.ThisHostwebauth = gCoreContext->GetSetting("HOSTwebauth"); + + hostparm.ThisHostRunDHCP = gCoreContext->GetSetting("HostRunDHCP"); + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); + + // determine the remote based off the host bucket. + hostparm.ThisHostRemotebucket = gCoreContext->GetSetting("HostRemotebucket"); + if ( hostparm.ThisHostRemotebucket == "favorites" ) + hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_favorites"); + if ( hostparm.ThisHostRemotebucket == "user" ) + hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_user"); + if ( hostparm.ThisHostRemotebucket == "other" ) + hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_other"); + if ( hostparm.ThisHostRemotebucket == "hauppauge" ) + hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_hauppauge"); + if ( hostparm.ThisHostRemotebucket == "ATI" ) + hostparm.ThisRemote = gCoreContext->GetSetting("HostRemoteType_ATI"); + + hostparm.ThisHostBEWait = gCoreContext->GetSetting("HostBEWait"); + hostparm.ThisHostLircWait = gCoreContext->GetSetting("HostLircWait"); + + hostparm.ThisHDHRlirc_device = gCoreContext->GetSetting("HostHDHRlirc_device"); + hostparm.ThisReceiverType = gCoreContext->GetSetting("HostReceiverType"); + hostparm.ThisHostSerialPortlirc = gCoreContext->GetSetting("HostSerialPortlirc"); + // hostparm.ThisHostUseEvrouter = gCoreContext->GetSetting("HostRunEvrouter"); + // hostparm.ThisHostEvrouterConfig = gCoreContext->GetSetting("HostEvrouterConfig"); + hostparm.ThisXres = gCoreContext->GetSetting("HostXres"); + hostparm.ThisHostUseXLargeMouse = gCoreContext->GetSetting("HostUseXLargeMouse"); + hostparm.ThisAutodown = gCoreContext->GetSetting("HostAutodown"); + hostparm.ThisShutdowntime = gCoreContext->GetSetting("HostShutdownTime"); + hostparm.ThisShutdowntime2 = gCoreContext->GetSetting("HostShutdownTime2"); + hostparm.ThisWakeuptime = gCoreContext->GetSetting("HostWakeupTime"); + hostparm.ThisUseNVRAM = gCoreContext->GetSetting("HostUseNVRAM"); + hostparm.ThisUseWOL = gCoreContext->GetSetting("HostUseWOL"); + hostparm.ThisKeepPackage = gCoreContext->GetSetting("HostKeepPackages"); + hostparm.ThisMythWelcome = gCoreContext->GetSetting("HostUseMythWelcome"); + hostparm.ThisHaveNFS = gCoreContext->GetSetting("HostHaveCentralNFS"); + hostparm.ThisNFSserver = gCoreContext->GetSetting("HostCentralNFSIP"); + hostparm.ThisNFSmountpoint = gCoreContext->GetSetting("HostNFSmountpoint"); + hostparm.ThisHostupdateplan = gCoreContext->GetSetting("Hostupdateplan"); + hostparm.ThisShowToolTips = gCoreContext->GetSetting("HostShowToolTips"); + hostparm.ThisRunfrontend = gCoreContext->GetSetting("HostRunFrontend"); + //hostparm.ThisHostZipcode = gCoreContext->GetSetting("HostZipcode"); + hostparm.ThisHostncidClient = gCoreContext->GetSetting("HostncidClient"); + hostparm.ThisHostncidDaemon = gCoreContext->GetSetting("HostncidDaemon"); + hostparm.ThisHostSerialPortncid = gCoreContext->GetSetting("HostSerialPortncid"); + hostparm.ThisHostNcidDeviceNetCallerID = gCoreContext->GetSetting("HostNcidDeviceNetCallerID"); + hostparm.ThisHostbootsplash = gCoreContext->GetSetting("Hostbootsplash"); + + hostparm.ThisXIgnoreConfig =gCoreContext->GetSetting("HostXIgnoreConfig"); + hostparm.ThisXcardtype =gCoreContext->GetSetting("HostXcardtype"); + hostparm.ThisXUseAdvanced =gCoreContext->GetSetting("HostXUseAdvanced"); + hostparm.ThisXIgnoreEDID =gCoreContext->GetSetting("HostXIgnoreEDID"); + hostparm.ThisXconnection =gCoreContext->GetSetting("HostXconnection"); + hostparm.ThisXDisplaysize =gCoreContext->GetSetting("HostXDisplaysize"); + hostparm.ThisHostXNvidia1080p =gCoreContext->GetSetting("HostXNvidia1080p"); + hostparm.ThisHostXNvidia1080i =gCoreContext->GetSetting("HostXNvidia1080i"); + hostparm.ThisHostXNvidia720p =gCoreContext->GetSetting("HostXNvidia720p"); + hostparm.ThisHostXNvidia480p =gCoreContext->GetSetting("HostXNvidia480p"); +// EDID settings + QString tempstring; + tempstring = gCoreContext->GetSetting("HostXHsyncLow"); + tempstring.append(" - "); + tempstring.append(gCoreContext->GetSetting("HostXHsyncHigh") ); + hostparm.ThisXHsync=tempstring; + tempstring =""; + tempstring=gCoreContext->GetSetting("HostXVrefreshLow"); + tempstring.append(" - "); + tempstring.append(gCoreContext->GetSetting("HostXVrefreshHigh")); + hostparm.ThisXVrefresh=tempstring; + +// Assemble the advanced modeline string + QString modelinetype = gCoreContext->GetSetting("HostXModelineCatagory");; + QString tempmodeline = "HostXadvancedres" + modelinetype ; + QString modeline = gCoreContext->GetSetting(tempmodeline); + hostparm.ThisXresadvanced = modelinetype +"_"+modeline; + +// Gather settings based on card type + if ( hostparm.ThisXcardtype == "nVidia" ) + { + hostparm.ThisXTVstandard = gCoreContext->GetSetting("HostXnVidiaTVstandard"); + hostparm.ThisXTVconnection= gCoreContext->GetSetting("HostXnVidiaTVformat"); + modelinetype = gCoreContext->GetSetting("HostXNvidiaModelineCatagory");; + tempmodeline = "HostXNvidiaadvancedres" + modelinetype ; + modeline = gCoreContext->GetSetting(tempmodeline); + hostparm.ThisXresadvanced = modelinetype +"_"+modeline; + } + else if ( hostparm.ThisXcardtype == "ATI" ) + { + hostparm.ThisXTVstandard = gCoreContext->GetSetting("HostXATITVstandard"); + hostparm.ThisXTVconnection= gCoreContext->GetSetting("HostXati-tvformat"); + } + + +//********************************************************************************************* +// AUDIO SETTINGS +//****************************************************************************************** + hostparm.ThisHostAudiotype = gCoreContext->GetSetting("HostAudiotype"); +// hostparm.ThisHostsyncXine = gCoreContext->GetSetting("HostsyncXine"); +// hostparm.ThisHostsyncMplayer = gCoreContext->GetSetting("HostsyncMplayer"); +// hostparm.ThisHostsyncMythMusic = gCoreContext->GetSetting("HostsyncMythMusic"); +// hostparm.ThisHostsyncMythFrontend = gCoreContext->GetSetting("HostsyncMythFrontend"); + hostparm.ThisHostSoundTypeout = gCoreContext->GetSetting("HostSoundTypeout") ; + hostparm.ThisHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog"); + hostparm.ThisHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital"); + hostparm.ThisHostSoundALSATypeout = gCoreContext->GetSetting("HostSoundALSATypeout") ; + hostparm.ThisHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog"); + hostparm.ThisHostSoundALSADigital = gCoreContext->GetSetting("HostSoundALSADigital"); + + if ( hostparm.ThisHostAudiotype == "OSS" ) + { + QString tempdevice; + QChar tempchar ; + hostparm.ThisHostSoundDevice = "/dev/dsp"; + if ( hostparm.ThisHostSoundTypeout == "Analog" ) + tempdevice = hostparm.ThisHostSoundOSSAnalog ; + + if ( hostparm.ThisHostSoundTypeout == "Digital" ) + tempdevice = hostparm.ThisHostSoundOSSDigital ; + + int tlength=(tempdevice.length() -2 ); + if ( tlength > 0 ) + { + tempchar = tempdevice.at( tlength); + hostparm.ThisHostSoundDevice.append(tempchar); + }; + } + + + if ( hostparm.ThisHostAudiotype == "ALSA" ) + { + QString tempdevice; + hostparm.ThisHostSoundTypeout = hostparm.ThisHostSoundALSATypeout; + if ( hostparm.ThisHostSoundTypeout == "Digital" ) + tempdevice=hostparm.ThisHostSoundALSADigital; + if ( hostparm.ThisHostSoundTypeout == "Analog" ) + tempdevice=hostparm.ThisHostSoundALSAAnalog; + + tempdevice = tempdevice.section( "(", 1,1 ); + tempdevice = tempdevice.section( ")", 0,0 ); + hostparm.ThisHostSoundDevice = tempdevice; + } +// Turn off internal audio controls is digital audio is seleced + if ( hostparm.ThisHostSoundTypeout == "Digital" ) + gCoreContext->SaveSetting("MythControlsVolume","0"); + +// LCD TYPE + hostparm.ThisHostLCDType = gCoreContext->GetSetting("HostLCDType"); + if ( hostparm.ThisHostLCDType != "no_lcd" && hostparm.ThisHostLCDType != "tinker" && hostparm.ThisHostLCDType != "" ) + { + // enable mythtv lcddevice + gCoreContext->SaveSetting("LCDEnable","1"); + }; +// Backupsettings + hostparm.ThisHostRemoteBackup = gCoreContext->GetSetting("HostRemoteBackup"); + hostparm.ThisHostRemoteBackupDir = gCoreContext->GetSetting("HostRemoteBackupDir"); +//plugins + hostparm.ThisHostpluginmytharchive = gCoreContext->GetSetting("Hostpluginmytharchive"); + hostparm.ThisHostpluginmythbrowser = gCoreContext->GetSetting("Hostpluginmythbrowser"); + //hostparm.ThisHostpluginmythcontrols = gCoreContext->GetSetting("Hostpluginmythcontrols"); + hostparm.ThisHostpluginmythnetvision = gCoreContext->GetSetting("Hostpluginmythnetvision"); + hostparm.ThisHostpluginmythgallery = gCoreContext->GetSetting("Hostpluginmythgallery"); + hostparm.ThisHostpluginmythgame = gCoreContext->GetSetting("Hostpluginmythgame"); + // hostparm.ThisHostpluginmythmovietime = gCoreContext->GetSetting("Hostpluginmythmovietime"); + hostparm.ThisHostpluginmythmusic = gCoreContext->GetSetting("Hostpluginmythmusic"); + hostparm.ThisHostpluginmythnews = gCoreContext->GetSetting("Hostpluginmythnews"); +// hostparm.ThisHostpluginmythphone = gCoreContext->GetSetting("Hostpluginmythphone"); +// hostparm.ThisHostpluginmythsmolt = gCoreContext->GetSetting("Hostpluginmythsmolt"); +// hostparm.ThisHostpluginmythvideo = gCoreContext->GetSetting("Hostpluginmythvideo"); + hostparm.ThisHostpluginmythweather = gCoreContext->GetSetting("Hostpluginmythweather"); + hostparm.ThisHostpluginmythzoneminder = gCoreContext->GetSetting("Hostpluginmythzoneminder"); + hostparm.ThisHostpluginmythgamefceux = gCoreContext->GetSetting("Hostpluginmythgamefceux"); + hostparm.ThisHostpluginmythgamesnes9x = gCoreContext->GetSetting("Hostpluginmythgamesnes9x"); + hostparm.ThisHostpluginmythgameMame = gCoreContext->GetSetting("HostpluginmythgameMame"); + hostparm.ThisHostpluginmythgameDolphin = gCoreContext->GetSetting("HostpluginmythgameDolphin"); + hostparm.ThisHostpluginmythgameXe = gCoreContext->GetSetting("HostpluginmythgameXe"); + + hostparm.ThisHostpluginmythvideo_dvdcss = gCoreContext->GetSetting("Hostpluginmythvideo_dvdcss"); + hostparm.ThisHostpluginmythappletrailers= gCoreContext->GetSetting("Hostpluginmythappletrailers"); +// hostparm.ThisHostpluginmythstream= gCoreContext->GetSetting("Hostpluginmythstream"); +// hostparm.ThisHostpluginmythvodka= gCoreContext->GetSetting("Hostpluginmythvodka"); + hostparm.ThisHostMiro= gCoreContext->GetSetting("HostMiro"); + hostparm.ThisHostpluginmythgameMednafen= gCoreContext->GetSetting("HostpluginmythgameMednafen"); + hostparm.ThisHostpluginmythgameROMDB= gCoreContext->GetSetting("HostpluginmythgameROMDB"); + hostparm.ThisHostpluginmythgameMupen64= gCoreContext->GetSetting("HostpluginmythgameMupen64"); +// hostparm.ThisHostXine = gCoreContext->GetSetting("HostXine"); +// hostparm.ThisHostwebmin = gCoreContext->GetSetting("Hostwebmin"); +// hostparm.ThisHostfuppes = gCoreContext->GetSetting("Hostfuppes"); + hostparm.ThisHostHuluDesktop = gCoreContext->GetSetting("HostHuluDesktop"); + hostparm.ThisHostwebonlinhes = gCoreContext->GetSetting("HostWebonlinhes"); + +// hostparm.ThisHostfuppes = gCoreContext->GetSetting("Hostfuppes"); + + + + + hostparm.ThisHostfoldingathome = gCoreContext->GetSetting("Hostfoldingathome"); + hostparm.ThisHostfoldingusername = gCoreContext->GetSetting("Hostfoldingusername"); + hostparm.ThisHostfoldingworksize = gCoreContext->GetSetting("Hostfoldingworksize"); + hostparm.ThisHostDDnslogin = gCoreContext->GetSetting("HostDDnslogin"); + hostparm.ThisHostDDnspassword = gCoreContext->GetSetting("HostDDnspassword"); + hostparm.ThisHostDDnshostname = gCoreContext->GetSetting("HostDDnshostname"); + hostparm.ThisHostDDnsEnable = gCoreContext->GetSetting("HostDDnsEnable"); + hostparm.ThisHostscreensavertype = gCoreContext->GetSetting("Hostscreensavertype"); + hostparm.ThisHostscreensaveridle = gCoreContext->GetSetting("Hostscreensaveridle"); + if (gCoreContext->GetSetting("HostScreensaverBlank") == "1" ) + hostparm.ThisHostscreensavertheme="Blank"; + else if (gCoreContext->GetSetting("HostScreensaverRandom") == "1" ) + hostparm.ThisHostscreensavertheme="Random"; + else + { + if ( hostparm.ThisHostscreensavertype == "gscreensaver" ) + hostparm.ThisHostscreensavertheme = gCoreContext->GetSetting("HostGScreensavertheme"); + if ( hostparm.ThisHostscreensavertype == "xscreensaver" ) + hostparm.ThisHostscreensavertheme = gCoreContext->GetSetting("HostXScreensavertheme"); + } + + hostparm.ThisHostTransmitproto_1 = + gCoreContext->GetSetting("HostTransmitproto_1"); + hostparm.ThisHostTransmitproto_2 = + gCoreContext->GetSetting("HostTransmitproto_2"); + hostparm.ThisHostTransmitproto_3 = + gCoreContext->GetSetting("HostTransmitproto_3"); + hostparm.ThisHostTransmitproto_4 = + gCoreContext->GetSetting("HostTransmitproto_4"); + hostparm.ThisHostBlasterType = + gCoreContext->GetSetting("HostBlasterType"); + hostparm.ThisHostSerialPort_blasterlirc = + gCoreContext->GetSetting("HostSerialPort_blasterlirc"); + hostparm.ThisHostnumblaster = "1"; + if ( hostparm.ThisHostBlasterType == "CommandIR" ) + hostparm.ThisHostnumblaster = "4" ; + if ( hostparm.ThisHostBlasterType == "MCE" ) + hostparm.ThisHostnumblaster = "2" ; + + hostparm.ThisHostTransmitDelay_1 = + gCoreContext->GetSetting("HostTransmitDelay_1"); + hostparm.ThisHostTransmitSend_after_1 = + gCoreContext->GetSetting("HostTransmitSend_after_1"); + + hostparm.ThisHostTransmitDelay_2 = + gCoreContext->GetSetting("HostTransmitDelay_2"); + hostparm.ThisHostTransmitSend_after_2 = + gCoreContext->GetSetting("HostTransmitSend_after_2"); + + hostparm.ThisHostTransmitDelay_3 = + gCoreContext->GetSetting("HostTransmitDelay_3"); + hostparm.ThisHostTransmitSend_after_3 = + gCoreContext->GetSetting("HostTransmitSend_after_3"); + + + hostparm.ThisHostTransmitDelay_4 = + gCoreContext->GetSetting("HostTransmitDelay_4"); + hostparm.ThisHostTransmitSend_after_4 = + gCoreContext->GetSetting("HostTransmitSend_after_4"); + + + hostparm.ThisHOSTrootSSH = gCoreContext->GetSetting("HOSTrootSSH"); + + + + hostparm.ThisHostSupplemental = gCoreContext->GetSetting("HostSupplemental"); + hostparm.ThisHostWindowManager = gCoreContext->GetSetting("HostWindowManager"); + hostparm.ThisHostEnhancedWMStyle = gCoreContext->GetSetting("HostEnhancedWMStyle"); + + hostparm.ThisHostVNCEnable = gCoreContext->GetSetting("HostVNCEnable"); + hostparm.ThisHostVNCpassword = gCoreContext->GetSetting("HostVNCpassword"); + hostparm.ThisHostXVNCEnable = gCoreContext->GetSetting("HostXVNCEnable"); + hostparm.ThisHostXVNCpassword = gCoreContext->GetSetting("HostXVNCpassword"); + + + + + +//______________________WRITE OUT THE FILE__________________________ + QString systemheader; + QString divider; + + QFile f( "/etc/systemconfig" ); + if( !f.open( IO_WriteOnly ) ) + std::cout << "Failed to open file /etc/systemconfig." << std::endl; + QTextStream myfile( &f ); + + divider = "#-----------------------------\n"; + systemheader= "\n# Language \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "language=\"" + hostparm.language + "\"\n"; + + divider = "#-----------------------------\n"; + systemheader= "\n# Hostype \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "SystemType=\"" + hostparm.ThisSystemType + "\"\n"; + myfile << "dbhost=\"" + hostparm.ThisDBhost + "\"\n"; + myfile << "RunFrontend=\"" + hostparm.ThisRunfrontend + "\"\n"; + myfile << "UseMythWelcome=\"" + hostparm.ThisMythWelcome + "\"\n"; + + systemheader= "\n# Network config\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "hostname=\"" + hostparm.ThisHostName + "\"\n"; + myfile << "default_interface=\"" + hostparm.ThisHostDefaultInterface + "\"\n"; + + + + if ( hostparm.ThisHostActiveonbooteth0 == "1" ) + { + systemheader= "\n# Network config for eth0 \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Hostipeth0=\"" + hostparm.ThisHostIPeth0 + "\"\n"; + myfile << "Hostnetmasketh0=\"" +hostparm.ThisHostNETMASKeth0 + "\"\n"; + myfile << "HostDNSeth0=\"" +hostparm.ThisHostDNSeth0 + "\"\n"; + myfile << "HostUSEDHCPeth0=\"" +hostparm.ThisHostUSEDHCPeth0 + "\"\n"; + myfile << "HostGWeth0=\"" +hostparm.ThisHostGWeth0 + "\"\n"; + myfile << "HostActiveeth0=\"" +hostparm.ThisHostActiveonbooteth0 + "\"\n"; + myfile << "HostESSIDeth0=\"" + hostparm.ThisHOSTESSIDeth0 + "\"\n"; + myfile << "HostUseEncryptioneth0=\"" + hostparm.ThisHostUseEncryptioneth0 + "\"\n"; + myfile << "HostKeyeth0=\"" + hostparm.ThisHostkeyeth0 + "\"\n"; + myfile << "HOST_iswirelesseth0=\"" + hostparm.ThisHOST_iswirelesseth0 + "\"\n"; + myfile << "HostMTUeth0=\"" + hostparm.ThisHostMTUeth0 + "\"\n"; + } + + if ( hostparm.ThisHostActiveonbooteth1 == "1" ) + { + systemheader= "\n# Network config for eth1 \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Hostipeth1=\"" + hostparm.ThisHostIPeth1 + "\"\n"; + myfile << "Hostnetmasketh1=\"" +hostparm.ThisHostNETMASKeth1 + "\"\n"; + myfile << "HostDNSeth1=\"" +hostparm.ThisHostDNSeth1 + "\"\n"; + myfile << "HostUSEDHCPeth1=\"" +hostparm.ThisHostUSEDHCPeth1 + "\"\n"; + myfile << "HostGWeth1=\"" +hostparm.ThisHostGWeth1 + "\"\n"; + myfile << "HostActiveeth1=\"" +hostparm.ThisHostActiveonbooteth1 + "\"\n"; + myfile << "HostESSIDeth1=\"" + hostparm.ThisHOSTESSIDeth1 + "\"\n"; + myfile << "HostUseEncryptioneth1=\"" + hostparm.ThisHostUseEncryptioneth1 + "\"\n"; + myfile << "HostKeyeth1=\"" + hostparm.ThisHostkeyeth1 + "\"\n"; + myfile << "HOST_iswirelesseth1=\"" + hostparm.ThisHOST_iswirelesseth1 + "\"\n"; + myfile << "HostMTUeth1=\"" + hostparm.ThisHostMTUeth1 + "\"\n"; + } + if ( hostparm.ThisHostActiveonbootwlan0 == "1" ) + { + systemheader= "\n# Network config for wlan0 \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Hostipwlan0=\"" + hostparm.ThisHostIPwlan0 + "\"\n"; + myfile << "Hostnetmaskwlan0=\"" +hostparm.ThisHostNETMASKwlan0 + "\"\n"; + myfile << "HostDNSwlan0=\"" +hostparm.ThisHostDNSwlan0 + "\"\n"; + myfile << "HostUSEDHCPwlan0=\"" +hostparm.ThisHostUSEDHCPwlan0 + "\"\n"; + myfile << "HostGWwlan0=\"" +hostparm.ThisHostGWwlan0 + "\"\n"; + myfile << "HostActivewlan0=\"" +hostparm.ThisHostActiveonbootwlan0 + "\"\n"; + myfile << "HostESSIDwlan0=\"" + hostparm.ThisHOSTESSIDwlan0 + "\"\n"; + myfile << "HostUseEncryptionwlan0=\"" + hostparm.ThisHostUseEncryptionwlan0 + "\"\n"; + myfile << "HostKeywlan0=\"" + hostparm.ThisHostkeywlan0 + "\"\n"; + myfile << "HOST_iswirelesswlan0=\"" + hostparm.ThisHOST_iswirelesswlan0 + "\"\n"; + myfile << "HostMTUwlan0=\"" + hostparm.ThisHostMTUwlan0 + "\"\n"; + } + if ( hostparm.ThisHostActiveonbootwlan1 == "1" ) + { + systemheader= "\n# Network config for wlan1 \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Hostipwlan1=\"" + hostparm.ThisHostIPwlan1 + "\"\n"; + myfile << "Hostnetmaskwlan1=\"" +hostparm.ThisHostNETMASKwlan1 + "\"\n"; + myfile << "HostDNSwlan1=\"" +hostparm.ThisHostDNSwlan1 + "\"\n"; + myfile << "HostUSEDHCPwlan1=\"" +hostparm.ThisHostUSEDHCPwlan1 + "\"\n"; + myfile << "HostGWwlan1=\"" +hostparm.ThisHostGWwlan1 + "\"\n"; + myfile << "HostActivewlan1=\"" +hostparm.ThisHostActiveonbootwlan1 + "\"\n"; + myfile << "HostESSIDwlan1=\"" + hostparm.ThisHOSTESSIDwlan1 + "\"\n"; + myfile << "HostUseEncryptionwlan1=\"" + hostparm.ThisHostUseEncryptionwlan1 + "\"\n"; + myfile << "HostKeywlan1=\"" + hostparm.ThisHostkeywlan1 + "\"\n"; + myfile << "HOST_iswirelesswlan1=\"" + hostparm.ThisHOST_iswirelesswlan1 + "\"\n"; + myfile << "HostMTUwlan1=\"" + hostparm.ThisHostMTUwlan1 + "\"\n"; + } + + if ( hostparm.ThisHostActiveonbootath0 == "1" ) + { + systemheader= "\n# Network config for ath0 \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Hostipath0=\"" + hostparm.ThisHostIPath0 + "\"\n"; + myfile << "Hostnetmaskath0=\"" +hostparm.ThisHostNETMASKath0 + "\"\n"; + myfile << "HostDNSath0=\"" +hostparm.ThisHostDNSath0 + "\"\n"; + myfile << "HostUSEDHCPath0=\"" +hostparm.ThisHostUSEDHCPath0 + "\"\n"; + myfile << "HostGWath0=\"" +hostparm.ThisHostGWath0 + "\"\n"; + myfile << "HostActiveath0=\"" +hostparm.ThisHostActiveonbootath0 + "\"\n"; + myfile << "HostESSIDath0=\"" + hostparm.ThisHOSTESSIDath0 + "\"\n"; + myfile << "HostUseEncryptionath0=\"" + hostparm.ThisHostUseEncryptionath0 + "\"\n"; + myfile << "HostKeyath0=\"" + hostparm.ThisHostkeyath0 + "\"\n"; + myfile << "HOST_iswirelessath0=\"" + hostparm.ThisHOST_iswirelessath0 + "\"\n"; + myfile << "HostMTUath0=\"" + hostparm.ThisHostMTUath0 + "\"\n"; + } + + + systemheader= "\n# Misc \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "timezone=\"" + hostparm.ThisTimeZone + "\"\n"; + myfile << "Hostupdateplan=\"" + hostparm.ThisHostupdateplan + "\"\n"; + myfile << "ShowTips=\"" + hostparm.ThisShowToolTips + "\"\n"; + + + systemheader= "\n# Advanced \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "bewait=\"" + hostparm.ThisHostBEWait + "\"\n"; + myfile << "ncidclient=\"" + hostparm.ThisHostncidClient + "\"\n"; + myfile << "Runncidd=\"" + hostparm.ThisHostncidDaemon + "\"\n"; + myfile << "nciddSerialPort=\"" + hostparm.ThisHostSerialPortncid + "\"\n"; + myfile << "nciddDeviceNetCallerID=\"" + hostparm.ThisHostNcidDeviceNetCallerID + "\"\n"; + myfile << "Usebootsplash=\"" + hostparm.ThisHostbootsplash + "\"\n"; + myfile << "RemoteBackup=\"" + hostparm.ThisHostRemoteBackup + "\"\n"; + myfile << "RemoteBackupDir=\"" + hostparm.ThisHostRemoteBackupDir + "\"\n"; + // special keys + // myfile << "UseEvrouter=\"" + hostparm.ThisHostUseEvrouter + "\"\n"; + // myfile << "EvrouterConfig=\"" + hostparm.ThisHostEvrouterConfig + "\"\n"; + //run dhcp server + myfile << "RunDHCP=\"" + hostparm.ThisHostRunDHCP + "\"\n"; + myfile << "UseMythWEB=\"" + hostparm.ThisMythWEB + "\"\n"; + + systemheader= "\n# fileshare \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "UseSamba=\"" + hostparm.ThisSamba + "\"\n"; + myfile << "Samba_media=\"" + hostparm.ThisHostServiceSamba_media + "\"\n"; + myfile << "Samba_mediareadonly=\"" + hostparm.ThisHostServiceSamba_write + "\"\n"; + myfile << "Samba_home=\"" + hostparm.ThisHostServiceSamba_home + "\"\n"; + myfile << "Samba_homereadonly=\"" + hostparm.ThisHostServiceSamba_writehome + "\"\n"; + myfile << "Samba_domain=\"" + hostparm.ThisHostServiceSamba_domain + "\"\n"; + myfile << "UseNFS=\"" + hostparm.ThisNFS + "\"\n"; + myfile << "HaveCentralNFS=\"" + hostparm.ThisHaveNFS + "\"\n"; + myfile << "NFSserver=\"" + hostparm.ThisNFSserver + "\"\n"; + myfile << "NFSmount=\"" + hostparm.ThisNFSmountpoint + "\"\n"; + myfile << "CentralNFSallhosts=\"" + hostparm.ThisHostCentralNFSallhosts + "\"\n"; + + + + + + //not used anymore + // myfile << "UseDHCP=\"" + hostparm.ThisDHCP + "\"\n"; + + + systemheader= "\n# sleep \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "AutoShutdown=\"" + hostparm.ThisAutodown + "\"\n"; + myfile << "Shutdowntime=\"" + hostparm.ThisShutdowntime + "\"\n"; + myfile << "Shutdowntime2=\"" + hostparm.ThisShutdowntime2 + "\"\n"; + + //myfile << "Wakeuptime=\"" + hostparm.ThisWakeuptime + "\"\n"; + //myfile << "UseNVRAM=\"" + hostparm.ThisUseNVRAM + "\"\n"; + //myfile << "UseWOL=\"" + hostparm.ThisUseWOL + "\"\n"; + //not used + //myfile << "KeepPackages=\"" + hostparm.ThisKeepPackage + "\"\n"; + // myfile << "PKG_MIRROR=\"" + hostparm.ThisHostPKG_MIRROR + "\"\n"; + //myfile << "zipcode=\"" + hostparm.ThisHostZipcode + "\"\n"; + + + + + + + systemheader= "\n# X display settings \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "XIgnoreConfig=\"" + hostparm.ThisXIgnoreConfig + "\"\n"; + myfile << "Xcardtype=\"" + hostparm.ThisXcardtype + "\"\n"; + myfile << "XUseAdvanced=\"" + hostparm.ThisXUseAdvanced + "\"\n"; + myfile << "Xres=\"" + hostparm.ThisXres + "\"\n"; + myfile << "UseXLargeMouse=\"" + hostparm.ThisHostUseXLargeMouse + "\"\n"; +// myfile << "XIgnoreEDID=\"" + hostparm.ThisXIgnoreEDID + "\"\n"; +// myfile << "Xconnection=\"" + hostparm.ThisXconnection + "\"\n"; +// myfile << "XHsync=\"" + hostparm.ThisXHsync + "\"\n"; +// myfile << "XVrefresh=\"" + hostparm.ThisXVrefresh+ "\"\n"; +// myfile << "Xresadvanced=\"" + hostparm.ThisXresadvanced + "\"\n"; +// myfile << "XTVstandard=\"" + hostparm.ThisXTVstandard + "\"\n"; +// myfile << "XTVconnection=\"" + hostparm.ThisXTVconnection + "\"\n"; +// myfile << "XDisplaysize=\"" + hostparm.ThisXDisplaysize + "\"\n"; +// myfile << "XnVidia1080p=\"" + hostparm.ThisHostXNvidia1080p+ "\"\n"; +// myfile << "XnVidia1080i=\"" + hostparm.ThisHostXNvidia1080i+ "\"\n"; +// myfile << "XnVidia720p=\"" + hostparm.ThisHostXNvidia720p+ "\"\n"; +// myfile << "XnVidia480p=\"" + hostparm.ThisHostXNvidia480p+ "\"\n"; + + systemheader= "\n# Audio settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Audiotype=\"" + hostparm.ThisHostAudiotype + "\"\n"; + myfile << "Audiotypeout=\"" + hostparm.ThisHostSoundTypeout + "\"\n"; + myfile << "SoundDevice=\"" + hostparm.ThisHostSoundDevice+ "\"\n"; +// myfile << "syncXine=\"" + hostparm.ThisHostsyncXine + "\"\n"; +// myfile << "syncMplayer=\"" + hostparm.ThisHostsyncMplayer + "\"\n"; +// myfile << "syncMythMusic=\"" + hostparm.ThisHostsyncMythMusic + "\"\n"; +// myfile << "syncMythFrontend=\"" + hostparm.ThisHostsyncMythFrontend + "\"\n"; + + + systemheader= "\n# Software settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "mytharchive=\"" + hostparm.ThisHostpluginmytharchive + "\"\n"; + myfile << "mythbrowser=\"" + hostparm.ThisHostpluginmythbrowser + "\"\n"; + myfile << "mythnetvision=\"" + hostparm.ThisHostpluginmythnetvision + "\"\n"; + myfile << "mythgallery=\"" + hostparm.ThisHostpluginmythgallery + "\"\n"; + myfile << "mythgame=\"" + hostparm.ThisHostpluginmythgame + "\"\n"; + myfile << "mythmusic=\"" + hostparm.ThisHostpluginmythmusic + "\"\n"; + myfile << "mythnews=\"" + hostparm.ThisHostpluginmythnews + "\"\n"; + myfile << "mythzoneminder=\"" + hostparm.ThisHostpluginmythzoneminder + "\"\n"; + myfile << "mythweather=\"" + hostparm.ThisHostpluginmythweather + "\"\n"; + myfile << divider ; + //game emulator + myfile << "romdb=\"" + hostparm.ThisHostpluginmythgameROMDB + "\"\n"; + myfile << "snes9x=\"" + hostparm.ThisHostpluginmythgamesnes9x + "\"\n"; + myfile << "fceux=\"" + hostparm.ThisHostpluginmythgamefceux + "\"\n"; + myfile << "mame=\"" + hostparm.ThisHostpluginmythgameMame + "\"\n"; + myfile << "mednafen=\"" + hostparm.ThisHostpluginmythgameMednafen + "\"\n"; + myfile << "mupen64=\"" + hostparm.ThisHostpluginmythgameMupen64 + "\"\n"; + myfile << "dolphinemu=\"" + hostparm.ThisHostpluginmythgameDolphin + "\"\n"; + myfile << "xe=\"" + hostparm.ThisHostpluginmythgameXe + "\"\n"; + myfile << divider ; + //other + myfile << "dvdcss=\"" + hostparm.ThisHostpluginmythvideo_dvdcss + "\"\n"; + myfile << "mythappletrailers=\"" + hostparm.ThisHostpluginmythappletrailers + "\"\n"; + + myfile << "miro=\"" + hostparm.ThisHostMiro + "\"\n"; + myfile << "webonlinhes=\"" + hostparm.ThisHostwebonlinhes + "\"\n"; + myfile << "huludesktop=\"" + hostparm.ThisHostHuluDesktop + "\"\n"; + //myfile << "fuppes=\"" + hostparm.ThisHostfuppes + "\"\n"; + myfile << "foldingathome=\"" + hostparm.ThisHostfoldingathome + "\"\n"; + myfile << "foldingusername=\"" + hostparm.ThisHostfoldingusername + "\"\n"; + myfile << "foldingworksize=\"" + hostparm.ThisHostfoldingworksize + "\"\n"; + //myfile << "mythstream=\"" + hostparm.ThisHostpluginmythstream + "\"\n"; + // myfile << "mythphone=\"" + hostparm.ThisHostpluginmythphone + "\"\n"; + // myfile << "mythsmolt=\"" + hostparm.ThisHostpluginmythsmolt + "\"\n"; + // myfile << "mythvideo=\"" + hostparm.ThisHostpluginmythvideo + "\"\n"; + // myfile << "mythcontrols=\"" + hostparm.ThisHostpluginmythcontrols + "\"\n"; + // myfile << "mythmovietime=\"" + hostparm.ThisHostpluginmythmovietime + "\"\n"; + // myfile << "mythvodka=\"" +hostparm.ThisHostpluginmythvodka + "\"\n"; + // myfile << "xine=\"" + hostparm.ThisHostXine + "\"\n"; + // myfile << "webmin=\"" + hostparm.ThisHostwebmin + "\"\n";er + "\"\n"; + + + systemheader="\n# ddns settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "DDnslogin=\"" + hostparm.ThisHostDDnslogin + "\"\n"; + myfile << "DDnspassword=\"" + hostparm.ThisHostDDnspassword + "\"\n"; + myfile << "DDnshostname=\"" + hostparm.ThisHostDDnshostname + "\"\n"; + myfile << "DDnsEnable=\"" + hostparm.ThisHostDDnsEnable + "\"\n"; + + systemheader="\n# screensaver settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Screensavertype=\"" + hostparm.ThisHostscreensavertype + "\"\n"; + myfile << "Screensaveridle=\"" + hostparm.ThisHostscreensaveridle + "\"\n"; + myfile << "Screensavertheme=\"" + hostparm.ThisHostscreensavertheme + "\"\n"; + + systemheader="\n# IR settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "Remotetype=\"" + hostparm.ThisRemote + "\"\n"; + myfile << "Remotebucket=\"" + hostparm.ThisHostRemotebucket + "\"\n"; + myfile << "ReceiverType=\"" + hostparm.ThisReceiverType + "\"\n"; + myfile << "HDHRlirc_device=\"" + hostparm.ThisHDHRlirc_device + "\"\n"; + myfile << "HostLircWait=\"" + hostparm.ThisHostLircWait + "\"\n"; + + myfile << "ReceiverSerialport=\"" + hostparm.ThisHostSerialPortlirc + "\"\n"; + myfile << "HostTransmitproto_1=\"" + hostparm.ThisHostTransmitproto_1 + "\"\n"; + myfile << "HostTransmitproto_2=\"" + hostparm.ThisHostTransmitproto_2 + "\"\n"; + myfile << "HostTransmitproto_3=\"" + hostparm.ThisHostTransmitproto_3 + "\"\n"; + myfile << "HostTransmitproto_4=\"" + hostparm.ThisHostTransmitproto_4 + "\"\n"; + + myfile << "HostTransmitDelay_1=\"" + hostparm.ThisHostTransmitDelay_1 + "\"\n"; + myfile << "HostTransmitDelay_2=\"" + hostparm.ThisHostTransmitDelay_2 + "\"\n"; + myfile << "HostTransmitDelay_3=\"" + hostparm.ThisHostTransmitDelay_3 + "\"\n"; + myfile << "HostTransmitDelay_4=\"" + hostparm.ThisHostTransmitDelay_4 + "\"\n"; + +// myfile << "HostTransmitSend_after_1=\"" + hostparm.ThisHostTransmitSend_after_1 + "\"\n"; +// myfile << "HostTransmitSend_after_2=\"" + hostparm.ThisHostTransmitSend_after_2 + "\"\n"; +// myfile << "HostTransmitSend_after_3=\"" + hostparm.ThisHostTransmitSend_after_3 + "\"\n"; +// myfile << "HostTransmitSend_after_4=\"" + hostparm.ThisHostTransmitSend_after_4 + "\"\n"; + + myfile << "HostBlasterType=\"" + hostparm.ThisHostBlasterType + "\"\n"; + myfile << "HostSerialPort_blasterlirc=\"" + hostparm.ThisHostSerialPort_blasterlirc + "\"\n"; + myfile << "Hostnumblaster=\"" + hostparm.ThisHostnumblaster + "\"\n"; + myfile << "LCDtype=\"" + hostparm.ThisHostLCDType + "\"\n"; + + + systemheader="\n# user settings\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "rootSSH=\"" + hostparm.ThisHOSTrootSSH + "\"\n"; + + systemheader="\n# Supplemental\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "supplemental=\"" + hostparm.ThisHostSupplemental + "\"\n"; + myfile << "windowmanager=\"" + hostparm.ThisHostWindowManager + "\"\n"; + myfile << "EnhancedWMStyle=\"" + hostparm.ThisHostEnhancedWMStyle + "\"\n"; + + systemheader="\n# VNC\n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "vncenable=\"" + hostparm.ThisHostVNCEnable + "\"\n"; + myfile << "vncpassword=\"" + hostparm.ThisHostVNCpassword + "\"\n"; + myfile << "xvncenable=\"" + hostparm.ThisHostXVNCEnable + "\"\n"; + myfile << "xvncpassword=\"" + hostparm.ThisHostXVNCpassword + "\"\n"; + + systemheader= "\n# webuser \n" ; + myfile << systemheader ; + myfile << divider ; + myfile << "UseMythWEB_auth=\"" + hostparm.ThisHostwebauth + "\"\n"; + + + + f.close(); + +} + + +MythInstallSettings::MythInstallSettings() +{ + VerticalConfigurationGroup* vcg = new VerticalConfigurationGroup(false,false,true,true); + VerticalConfigurationGroup* denied = new VerticalConfigurationGroup(false,false,true,true); + TransLabelSetting *deniedlabel = new TransLabelSetting(); + deniedlabel->setValue(" Access to these settings is disabled.\n Access can be enabled in Access Settings." ); + denied->addChild(deniedlabel); + if ( displaymysqlonly ) + { + vcg->addChild(HostMysqlserverip_listbox()); + vcg->addChild(ThemePainter()); + addChild(vcg); + } + else + { + // This is needed to stop default=interface from being wiped every time + if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" ) + hostparm.ThisHostDefaultInterface = "eth0"; + else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" ) + hostparm.ThisHostDefaultInterface = "eth1"; + else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan0"; + else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan1"; + else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" ) + hostparm.ThisHostDefaultInterface = "eth0"; + else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" ) + hostparm.ThisHostDefaultInterface = "eth1"; + else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan0"; + else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan1"; + else if ( gCoreContext->GetSetting("HostActiveonbootath0") == "1" ) + hostparm.ThisHostDefaultInterface = "ath0"; + else + hostparm.ThisHostDefaultInterface = "eth0"; + + + + vcg->setLabel(QObject::tr("Host Settings")); + // Check to see if screen should appear + if ( displayshownetwork ) + { + //Check to see if screen is allowed to appear + if ( ((gCoreContext->GetSetting("Hostaccessnetwork")) == "0" ) ) + { + denied ->setLabel(QObject::tr("Network Settings")); + addChild(denied); + } + else + { + + hostparm.ThisHostnetOLD = gCoreContext->GetSetting("HostNetDevice"); + QString s = "HostActiveonboot"; + s+=hostparm.ThisHostnetOLD; + hostparm.ThisHostnetActiveOLD = gCoreContext->GetSetting(s); + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTNetDevice'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + + if ( gCoreContext->GetSetting("HostDefaulteth0") == "1" ) + hostparm.ThisHostDefaultInterface = "eth0"; + else if ( gCoreContext->GetSetting("HostDefaulteth1") == "1" ) + hostparm.ThisHostDefaultInterface = "eth1"; + else if ( gCoreContext->GetSetting("HostDefaultwlan0") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan0"; + else if ( gCoreContext->GetSetting("HostDefaultwlan1") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan1"; + else if ( gCoreContext->GetSetting("HostActiveonbooteth0") == "1" ) + hostparm.ThisHostDefaultInterface = "eth0"; + else if ( gCoreContext->GetSetting("HostActiveonbooteth1") == "1" ) + hostparm.ThisHostDefaultInterface = "eth1"; + else if ( gCoreContext->GetSetting("HostActiveonbootwlan0") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan0"; + else if ( gCoreContext->GetSetting("HostActiveonbootwlan1") == "1" ) + hostparm.ThisHostDefaultInterface = "wlan1"; + else if ( gCoreContext->GetSetting("HostActiveonbootath0") == "1" ) + hostparm.ThisHostDefaultInterface = "ath0"; + else + hostparm.ThisHostDefaultInterface = "eth0"; + + + NetworkOptionsFrame *networkoptionsframe = new NetworkOptionsFrame(); + NetworkSettingsFrame *netsettingsframe = new NetworkSettingsFrame(); + + addChild(netsettingsframe); + addChild(networkoptionsframe); + + }; + } + + if ( displayshowhostype ) + { + if ( ((gCoreContext->GetSetting("Hostaccesshostype")) =="0" )) + { + denied ->setLabel(QObject::tr("Host Settings")); + addChild(denied); + } + else + { + SystemtypeGroup *systemtypegroup = new SystemtypeGroup(); + vcg->addChild(systemtypegroup); + addChild(vcg); + } + } + + if ( displayremotesonly ) + { + if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" )) + { + denied ->setLabel(QObject::tr("Remotes Settings")); + addChild(denied); + } + else + { + IRFrame *irframe = new IRFrame(); + addChild(irframe); + } + } + + if ( displayshowadvancedX ) + { + if ( ((gCoreContext->GetSetting("HostaccessadvancedX")) == "0" )) + { + denied ->setLabel(QObject::tr("Display Settings")); + addChild(denied); + } + else + { + AdvancedXSettings *advancedXsettings = new AdvancedXSettings(); + addChild(advancedXsettings); + } + } + + if ( displayvnc ) + { + if ( ((gCoreContext->GetSetting("Hostaccessvnc")) == "0" )) + { + denied ->setLabel(QObject::tr("VNC Settings")); + addChild(denied); + } + else + { + VNChostsettings* vnchostsettings= new VNChostsettings(); + addChild(vnchostsettings); + } + } + + if ( displayfileshare ) + { + if ( ((gCoreContext->GetSetting("Hostaccessfileshare")) == "0" )) + { + denied ->setLabel(QObject::tr("File Sharing Settings")); + addChild(denied); + } + else + { + FileShareMainFrameClient *nfsclient = new FileShareMainFrameClient(); + addChild(nfsclient); + + FileShareMainFrameServer *fileserver = new FileShareMainFrameServer(); + addChild(fileserver); + } + } + + if ( displayshowmisc ) + { + if ( ((gCoreContext->GetSetting("Hostaccessmisc")) == "0" )) + { + denied ->setLabel(QObject::tr("Miscellanous")); + addChild(denied); + } + else + { + MiscMainFrame *miscsettings = new MiscMainFrame(); + // MiscMainFrame2 *miscsettings2 = new MiscMainFrame2(); + addChild(miscsettings); + // addChild(miscsettings2); + } + } + + if ( displaysupplemental ) + { + //JM VERBOSE(VB_IMPORTANT, "screensaver"); + Supplementalhostsettings *supplemental = new Supplementalhostsettings(); + addChild(supplemental); + } + + if ( displayshowshutdown ) + { + if ( ((gCoreContext->GetSetting("Hostaccesssleep")) == "0" )) + { + denied ->setLabel(QObject::tr("Shutdown Settings")); + addChild(denied); + } + else + { + WakeSettings *wakesettings = new WakeSettings(); + addChild(wakesettings); + } + } + + if ( displayshowadvanced ) + { + if ( ((gCoreContext->GetSetting("Hostaccessadvanced")) == "0" ) ) + { + denied ->setLabel(QObject::tr("Advanced Settings")); + addChild(denied); + } + else + { + AdvancedSettings *advancedsettings = new AdvancedSettings(); + AdvancedSettings_2 *advancedsettings_2 = new AdvancedSettings_2(); + + addChild(advancedsettings); + addChild(advancedsettings_2); + } + } + + if ( displayshowsound ) + { + if ( ((gCoreContext->GetSetting("Hostaccesssound")) =="0") ) + { + denied ->setLabel(QObject::tr("Audio Settings")); + addChild(denied); + } + else + { + //remove old sound card setting from the db. This is useful for when the saved setting is no longer valid for this machine. + // Later search the list and set the value to the old setting if found in the dropdown. + hostparm.OLDHostSoundOSSAnalog = gCoreContext->GetSetting("HostSoundOssAnalog"); + hostparm.OLDHostSoundOSSDigital = gCoreContext->GetSetting("HostSoundOssDigital"); + hostparm.OLDHostSoundALSAAnalog = gCoreContext->GetSetting("HostSoundALSAAnalog"); + hostparm.OLDHostSoundALSADigital= gCoreContext->GetSetting("HostSoundALSADigital"); + + + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssAnalog'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSAAnalog'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundALSADigital'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + query.prepare( "delete from settings where hostname=:HOSTNAME and value = 'HOSTSoundOssDigital'; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + + SoundSettings *soundsettings = new SoundSettings(); + addChild(soundsettings); + } + } + + if ( displayaccesscontrol ) + { + VerticalConfigurationGroup* accessettings = + new VerticalConfigurationGroup(false,true,false,false); + ConfigurationGroup *GridAccess = + new GridConfigurationGroup(2,false,false,false,false); + + GridAccess->addChild(Hostaccessadvanced()); + GridAccess->addChild(Hostaccesssound()); + GridAccess->addChild(HostaccessadvancedX()); + GridAccess->addChild(Hostaccessddns()); + GridAccess->addChild(Hostaccessfileshare()); + GridAccess->addChild(Hostaccessmisc()); + GridAccess->addChild(Hostaccessnetwork()); + GridAccess->addChild(Hostaccessplugins()); + GridAccess->addChild(Hostaccessir()); + GridAccess->addChild(Hostaccessscreensaver()); +//screensaver + GridAccess->addChild(Hostaccessvnc()); + GridAccess->addChild(Hostaccesssleep()); +// GridAccess->addChild(Hostaccessuser()); + GridAccess->addChild(Hostaccesswebuser()); + +// accessettings->addChild(Hostaccessnetwork()); + accessettings->addChild(new ACCESShostsettings); + accessettings->addChild(GridAccess); + accessettings ->setLabel(QObject::tr("Access Settings")); + addChild(accessettings); + } + + if ( displayplugins ) + { + if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" )) + { + denied ->setLabel(QObject::tr("Programs")); + addChild(denied); + } + else + { + ConfigurationGroup *GridShowPlugin = new GridConfigurationGroup(2,false); + GridShowPlugin->setLabel(QObject::tr("Programs (1/4)")); + GridShowPlugin->addChild(Hostpluginmytharchive()); + GridShowPlugin->addChild(Hostpluginmythbrowser()); + //GridShowPlugin->addChild(Hostpluginmythcontrols()); + GridShowPlugin->addChild(Hostpluginmythnetvision()); + GridShowPlugin->addChild(Hostpluginmythgallery()); + //GridShowPlugin->addChild(Hostpluginmythmovietime()); + + //ConfigurationGroup *GridShowPlugin2 = new GridConfigurationGroup(2); + GridShowPlugin->addChild(Hostpluginmythmusic()); + GridShowPlugin->addChild(Hostpluginmythnews()); + //GridShowPlugin2->addChild(Hostpluginmythphone()); + //GridShowPlugin2->addChild(Hostpluginmythsmolt()); + GridShowPlugin->addChild(Hostpluginmythweather()); + GridShowPlugin->addChild(Hostpluginmythzoneminder()); + + +// ConfigurationGroup *Mythvideoplugin = new HorizontalConfigurationGroup(); +// Mythvideoplugin->addChild(Hostpluginmythvideo()); +// Mythvideoplugin->addChild(Hostpluginmythvideo_dvdcss()); + + + ConfigurationGroup *GridShowPlugin3 = new VerticalConfigurationGroup(false,true); + GridShowPlugin3->setLabel(QObject::tr("Programs (2/4)")); + GridShowPlugin3->addChild(new MythGamesettings); + GridShowPlugin3->addChild(Hostpluginmythvideo_dvdcss()); + //GridShowPlugin3->addChild(Mythvideoplugin); + + addChild(GridShowPlugin); +// addChild(GridShowPlugin2); + addChild(GridShowPlugin3); + } + } + + if ( displaysoftware ) + { + if ( ((gCoreContext->GetSetting("Hostaccessplugins")) == "0" )) + { + denied ->setLabel(QObject::tr("Programs")); + addChild(denied); + } + else + { + ConfigurationGroup *GridShowPlugin4 = new GridConfigurationGroup(2,false); + GridShowPlugin4->setLabel(QObject::tr("Programs (3/4)")); + GridShowPlugin4->addChild(Hostpluginmythappletrailers()); + //GridShowPlugin4->addChild(Hostpluginmythstream()); + //GridShowPlugin4->addChild(Hostpluginmythvodka()); + GridShowPlugin4->addChild(HostMiro()); + //GridShowPlugin4->addChild(HostXine()); + //GridShowPlugin4->addChild(Hostwebmin()); + //GridShowPlugin4->addChild(Hostfuppes()); + GridShowPlugin4->addChild(HostHuluDesktop()); + GridShowPlugin4->addChild(Hostwebonlinhes()); + + + ConfigurationGroup *GridShowPlugin5 = new GridConfigurationGroup(2); + //GridShowPlugin5->addChild(Hostfuppes()); + + ConfigurationGroup *GridShowPlugin6 = new VerticalConfigurationGroup(false,true); + GridShowPlugin6->setLabel(QObject::tr("Programs (4/4)")); + GridShowPlugin6->addChild(Hostfoldingathome()); + GridShowPlugin6->addChild(Hostfoldingusername()); + GridShowPlugin6->addChild(Hostfoldingworksize()); + + addChild(GridShowPlugin4); + //addChild(GridShowPlugin5); + addChild(GridShowPlugin6); + } + } + if ( displayuser ) + { + if ( ((gCoreContext->GetSetting("Hostaccessuser")) == "0" )) + { + denied ->setLabel(QObject::tr("User Accounts")); + addChild(denied); + } + else + { + UserManagement *usermanagement = new UserManagement(); + addChild(usermanagement); + } + } + + if ( displaywebuser ) + { + if ( ((gCoreContext->GetSetting("Hostaccesswebuser")) == "0" )) + { + denied ->setLabel(QObject::tr("Web Security Settings")); + addChild(denied); + } + else + { + WebPasswordFrame *webpasswordframe = new WebPasswordFrame(); + addChild(webpasswordframe); + } + + } + + if ( displayddns ) + { + if ( ((gCoreContext->GetSetting("Hostaccessddns")) == "0" )) + { + denied ->setLabel(QObject::tr("DDNS Settings")); + addChild(denied); + } + else + { + DDnssettings *ddnsframe = new DDnssettings(); + addChild(ddnsframe); + } + } + + if ( displayinfrared ) + { + if ( ((gCoreContext->GetSetting("Hostaccessir")) =="0" )) + { + denied ->setLabel(QObject::tr("Remotes Settings")); + addChild(denied); + } + else + { + IRFrame *irframe = new IRFrame(); + IR_TransmitFrame *transmitframe = new IR_TransmitFrame(); + LCDFrame *lcdframe = new LCDFrame(); + addChild(irframe); + addChild(transmitframe); + addChild(lcdframe); + } + } + + if ( displayscreensaver ) + { + if ( ((gCoreContext->GetSetting("Hostaccessscreensaver")) =="0" )) + { + denied ->setLabel(QObject::tr("Screensaver Settings")); + addChild(denied); + } + else + { + //JM VERBOSE(VB_IMPORTANT, "screensaver"); + Screensaverhostsettings *screensaver = new Screensaverhostsettings(); + addChild(screensaver); + } + } + + + } + +}; + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h new file mode 100755 index 0000000..23c00f0 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/installsettings.h @@ -0,0 +1,589 @@ +#ifndef WELCOMESETTINGS_H +#define WELCOMESETTINGS_H + +#include <settings.h> +#include "mythdialogs.h" +#include "libmyth/mythdialogs.h" +#include "libmyth/mythwidgets.h" +#include "compat-mv.h" + +class SystemtypeGroup: public TriggeredConfigurationGroup { + Q_OBJECT +public: + SystemtypeGroup(); + HostComboBox *HostSystemType; +public slots: + void SystemtypeHelp(); +}; + +//------------------------------------------- +class NetworkSettingseth0: + public TriggeredConfigurationGroup { + Q_OBJECT +public: + NetworkSettingseth0(); + + HostLineEdit *HostIPeth0; + HostComboBox *HostNETMASKeth0; + HostLineEdit *HostGWeth0; + HostLineEdit *HostDNSeth0; + HostCheckBox *HostActiveonbooteth0; + HostCheckBox *HostUseDHCPeth0 ; + HostCheckBox *HostDefaulteth0; + TransButtonSetting *wirelessbuttoneth0; + +signals: + void eth0_is_default(void); +public slots: + void eth0_wireless_settings(); + void eth0_disable_others(); + void eth0_disabled(); + void eth0_wireless_disable(); +}; + +class eth0options : public ConfigurationWizard +{ +public: + eth0options(); +}; + + +class NetworkSettingseth1: + public TriggeredConfigurationGroup { + Q_OBJECT +public: + NetworkSettingseth1(); + + HostLineEdit *HostIPeth1; + HostComboBox *HostNETMASKeth1; + HostLineEdit *HostGWeth1; + HostLineEdit *HostDNSeth1; + HostCheckBox *HostActiveonbooteth1; + HostCheckBox *HostUseDHCPeth1 ; + HostCheckBox *HostDefaulteth1; + TransButtonSetting *wirelessbuttoneth1; +signals: + void eth1_is_default(void); +public slots: + void eth1_wireless_settings(); + void eth1_disable_others(); + void eth1_disabled(); + void eth1_wireless_disable(); +}; + +class eth1options : public ConfigurationWizard +{ +public: + eth1options(); +}; + + + +class NetworkSettingswlan0: + public TriggeredConfigurationGroup { + Q_OBJECT +public: + NetworkSettingswlan0(); + + HostLineEdit *HostIPwlan0; + HostComboBox *HostNETMASKwlan0; + HostLineEdit *HostGWwlan0; + HostLineEdit *HostDNSwlan0; + HostCheckBox *HostActiveonbootwlan0; + HostCheckBox *HostUseDHCPwlan0 ; + HostCheckBox *HostDefaultwlan0; + TransButtonSetting *wirelessbuttonwlan0; +signals: + void wlan0_is_default(void); +public slots: + void wlan0_wireless_settings(); + void wlan0_disable_others(); + void wlan0_disabled(); + void wlan0_wireless_disable(); +}; + +class Wlan0options : public ConfigurationWizard +{ +public: + Wlan0options(); +}; + + +class NetworkSettingswlan1: + public TriggeredConfigurationGroup { + Q_OBJECT +public: + NetworkSettingswlan1(); + + HostLineEdit *HostIPwlan1; + HostComboBox *HostNETMASKwlan1; + HostLineEdit *HostGWwlan1; + HostLineEdit *HostDNSwlan1; + HostCheckBox *HostActiveonbootwlan1; + HostCheckBox *HostUseDHCPwlan1 ; + HostCheckBox *HostDefaultwlan1; + TransButtonSetting *wirelessbuttonwlan1; +signals: + void wlan1_is_default(void); +public slots: + void wlan1_wireless_settings(); + void wlan1_disable_others(); + void wlan1_disabled(); + void wlan1_wireless_disable(); +}; + +class wlan1options : public ConfigurationWizard +{ +public: + wlan1options(); +}; + + + +class NetworkSettingsath0: + public TriggeredConfigurationGroup { + Q_OBJECT +public: + NetworkSettingsath0(); + + HostLineEdit *HostIPath0; + HostComboBox *HostNETMASKath0; + HostLineEdit *HostGWath0; + HostLineEdit *HostDNSath0; + HostCheckBox *HostActiveonbootath0; + HostCheckBox *HostUseDHCPath0 ; + HostCheckBox *HostDefaultath0; + TransButtonSetting *wirelessbuttonath0; +signals: + void ath0_is_default(void); +public slots: + void ath0_wireless_settings(); + void ath0_disable_others(); + void ath0_disabled(); + void ath0_wireless_disable(); +}; + +class ath0options : public ConfigurationWizard +{ +public: + ath0options(); +}; + +class NetworkOptionsFrame: public VerticalConfigurationGroup { + Q_OBJECT +public: + NetworkOptionsFrame(); + TransButtonSetting *FetchDhcpHostnameButton; + TransLabelSetting *networklabel; + HostComboBox *HostMyhostname; + QString find_hostname(); +public slots: + void fetch_hostname(); +}; + + +//-------------------------------------------- + + +class SoundSettings: public TriggeredConfigurationGroup { + Q_OBJECT +public: + SoundSettings(); + HostComboBox *HostAudiotype; + HostCheckBox *HostsyncXine; + HostCheckBox *HostsyncMplayer; + HostCheckBox *HostsyncMythMusic; + HostCheckBox *HostsyncMythFrontend; + + +signals: + void oss_sig(void); + void alsa_sig(void); +public slots: + void soundossgathersettings_1(); + void soundalsagathersettings_1(); + +}; + + +class SoundOSSsettings: public TriggeredConfigurationGroup { + Q_OBJECT +public: + SoundOSSsettings(); + HostComboBox *HostSoundOssAnalog; + HostComboBox *HostSoundOssDigital; + HostComboBox *HostSoundTypeout; + void fillossselection(); +public slots: + void soundossgathersettings(); + void loadossdriver(); +}; + +class SoundALSAsettings: public TriggeredConfigurationGroup { + Q_OBJECT +public: + SoundALSAsettings(); + HostComboBox *HostSoundALSAAnalog; + HostComboBox *HostSoundALSADigital; + HostComboBox *HostSoundALSATypeout; + void fillALSAselection(); +public slots: + void soundalsagathersettings(); + void loadalsadriver(); + +}; + + +//############################################ +class MythInstallSettings: public ConfigurationWizard +{ + +public: + MythInstallSettings(); + void testme(); +private: + MythPopupBox *popup; + +}; +/* +#include "mythstorage.h" + +class MPUBLIC ImageSelectSetting: public SelectSetting { + Q_OBJECT +public: + ImageSelectSetting(Storage *_storage) : + SelectSetting(_storage), + bxwidget(NULL), imagelabel(NULL), combo(NULL), + m_hmult(1.0f), m_wmult(1.0f) { } + virtual QWidget* configWidget(ConfigurationGroup *cg, QWidget* parent, + const char* widgetName = 0); + virtual void widgetInvalid(QObject *obj); + virtual void deleteLater(void); + virtual void setHelpText(const QString &str); + + virtual void addImageSelection(const QString& label, + QImage* image, + QString value=QString::null, + bool select=false); + +protected slots: + void imageSet(int); + +protected: + void Teardown(void); + virtual ~ImageSelectSetting(); + +protected: + vector<QImage*> images; + QWidget *bxwidget; + QLabel *imagelabel; + MythComboBox *combo; + float m_hmult, m_wmult; +}; + + +class MPUBLIC HostImageSelect : public ImageSelectSetting, public HostDBStorage +{ +public: + HostImageSelect(const QString &name) : + ImageSelectSetting(this), HostDBStorage(this, name) { } +};*/ + + +class HostRemoteType: public HostImageSelect { +public: + HostRemoteType(); +}; + + + +#define MV_ROOT "/usr/MythVantage/" +int runsettings(bool = false , bool = false , bool = false ,bool = false ,bool = false, bool = false,bool = false,bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false , bool = false , bool = false , bool = false, bool = false); +//void ReadDDCifno(void); +void run_systemconfig(QString,bool = false,QString = ""); +void writesettings(); + +//void testXconfiguration(); + + + + + +struct HostParms +{ + + QString language; + QString ThisHostName; + //QString ThisHostDHCPhostname; + + QString ThisHostIP; + QString ThisNETMASK; + QString ThisGW; + QString ThisDNS; + QString ThisDHCP; + QString ThisHostnetOLD; + QString ThisHostnetActiveOLD; + + QString ThisHostDefaultInterface; + QString ThisHostIPeth0; + QString ThisHostNETMASKeth0; + QString ThisHostDNSeth0; + QString ThisHostUSEDHCPeth0; + QString ThisHostGWeth0; + QString ThisHOST_iswirelesseth0; + QString ThisHostActiveonbooteth0; + QString ThisHOSTESSIDeth0; + QString ThisHostUseEncryptioneth0; + QString ThisHostkeyeth0; + QString ThisHostMTUeth0; + + + QString ThisHostIPeth1; + QString ThisHostNETMASKeth1; + QString ThisHostDNSeth1; + QString ThisHostUSEDHCPeth1; + QString ThisHostGWeth1; + QString ThisHostActiveonbooteth1 ; + QString ThisHOST_iswirelesseth1; + QString ThisHOSTESSIDeth1; + QString ThisHostUseEncryptioneth1; + QString ThisHostkeyeth1; + QString ThisHostMTUeth1; + + QString ThisHostIPwlan0; + QString ThisHostNETMASKwlan0; + QString ThisHostDNSwlan0; + QString ThisHostUSEDHCPwlan0; + QString ThisHostGWwlan0; + QString ThisHostActiveonbootwlan0; + QString ThisHOST_iswirelesswlan0; + QString ThisHOSTESSIDwlan0; + QString ThisHostUseEncryptionwlan0; + QString ThisHostkeywlan0; + QString ThisHostMTUwlan0; + + + QString ThisHostIPwlan1; + QString ThisHostNETMASKwlan1; + QString ThisHostDNSwlan1; + QString ThisHostUSEDHCPwlan1; + QString ThisHostGWwlan1; + QString ThisHostActiveonbootwlan1; + QString ThisHOST_iswirelesswlan1; + QString ThisHOSTESSIDwlan1; + QString ThisHostUseEncryptionwlan1; + QString ThisHostkeywlan1; + QString ThisHostMTUwlan1; + + QString ThisHostIPath0; + QString ThisHostNETMASKath0; + QString ThisHostDNSath0; + QString ThisHostUSEDHCPath0; + QString ThisHostGWath0; + QString ThisHostActiveonbootath0; + QString ThisHOST_iswirelessath0; + QString ThisHOSTESSIDath0; + QString ThisHostUseEncryptionath0; + QString ThisHostkeyath0; + QString ThisHostMTUath0; + + + QString ThisRemote; + QString ThisHostRemotebucket; + + QString ThisTimeZone; + QString ThisSamba; + QString ThisHostServiceSamba_media; + QString ThisHostServiceSamba_home; + QString ThisHostServiceSamba_writehome; + QString ThisHostServiceSamba_write; + QString ThisHostServiceSamba_domain; + QString ThisNFS; + QString ThisMythWEB; + QString ThisHostwebauth; + // QString ThisHostServiceHobbit; + // QString ThisHostServiceRRD; + + QString ThisHostRunDHCP; + QString ThisSystemType; +// QString ThisBlaster; + + QString ThisHostTransmitproto_1; + QString ThisHostTransmitproto_2; + QString ThisHostTransmitproto_3; + QString ThisHostTransmitproto_4; + QString ThisHostBlasterType; + QString ThisHostSerialPort_blasterlirc; + QString ThisHostnumblaster; + QString ThisHostTransmitDelay_1; + QString ThisHostTransmitSend_after_1; + QString ThisHostTransmitDelay_2; + QString ThisHostTransmitSend_after_2; + QString ThisHostTransmitDelay_3; + QString ThisHostTransmitSend_after_3; + QString ThisHostTransmitDelay_4; + QString ThisHostTransmitSend_after_4; + + + + + + + + QString ThisReceiverType; + QString ThisHDHRlirc_device; + QString ThisHostLircWait; + QString ThisHostSerialPortlirc; + QString ThisHostUseEvrouter; + QString ThisHostEvrouterConfig; + QString ThisDBhost; + QString ThisXres; + + + + QString ThisHostBEWait; + QString ThisHostUseXLargeMouse; + QString ThisShutdowntime; + QString ThisShutdowntime2; + QString ThisWakeuptime; + QString ThisAutodown; + QString ThisUseNVRAM; + QString ThisUseWOL; + QString ThisKeepPackage; + QString ThisMythWelcome; + QString ThisHaveNFS; + QString ThisNFSserver; + QString ThisNFSmountpoint; + QString ThisHostCentralNFSallhosts; + QString ThisHostupdateplan; + // QString ThisOSS; + QString ThisShowToolTips; + // QString ThisHostPKG_MIRROR; + QString ThisRunfrontend; + QString ThisHostZipcode; + QString ThisHostncidClient; + QString ThisHostncidDaemon; + QString ThisHostSerialPortncid; + QString ThisHostNcidDeviceNetCallerID; + + QString ThisHostbootsplash; + QString ThisXIgnoreConfig; + QString ThisXcardtype; + QString ThisXUseAdvanced; + QString ThisXIgnoreEDID; + QString ThisXconnection; + QString ThisXHsync; + QString ThisXVrefresh; + QString ThisXresadvanced; + QString ThisXTVstandard; + QString ThisXTVconnection; + QString ThisXDisplaysize ; + + QString ThisHostXNvidia1080p; + QString ThisHostXNvidia1080i; + QString ThisHostXNvidia720p; + QString ThisHostXNvidia480p; + QString ThisHostAudiotype; + + QString ThisHostSoundTypeout; + QString ThisHostSoundOSSAnalog; + QString OLDHostSoundOSSAnalog; + QString ThisHostSoundOSSDigital; + QString OLDHostSoundOSSDigital; + + QString ThisHostSoundDigital; + QString ThisHostSoundDevice; + + QString ThisHostSoundALSAAnalog; + QString OLDHostSoundALSAAnalog; + QString ThisHostSoundALSADigital; + QString OLDHostSoundALSADigital; + QString ThisHostSoundALSATypeout; + + + QString ThisHostsyncXine; + QString ThisHostsyncMplayer; + QString ThisHostsyncMythMusic; + QString ThisHostsyncMythFrontend; + QString ThisHostLCDType; + QString ThisHostRemoteBackup; + QString ThisHostRemoteBackupDir; + QString ThisHostpluginmytharchive; + QString ThisHostpluginmythbrowser; + QString ThisHostpluginmythcontrols; + QString ThisHostpluginmythnetvision; + QString ThisHostpluginmythgallery; + QString ThisHostpluginmythgame; + QString ThisHostpluginmythmovietime; + QString ThisHostpluginmythmusic; + QString ThisHostpluginmythnews; + QString ThisHostpluginmythphone; + QString ThisHostpluginmythsmolt; + QString ThisHostpluginmythvideo; + QString ThisHostpluginmythweather; + QString ThisHostpluginmythzoneminder; + + + + QString ThisHostpluginmythvideo_dvdcss; + QString ThisHostpluginmythappletrailers; + QString ThisHostpluginmythstream; + QString ThisHostpluginmythvodka; + + QString ThisHostMiro; + QString ThisHostwebonlinhes; + QString ThisHostHuluDesktop; + + QString ThisHostpluginmythgameMame; + QString ThisHostpluginmythgamefceux; + QString ThisHostpluginmythgamesnes9x; + QString ThisHostpluginmythgameMednafen; + QString ThisHostpluginmythgameROMDB; + QString ThisHostpluginmythgameMupen64; + QString ThisHostpluginmythgameDolphin; + QString ThisHostpluginmythgameXe; + +// QString ThisHostXine; +// QString ThisHostwebmin; +// QString ThisHostfuppes; + QString ThisHostfoldingathome; + QString ThisHostfoldingusername; + QString ThisHostfoldingworksize; + + QString ThisHostDDnslogin; + QString ThisHostDDnspassword; + QString ThisHostDDnshostname; + QString ThisHostDDnsEnable; + QString ThisHostscreensavertype; + QString ThisHostscreensaveridle; + QString ThisHostscreensavertheme; + QString ThisHOSTrootSSH; + bool displayshowadvancedX; + + // supplemental + QString ThisHostSupplemental; + QString ThisHostWindowManager; + QString ThisHostEnhancedWMStyle; + + //VNC + QString ThisHostVNCEnable; + QString ThisHostVNCpassword; + QString ThisHostXVNCEnable; + QString ThisHostXVNCpassword; + +}; + +struct DDCinfo +{ + QString XVrefresh; + QString XHsync; + QString Displaysize; +}; + + + + + + + +#endif diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp new file mode 100755 index 0000000..fa16918 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp @@ -0,0 +1,597 @@ +//#include <qapplication.h> +//Added by qt3to4: +#include <Q3TextStream> + + +#include "installdialog.h" +#include "installsettings.h" +#include "password_manage.h" +#include "autocard.h" +#include "settemplate.h" + + + + +// Qt +#include <QApplication> +#include <QFileInfo> +#include <QDir> + + + +#include <cstdlib> +#include <sys/types.h> +#include <sys/stat.h> +#include <fcntl.h> +#include <unistd.h> + + + + +#include <stdio.h> + +//MythTV +#include "langsettings.h" +#include "mythcontext.h" +#include "mythversion.h" +#include "mythtranslation.h" +#include "mythdbcon.h" +#include "exitcodes.h" +#include "compat.h" +#include "lcddevice.h" +#include "commandlineparser.h" +#include "mythlogging.h" +#include "dialogbox.h" + + +// libmythui +#include "mythmainwindow.h" +#include "mythuihelper.h" + + +//?? +#include "myththemebase.h" + + +HostParms hostparm; +DDCinfo ddcinfo; + + +void initKeys(void) +{ + REG_KEY("Welcome", "STARTXTERM", "Open an Xterm window", "F12"); + REG_KEY("Welcome", "SHOWSETTINGS", "Show Mythshutdown settings", "F11"); +} + +int main(int argc, char **argv) +{ + bool showLang = false; + bool bShowSettings = false; + bool bShowNetwork = false; + bool bShowHostype = false; + bool bShowMisc = false; + bool bShowshutdown = false; + bool bShowadvanced = false; + bool bShowsound = false; + bool bShowadvancedX = false; + bool bShowAccesscontrol = false; + bool bShowplugins = false; + bool bShowsoftware = false; + bool bShowTemplate = false; + bool bShowuser = false; + bool bShowwebuser = false; + bool bRunSetup = false; + bool bShowHelp = false; + bool bShowReadme = false; + bool bShowddns = false; + bool bShowinfrared = false; + bool bShowscreensaver = false; + bool bShowquestion = false; + bool bShowsupplemental = false; + bool bShowremotes_only = false; + bool bShowvnc = false; + bool bShowFileshare = false; + + QStringList template_c_line ; + QString modulelist = "" ; + QString templateop=""; + QString templatename=""; + QString templatehostname=""; + QString question; + + + int FRONTEND_EXIT_NO_MYTHCONTEXT = 1; + int FRONTEND_EXIT_INVALID_CMDLINE =1 ; + QApplication a(argc, argv); + QCoreApplication::setApplicationName("mythinstall"); + + // Check command line arguments + MythInstallCommandLineParser cmdline; + int retval; + if ((retval = cmdline.ConfigureLogging()) != GENERIC_EXIT_OK) + return retval; + + if (!cmdline.Parse(argc, argv)) + { + cmdline.PrintHelp(); + return 4; + return GENERIC_EXIT_INVALID_CMDLINE; + } + + if (cmdline.toBool("showhelp")) + { + cmdline.PrintHelp(); + return GENERIC_EXIT_OK; + } + + if (cmdline.toBool("showversion")) + { + cmdline.PrintVersion(); + return GENERIC_EXIT_OK; + } +//--------------------Start of real stuff--------------------- + gContext = new MythContext(MYTH_BINARY_VERSION); + + if (!gContext->Init()) + { + LOG(VB_GENERAL, LOG_ERR, + "mythinstall: Could not initialize MythContext. Exiting."); + return GENERIC_EXIT_NO_MYTHCONTEXT; + } + + if (!MSqlQuery::testDBConnection()) + { + LOG(VB_GENERAL, LOG_ERR, + "mythinstall: Could not open the database. Exiting."); + return -1; + } + + if (cmdline.toBool("screen")) + { + bShowSettings = true; + LOG(VB_GENERAL, LOG_INFO, QString("mythinstall: Screen stuff")); + QString tmpArg = (cmdline.toString("screen")) ; + QStringList pairs = QStringList::split(",", tmpArg); + for (unsigned int index = 0; index < pairs.size(); ++index) + { + if ( pairs[index] == "network" ) + { + bShowNetwork = true; + modulelist.append("network,"); + } + else if ( pairs[index] == "misc" ) + { + bShowMisc = true; + modulelist.append("misc,"); + } + else if ( pairs[index] == "sleep" ) + { + bShowshutdown = true; + modulelist.append("sleep,"); + } + else if ( pairs[index] == "hostype" ) + { + bShowHostype = true; + modulelist.append("hostype,"); + } + else if ( pairs[index] == "advanced" ) + { + bShowadvanced = true; + modulelist.append("advanced,"); + } + else if ( pairs[index] == "sound" ) + { + bShowsound = true; + modulelist.append("audio,"); + } + else if ( pairs[index] == "advancedX" ) + { + bShowadvancedX = true; + modulelist.append("advancedX,"); + } + else if ( pairs[index] == "accesscontrol" ) + { + bShowAccesscontrol = true; + modulelist.append("accesscontrol,"); + } + else if ( pairs[index] == "plugins" ) + { + bShowplugins = true; + modulelist.append("plugins,"); + } + else if ( pairs[index] == "software" ) + { + bShowsoftware = true; + modulelist.append("software,"); + } + else if ( pairs[index] == "user" ) + { + bShowuser = true; + modulelist.append("user,"); + } + else if ( pairs[index] == "webuser" ) + { + bShowwebuser = true; + modulelist.append("webuser,"); + } + else if ( pairs[index] == "ddns" ) + { + bShowddns = true; + modulelist.append("ddns,"); + } + else if ( pairs[index] == "ir" ) + { + bShowinfrared = true; + modulelist.append("ir,"); + } + else if ( pairs[index] == "screensaver" ) + { + bShowscreensaver = true; + modulelist.append("screensaver,"); + } + else if ( pairs[index] == "supplemental" ) + { + bShowsupplemental = true; + modulelist.append("supplemental,"); + } + else if ( pairs[index] == "remotes_only" ) + { + bShowremotes_only = true; + modulelist.append("remotes_only,"); + } + else if ( pairs[index] == "vnc" ) + { + bShowvnc = true; + modulelist.append("vnc,"); + } + else if ( pairs[index] == "fileshare" ) + { + bShowFileshare = true; + modulelist.append("fileshare,"); + } + } //for loop + } + + if (cmdline.toBool("help")) + bShowHelp = true; + + if (cmdline.toBool("readme")) + { + bShowReadme = true; + } + if (cmdline.toBool("question")) + { + bShowquestion = true; + question = (cmdline.toString("question")) ; + } + + if (cmdline.toBool("run_mythsetup")) + bRunSetup = true; + + if (cmdline.toBool("show_lang")) + showLang = true; + + LCD::SetupLCD(); + if (class LCD *lcd = LCD::Get()) + lcd->switchToTime(); + + + MythTranslation::load("mythfrontend"); + GetMythUI()->LoadQtConfig(); + MythMainWindow *mainWindow = GetMythMainWindow(); + mainWindow->Init(); + +// if parms were passed to -t then doen't init the screen. +// if ( template_c_line.size() == 0 ) +// { +// gCoreContext->SaveSetting("HOSTtemplatetype","Do Nothing" ); +// mainWindow->Init(); +// findme +// gContext->SetMainWindow(mainWindow); +// +// MythThemeBase *themeBase = new MythThemeBase(); +// initKeys(); +// }; + + gCoreContext->ActivateSettingsCache(false); + gCoreContext->ClearSettingsCache(); + gCoreContext->ActivateSettingsCache(false); + + if (bShowSettings) + { + gCoreContext->ActivateSettingsCache(false); + gCoreContext->ClearSettingsCache(); + bool runconfig = false; + system("cp -f /etc/systemconfig /tmp/systemconfig.bak"); + QString olddb = gCoreContext->GetSetting("HostMysqlserver"); + QString oldhostype = gCoreContext->GetSetting("HostSystemType"); + runsettings(false,bShowNetwork,bShowHostype,bShowMisc,bShowshutdown,bShowadvanced,bShowsound,bShowadvancedX,bShowAccesscontrol,bShowplugins,bShowsoftware,bShowuser,bShowwebuser,bShowddns,bShowinfrared,bShowscreensaver,bShowsupplemental,bShowremotes_only,bShowvnc,bShowFileshare); + QString newdb = gCoreContext->GetSetting("HostMysqlserver"); + QString newhostype = gCoreContext->GetSetting("HostSystemType"); + int status = system("diff /tmp/systemconfig.bak /etc/systemconfig"); + bool restart = false; + //save my settings in case db switches + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb); + system(cmdtxt); + + if ( status != 0 ) + { + runconfig = true; + } + + if ( newdb != olddb ) + { + runconfig = true; + restart = true; + //db changed save setting from olddb + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ; + system(cmdtxt); + } + + if ( runconfig ) + { + //LOG(VB_GENERAL, LOG_ERR, + // "mythinstall: this is where i stalled"); + if ( newhostype != oldhostype ) + modulelist.append("hostypec,"); + // trim off last , + modulelist.truncate(modulelist.length()-1); + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/myth_settings_wrapper.sh -c restore -t syssettings -d "); + QString dbcommand = cmdtxt; + dbcommand.append(newdb); + run_systemconfig(modulelist,restart,dbcommand); + + + + } + system("rm -f /tmp/systemconfig.bak"); + gCoreContext->ActivateSettingsCache(false); + gCoreContext->ClearSettingsCache(); + if ( restart ) + { + DialogBox *dia = NULL; + QString prompt; + QString *problems = new QString("The network address of the database has changed."); + problems->append("\n"); + problems->append("The frontend will need to restart to connect to the new database."); + problems->append("\n"); + dia = new DialogBox(mainWindow, problems->append("\n" )); + dia->AddButton(QObject::tr("OK")); + int returncode = 0; + returncode = dia->exec(); + dia->deleteLater(); + //cout << "restarting" << endl; + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/systemconfig.sh reloadfe" ); + system(cmdtxt); + } + gCoreContext->ActivateSettingsCache(false); + gCoreContext->ClearSettingsCache(); + gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE"); + + + + }//run settings + + else if (bShowTemplate) + { +// if ( template_c_line.size() == 2) +// { +// templateop=template_c_line[0]; +// templatename=template_c_line[1]; +// } +// else if ( template_c_line.size() == 3) +// { +// templateop=template_c_line[0]; +// templatename=template_c_line[1]; +// templatehostname=template_c_line[2]; +// }; +// choosetemplate(templateop,templatename,templatehostname); + } + + else if (bRunSetup) + { + DialogBox *dia = NULL; + QString prompt; + QString *problems = new QString("To configure the TV cards and program guide the setup program needs to be run."); + problems->append("\n"); + problems->append("\n"); + + problems->append("For those in North America, guide data is provided by Schedules Direct."); + problems->append("\n"); + problems->append("Visit http://www.schedulesdirect.org/ to signup for your account today"); + problems->append("\n"); + problems->append("\n"); + problems->append("\n"); + + problems->append("If you choose to not run mythtv-setup now, the program can be run at any time by typing mythtv-setup or hitting ALT+s"); + problems->append("\n"); + + problems->append("\n"); + prompt = QObject::tr("Do you wish to run mythtv-setup ?"); + + dia = new DialogBox(mainWindow, problems->append("\n" + prompt)); + dia->AddButton(QObject::tr("Yes")); + dia->AddButton(QObject::tr("Yes and try to autodetect cards")); + dia->AddButton(QObject::tr("No")); + int returncode = 0; + returncode = dia->exec(); + DialogCode dcode = dia->exec(); + dia->deleteLater(); + if (kDialogCodeButton0 == dcode ) + returncode = 0; + if (kDialogCodeButton1 == dcode ) + returncode = 1; + if (kDialogCodeButton2 == dcode ) + returncode = 2; +/* + if (returncode == 1) + { + AutoCard listcards; + listcards.exec(); + }*/ + + return returncode; + } + + else if (bShowHelp) + { + DialogBox *dia = NULL; + QString prompt; + QString *problems = new QString("LinHES Help"); + problems->append("\n"); + problems->append("Visit http://linhes.org for additional help."); + problems->append("\n"); + problems->append("\n"); + problems->append("------Keyboard Shortcuts---------------------------------"); + problems->append("\n"); + problems->append("Alt + h: This Screen"); + problems->append("\n"); +#ifdef __MVAPP__ + problems->append("F2: Open/Close Terminal"); + problems->append("\n"); + problems->append("Shift + Return: Open New Terminal (xterm)"); + problems->append("\n"); + problems->append("Alt + F2: Show 2nd desktop Alt + F1 To Go Back"); + problems->append("\n"); + problems->append("Alt + c: Capture Myth Screenshot"); + problems->append("\n"); +#else + problems->append("Alt + x: Open New Terminal (xterm)"); + problems->append("\n"); + problems->append("Alt + m: Open mythfrontend"); + problems->append("\n"); + problems->append("m in mythfrontend: Display Power/About Menu"); + problems->append("\n"); +#endif + problems->append("Alt + 1: Start Master mythbackend"); + problems->append("\n"); + problems->append("Alt + 2: Stop Master mythbackend"); + problems->append("\n"); + problems->append("Alt + 3: Restart Master mythbackend"); + problems->append("\n"); + problems->append("Alt + s: Open mythtv-setup"); + problems->append("\n"); + problems->append("Alt + u: Unhide/Hide Mouse Pointer"); + problems->append("\n"); + problems->append("Alt + w: Open Web Browser (Chrome if installed)"); + problems->append("\n"); + problems->append("Alt + f: Restart Window Manager"); + problems->append("\n"); + + + dia = new DialogBox(mainWindow, problems->append("\n" )); + dia->AddButton(QObject::tr("OK")); + int returncode = 0; + returncode = dia->exec(); + dia->deleteLater(); + DestroyMythMainWindow(); + delete gContext; + return returncode; + } + else if (bShowReadme) + { + DialogBox *dia = NULL; + QString prompt; + QString line; + QString *problems = new QString(""); + problems->append("\n"); + QFile file("/usr/MythVantage/README"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + problems->append(line); + problems->append("\n"); + } + file.close(); + } + else + problems->append("Couldn't open file"); + dia = new DialogBox(mainWindow, problems->append("\n" )); + dia->AddButton(QObject::tr("OK")); + int returncode = 0; + returncode = dia->exec(); + dia->deleteLater(); + DestroyMythMainWindow(); + delete gContext; + return returncode; + } + + else if (bShowquestion) + { + //LOG(VB_GENERAL, LOG_INFO, QString(question)); + DialogBox *dia = NULL; + QString prompt; + QString *problems = new QString(""); + problems->append("\n"); + problems->append("\n"); + problems->append(question); + dia = new DialogBox(mainWindow, problems->append("\n" )); + dia->AddButton(QObject::tr("Yes")); + dia->AddButton(QObject::tr("No")); + int returncode = 0; + + returncode = dia->exec(); + dia->deleteLater(); + DestroyMythMainWindow(); + delete gContext; + + return returncode; + } + else + { + if (LanguageSelection::prompt(showLang)){ + //taken from reloadTheme mythtv-setup + MythTranslation::reload(); + GetMythMainWindow()->ReinitDone(); + + } + + MythScreenStack *mainStack = GetMythMainWindow()->GetMainStack(); + WelcomeDialog *welcome = new WelcomeDialog(mainStack, "Welcome"); + if (welcome->Create()) + { + mainStack->AddScreen(welcome, true); + } + else + return -1; + + do + { + + qApp->processEvents(); + usleep(5000); + } while (mainStack->TotalScreens() > 0); + + + // DestroyMythMainWindow(); + // delete gContext; + // gContext = NULL; + // delete qApp; + + } + DestroyMythMainWindow(); + + //gCoreContext->GetSetting("MasterServerIP"); + //gCoreContext->GetSetting("BackendServerIP"); + + + + delete gContext; + gContext = NULL ; + //delete qApp; + + return 0; +} + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp new file mode 100755 index 0000000..43f360a --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.cpp @@ -0,0 +1,623 @@ +#include <unistd.h> +#include "misc_settings.h" +#include "mv_common.h" +//Added by qt3to4: +#include <Q3TextStream> +#include "mythuihelper.h" +#include "mythsystemlegacy.h" + +extern HostParms hostparm; + +static HostCheckBox *HostShowToolTips() +{ + HostCheckBox *gc = new HostCheckBox("HostShowToolTips"); + gc->setLabel(QObject::tr("Show Shortcuts")); + gc->setValue(true); + gc->setHelpText(QObject::tr("Shows a window describing how to open a console and various other items.")); + return gc; +}; + +static HostComboBox *Hostupdateplan() +{ + HostComboBox *gc = new HostComboBox("Hostupdateplan"); + gc->setLabel(QObject::tr("Automatic Updates")); + gc->addSelection("None"); + gc->addSelection("Myth_only"); + gc->addSelection("All"); + gc->setHelpText("None: Do not install updates automatically.\nMyth_only: Automatically installs updates for MythTV only.\nAll: Automatically installs all updates for LinHES."); + return gc; + +} +// static HostLineEdit *HostZipcode() +// { +// HostLineEdit *gc = new HostLineEdit("HostZipcode"); +// gc->setLabel(QObject::tr("Zip Code")); +// gc->setHelpText(QObject::tr("The zipcode will be used to configure MythMovieTimes. Leave it blank to use the existing value. People located outside the U.S.A should probably leave this blank")); +// //gc->setRW(); +// //gc->setRO(); +// return gc; +// }; + +//_______________Misc main frame +MiscMainFrame::MiscMainFrame(): + VerticalConfigurationGroup(false,false,false,false) + +{ + setLabel(QObject::tr("Miscellaneous Settings")); + bool MVAPP; +#ifdef __MVAPP__ + MVAPP = true ; +#else + MVAPP = false ; +#endif + bool showLabels; + hostparm.ThisSystemType = gCoreContext->GetSetting("HostSystemType"); + if ( hostparm.ThisSystemType == "Standalone" || hostparm.ThisSystemType=="Master_backend") + { + showLabels = false; + } + else + { + showLabels = true; + } + TransLabelSetting *temptimezone = new TransLabelSetting(); + temptimezone->setValue("Timezone: " + hostparm.ThisTimeZone ); +// TransLabelSetting *tempzipcode = new TransLabelSetting(); +// tempzipcode->setValue("Zipcode: " + hostparm.ThisHostZipcode ); +// GridConfigurationGroup* miscsettings_2 = +// new GridConfigurationGroup(1,true, true,false,false); +// +// if ( showLabels && ( hostparm.ThisHostZipcode != "" )) +// if (MVAPP) +// miscsettings_2->addChild(tempzipcode); +// else +// miscsettings_2->addChild(HostZipcode()); +// else +// miscsettings_2->addChild(HostZipcode()); + + TimezoneRegion *timezoneregion = new TimezoneRegion(); +// TimezoneButton *timezonebutton = new TimezoneButton(); + + VerticalConfigurationGroup* miscsettings = + new VerticalConfigurationGroup(false, true,false,false); +// miscsettings->addChild(timezonebutton); + if ( showLabels && ( hostparm.ThisTimeZone != "" )) + { + if (MVAPP) + { + miscsettings->addChild(temptimezone); +// timezonebutton->disableButton(); + } + else + miscsettings->addChild(timezoneregion); + } + else + miscsettings->addChild(timezoneregion); + + miscsettings->addChild(HostShowToolTips()); + miscsettings->addChild(Hostupdateplan()); + + + //miscsettings->addChild(miscsettings_2); + addChild(miscsettings); + + + + + + +// connect(timezonebutton, SIGNAL(mf_launch_tzgui()),timezoneregion ,SLOT(timezone_gathersettings())); + + connect(timezoneregion,SIGNAL(mf_show_tz(QString)),this,SLOT(mf_show_tz(QString))); + connect(this,SIGNAL(update_timezone(QString)),timezoneregion,SLOT(update_timezone_values(QString))); + + autoLaunchTimer = new QTimer(this); +// connect(autoLaunchTimer, SIGNAL(timeout()), timezonebutton, SLOT(launch_tzgui())); + autoLaunchTimer->start(0); +} + +QString MiscMainFrame::mf_show_tz(QString tz) +{ + QString GTimezone; + int rc; + bool showLabels; + if (autoLaunchTimer->isActive()) + { + autoLaunchTimer->stop(); + + // This was triggered by the timer. Only launch the timezone gui if the timezone is unknown. + if ( hostparm.ThisTimeZone != "" ) + return NULL; + } + + if ( hostparm.ThisTimeZone == "" ) + tz = "guess"; + + //launch tzgui and load output into Gtimezone + int m_screenheight = 0, m_screenwidth = 0; + float m_wmult = 0, m_hmult = 0; + QString m_height , m_width , cmd; + GetMythUI()->GetScreenSettings(m_screenwidth, m_wmult, m_screenheight, m_hmult); + m_height.setNum(m_screenheight); + m_width.setNum(m_screenwidth); + QString tzpath; + tzpath=MV_ROOT; + tzpath.append("bin/timezone.bin"); + cmd=tzpath + " -z " + tz + " -h " + m_height + " -w " + m_width + " > /tmp/.selected_tz" ; + rc=myth_system(cmd); + if ( rc == 0 ) + { + //read in value + QString line; + QFile file("/tmp/.selected_tz"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("/")) + { + GTimezone = line.simplifyWhiteSpace(); + break; + } + } + file.close(); + } + timezone_unknown = FALSE; + emit update_timezone(GTimezone); + } + + return GTimezone; +} + +// //_______________Misc main frame +// MiscMainFrame2::MiscMainFrame2(): +// VerticalConfigurationGroup(false,false,false,false) +// { +// VerticalConfigurationGroup* miscsettings = +// new VerticalConfigurationGroup(false, true,false,false); +// +// GridConfigurationGroup* miscsettings_2 = +// new GridConfigurationGroup(1,false, false,false,false); +// miscsettings_2->addChild(HostShowToolTips()); +// miscsettings_2->addChild(Hostupdateplan()); +// +// // NFSSettings *nfssettings = new NFSSettings(); +// // +// // miscsettings->addChild(nfssettings); +// miscsettings->addChild(miscsettings_2); +// +// addChild(miscsettings); +// } + + +//_______________Misc time timezone +/* +TimezoneButton::TimezoneButton(): + VerticalConfigurationGroup(false,false,false,false) +{ + TZButton = new TransButtonSetting; + TZButton->setLabel("Hitchhikers guide to timezones"); + addChild(TZButton); + connect(TZButton, SIGNAL(pressed()),this,SLOT(launch_tzgui())); + +}; + +void TimezoneButton::launch_tzgui() +{ + emit mf_launch_tzgui(); +} + +void TimezoneButton::disableButton() +{ + TZButton->setEnabled(false); +} +*/ +//This is used for the timezone +QStringList findFilesRecursively ( QStringList paths, QString fileTypes ) { + if ( fileTypes.isEmpty() ) fileTypes = "*"; + QStringList result, more; + QStringList::Iterator it; + for ( uint i = 0 ; i < paths.size() ; i++ ) + { // inefficient...whatever + QDir dir( paths[i] ); + dir.setSorting( QDir::Reversed ); + more = dir.entryList( fileTypes, QDir::Files ); + for ( it = more.begin() ; it != more.end() ; ++it ) + result.append( paths[i] + "/" + *it ); + // reg exp in next line excludes . and .. dirs (and .* actually) + more = dir.entryList( QDir::Dirs ).grep( QRegExp( "[^.]" ) ); + for ( it = more.begin() ; it != more.end() ; ++it ) + *it = paths[i] + "/" + *it; + more = findFilesRecursively( more, fileTypes ); + for ( it = more.begin() ; it != more.end() ; ++it ) + result.append( *it ); + } + return result; // yields absolute paths +} + +void TimezoneRegion::timezoneregion_fillselection_zone() +{ + HostTimeZoneRegion->setLabel(QObject::tr("Time Zone")); + HostTimeZoneRegion->addSelection("US"); + HostTimeZoneRegion->addSelection("Pacific"); + HostTimeZoneRegion->addSelection("Mideast"); + HostTimeZoneRegion->addSelection("Mexico"); + HostTimeZoneRegion->addSelection("Indian"); + HostTimeZoneRegion->addSelection("Europe"); + HostTimeZoneRegion->addSelection("Etc"); + HostTimeZoneRegion->addSelection("Chile"); + HostTimeZoneRegion->addSelection("Canada"); + HostTimeZoneRegion->addSelection("Brazil"); + HostTimeZoneRegion->addSelection("Australia"); + HostTimeZoneRegion->addSelection("Atlantic"); + HostTimeZoneRegion->addSelection("Asia"); + HostTimeZoneRegion->addSelection("Arctic"); + HostTimeZoneRegion->addSelection("Antarctica"); + HostTimeZoneRegion->addSelection("America"); + HostTimeZoneRegion->addSelection("Africa"); + //--single region + HostTimeZoneRegion->addSelection("Zulu"); + HostTimeZoneRegion->addSelection("WET"); + HostTimeZoneRegion->addSelection("W-SU"); + HostTimeZoneRegion->addSelection("Universal"); + HostTimeZoneRegion->addSelection("UTC"); + HostTimeZoneRegion->addSelection("UCT"); + HostTimeZoneRegion->addSelection("Turkey"); + HostTimeZoneRegion->addSelection("Singapore"); + HostTimeZoneRegion->addSelection("ROK"); + HostTimeZoneRegion->addSelection("ROC"); + HostTimeZoneRegion->addSelection("Portugal"); + HostTimeZoneRegion->addSelection("Poland"); + HostTimeZoneRegion->addSelection("PST8PDT"); + HostTimeZoneRegion->addSelection("PRC"); + HostTimeZoneRegion->addSelection("Navajo"); + HostTimeZoneRegion->addSelection("NZ-CHAT"); + HostTimeZoneRegion->addSelection("NZ"); + HostTimeZoneRegion->addSelection("MST7MDT"); + HostTimeZoneRegion->addSelection("MST"); + HostTimeZoneRegion->addSelection("MET"); + HostTimeZoneRegion->addSelection("Libya"); + HostTimeZoneRegion->addSelection("Kwajalein"); + HostTimeZoneRegion->addSelection("Japan"); + HostTimeZoneRegion->addSelection("Jamaica"); + HostTimeZoneRegion->addSelection("Israel"); + HostTimeZoneRegion->addSelection("Iran"); + HostTimeZoneRegion->addSelection("Iceland"); + HostTimeZoneRegion->addSelection("Hongkong"); + HostTimeZoneRegion->addSelection("HST"); + HostTimeZoneRegion->addSelection("Greenwich"); + HostTimeZoneRegion->addSelection("GMT0"); + HostTimeZoneRegion->addSelection("GMT-0"); + HostTimeZoneRegion->addSelection("GMT+0"); + HostTimeZoneRegion->addSelection("GMT"); + HostTimeZoneRegion->addSelection("GB-Eire"); + HostTimeZoneRegion->addSelection("GB"); + HostTimeZoneRegion->addSelection("Factory"); + HostTimeZoneRegion->addSelection("Eire"); + HostTimeZoneRegion->addSelection("Egypt"); + HostTimeZoneRegion->addSelection("EST5EDT"); + HostTimeZoneRegion->addSelection("EST"); + HostTimeZoneRegion->addSelection("EET"); + HostTimeZoneRegion->addSelection("Cuba"); + HostTimeZoneRegion->addSelection("CST6CDT"); + HostTimeZoneRegion->addSelection("CET"); + HostTimeZoneRegion->setHelpText(QObject::tr("Time Zone Region")); +} + +void TimezoneRegion::timezoneregion_fillselection(QString tzonefile ) +{ + QString currentitem; + QString tzfile_with_path="/usr/share/zoneinfo/posix/"; + bool foundtab; + int foundslashes; + QStringList timezonefile; + tzfile_with_path.append(tzonefile); + timezonefile.append(tzfile_with_path); + QStringList answer = findFilesRecursively( timezonefile, "*" ); + QStringList onlyfiles ; + QStringList::Iterator it; + for ( it = answer.begin(); it != answer.end(); ++it ) + { + currentitem = *it; + + foundtab=currentitem.contains(".tab"); + if ( ! foundtab ) + { + foundslashes=currentitem.count("/"); + currentitem = currentitem.section( '/', 6, foundslashes ); + if ( tzonefile == "US") + HostTimezoneRegion_US->addSelection(currentitem); + else if ( tzonefile == "Pacific") + HostTimezoneRegion_Pacific->addSelection(currentitem); + else if ( tzonefile == "Mideast") + HostTimezoneRegion_Mideast->addSelection(currentitem); + else if ( tzonefile == "Mexico") + HostTimezoneRegion_Mexico->addSelection(currentitem); + else if ( tzonefile == "Indian") + HostTimezoneRegion_Indian->addSelection(currentitem); + else if ( tzonefile == "Europe") + HostTimezoneRegion_Europe->addSelection(currentitem); + else if ( tzonefile == "Etc") + HostTimezoneRegion_Etc->addSelection(currentitem); + else if ( tzonefile == "Chile") + HostTimezoneRegion_Chile->addSelection(currentitem); + else if ( tzonefile == "Canada") + HostTimezoneRegion_Canada->addSelection(currentitem); + else if ( tzonefile == "Brazil") + HostTimezoneRegion_Brazil->addSelection(currentitem); + else if ( tzonefile == "Australia") + HostTimezoneRegion_Australia->addSelection(currentitem); + else if ( tzonefile == "Atlantic") + HostTimezoneRegion_Atlantic->addSelection(currentitem); + else if ( tzonefile == "Asia") + HostTimezoneRegion_Asia->addSelection(currentitem); + else if ( tzonefile == "Arctic") + HostTimezoneRegion_Arctic->addSelection(currentitem); + else if ( tzonefile == "Antarctica") + HostTimezoneRegion_Antarctica->addSelection(currentitem); + else if ( tzonefile == "America") + HostTimezoneRegion_America->addSelection(currentitem); + else if ( tzonefile == "Africa") + HostTimezoneRegion_Africa->addSelection(currentitem); + } + } +}; + +void TimezoneRegion::timezone_gathersettings() +{ + QString tz; + QString subregion; + QString region=HostTimeZoneRegion->getValue(); + if ( region == "US") + subregion=HostTimezoneRegion_US->getValue(); + else if ( region == "Pacific") + subregion=HostTimezoneRegion_Pacific->getValue(); + else if ( region == "Mideast") + subregion=HostTimezoneRegion_Mideast->getValue(); + else if ( region == "Mexico") + subregion=HostTimezoneRegion_Mexico->getValue(); + else if ( region == "Indian") + subregion=HostTimezoneRegion_Indian->getValue(); + else if ( region == "Europe") + subregion=HostTimezoneRegion_Europe->getValue(); + else if ( region == "Etc") + subregion=HostTimezoneRegion_Etc->getValue(); + else if ( region == "Chile") + subregion=HostTimezoneRegion_Chile->getValue(); + else if ( region == "Canada") + subregion=HostTimezoneRegion_Canada->getValue(); + else if ( region == "Brazil") + subregion=HostTimezoneRegion_Brazil->getValue(); + else if ( region == "Australia") + subregion=HostTimezoneRegion_Australia->getValue(); + else if ( region == "Atlantic") + subregion=HostTimezoneRegion_Atlantic->getValue(); + else if ( region == "Asia") + subregion=HostTimezoneRegion_Asia->getValue(); + else if ( region == "Arctic") + subregion=HostTimezoneRegion_Arctic->getValue(); + else if ( region == "Antarctica") + subregion=HostTimezoneRegion_Antarctica->getValue(); + else if ( region == "America") + subregion=HostTimezoneRegion_America->getValue(); + else if ( region == "Africa") + subregion=HostTimezoneRegion_Africa->getValue(); + + tz=region+"/"+subregion; + emit mf_show_tz(tz); +} + +TimezoneRegion::TimezoneRegion(): + TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +{ + SetVertical(false); + HostTimeZoneRegion= new HostComboBox("HostTimeZoneRegion"); + timezoneregion_fillselection_zone(); + Setting* trigger = HostTimeZoneRegion; + addChild(trigger); + setTrigger(trigger); + //define all the new comboboxes + HostTimezoneRegion_US = new HostComboBox("HostTimezoneRegion_US"); + HostTimezoneRegion_Pacific = new HostComboBox("HostTimezoneRegion_Pacific"); + HostTimezoneRegion_Mideast = new HostComboBox("HostTimezoneRegion_Mideast"); + HostTimezoneRegion_Mexico = new HostComboBox("HostTimezoneRegion_Mexico"); + HostTimezoneRegion_Indian = new HostComboBox("HostTimezoneRegion_Indian"); + HostTimezoneRegion_Europe = new HostComboBox("HostTimezoneRegion_Europe"); + HostTimezoneRegion_Etc = new HostComboBox("HostTimezoneRegion_Etc"); + HostTimezoneRegion_Chile = new HostComboBox("HostTimezoneRegion_Chile"); + HostTimezoneRegion_Canada = new HostComboBox("HostTimezoneRegion_Canada"); + HostTimezoneRegion_Brazil = new HostComboBox("HostTimezoneRegion_Brazil"); + HostTimezoneRegion_Australia = new HostComboBox("HostTimezoneRegion_Australia"); + HostTimezoneRegion_Atlantic = new HostComboBox("HostTimezoneRegion_Atlantic"); + HostTimezoneRegion_Asia = new HostComboBox("HostTimezoneRegion_Asia"); + HostTimezoneRegion_Arctic = new HostComboBox("HostTimezoneRegion_Arctic"); + HostTimezoneRegion_Antarctica = new HostComboBox("HostTimezoneRegion_Antarctica"); + HostTimezoneRegion_America = new HostComboBox("HostTimezoneRegion_America"); + HostTimezoneRegion_Africa = new HostComboBox("HostTimezoneRegion_Africa"); + //fill the new comboboxes + timezoneregion_fillselection("US"); + timezoneregion_fillselection("Pacific"); + timezoneregion_fillselection("Mideast"); + timezoneregion_fillselection("Mexico"); + timezoneregion_fillselection("Indian"); + timezoneregion_fillselection("Europe"); + timezoneregion_fillselection("Etc"); + timezoneregion_fillselection("Chile"); + timezoneregion_fillselection("Canada"); + timezoneregion_fillselection("Brazil"); + timezoneregion_fillselection("Australia"); + timezoneregion_fillselection("Atlantic"); + timezoneregion_fillselection("Asia"); + timezoneregion_fillselection("Arctic"); + timezoneregion_fillselection("Antarctica"); + timezoneregion_fillselection("America"); + timezoneregion_fillselection("Africa"); + + // Add subregions to regions + addTarget("US", HostTimezoneRegion_US ); + addTarget("Pacific", HostTimezoneRegion_Pacific ); + addTarget("Mideast", HostTimezoneRegion_Mideast ); + addTarget("Mexico", HostTimezoneRegion_Mexico ); + addTarget("Indian", HostTimezoneRegion_Indian ); + addTarget("Europe", HostTimezoneRegion_Europe ); + addTarget("Etc", HostTimezoneRegion_Etc ); + addTarget("Chile", HostTimezoneRegion_Chile ); + addTarget("Canada", HostTimezoneRegion_Canada ); + addTarget("Brazil", HostTimezoneRegion_Brazil ); + addTarget("Australia", HostTimezoneRegion_Australia ); + addTarget("Atlantic", HostTimezoneRegion_Atlantic ); + addTarget("Asia", HostTimezoneRegion_Asia ); + addTarget("Arctic", HostTimezoneRegion_Arctic ); + addTarget("Antarctica", HostTimezoneRegion_Antarctica ); + addTarget("America", HostTimezoneRegion_America ); + addTarget("Africa", HostTimezoneRegion_Africa ); + //--single region + addTarget("Zulu", new VerticalConfigurationGroup(false, false)); + addTarget("WET", new VerticalConfigurationGroup(false, false)); + addTarget("W-SU", new VerticalConfigurationGroup(false, false)); + addTarget("Universal", new VerticalConfigurationGroup(false, false)); + addTarget("UTC", new VerticalConfigurationGroup(false, false)); + addTarget("UCT", new VerticalConfigurationGroup(false, false)); + addTarget("Turkey", new VerticalConfigurationGroup(false, false)); + addTarget("Singapore", new VerticalConfigurationGroup(false, false)); + addTarget("ROK", new VerticalConfigurationGroup(false, false)); + addTarget("ROC", new VerticalConfigurationGroup(false, false)); + addTarget("Portugal", new VerticalConfigurationGroup(false, false)); + addTarget("Poland", new VerticalConfigurationGroup(false, false)); + addTarget("PST8PDT", new VerticalConfigurationGroup(false, false)); + addTarget("PRC", new VerticalConfigurationGroup(false, false)); + addTarget("Navajo", new VerticalConfigurationGroup(false, false)); + addTarget("NZ-CHAT", new VerticalConfigurationGroup(false, false)); + addTarget("NZ", new VerticalConfigurationGroup(false, false)); + addTarget("MST7MDT", new VerticalConfigurationGroup(false, false)); + addTarget("MST", new VerticalConfigurationGroup(false, false)); + addTarget("MET", new VerticalConfigurationGroup(false, false)); + addTarget("Libya", new VerticalConfigurationGroup(false, false)); + addTarget("Kwajalein", new VerticalConfigurationGroup(false, false)); + addTarget("Japan", new VerticalConfigurationGroup(false, false)); + addTarget("Jamaica", new VerticalConfigurationGroup(false, false)); + addTarget("Israel", new VerticalConfigurationGroup(false, false)); + addTarget("Iran", new VerticalConfigurationGroup(false, false)); + addTarget("Iceland", new VerticalConfigurationGroup(false, false)); + addTarget("Hongkong", new VerticalConfigurationGroup(false, false)); + addTarget("HST", new VerticalConfigurationGroup(false, false)); + addTarget("Greenwich", new VerticalConfigurationGroup(false, false)); + addTarget("GMT0", new VerticalConfigurationGroup(false, false)); + addTarget("GMT-0", new VerticalConfigurationGroup(false, false)); + addTarget("GMT+0", new VerticalConfigurationGroup(false, false)); + addTarget("GMT", new VerticalConfigurationGroup(false, false)); + addTarget("GB-Eire", new VerticalConfigurationGroup(false, false)); + addTarget("GB", new VerticalConfigurationGroup(false, false)); + addTarget("Factory", new VerticalConfigurationGroup(false, false)); + addTarget("Eire", new VerticalConfigurationGroup(false, false)); + addTarget("Egypt", new VerticalConfigurationGroup(false, false)); + addTarget("EST5EDT", new VerticalConfigurationGroup(false, false)); + addTarget("EST", new VerticalConfigurationGroup(false, false)); + addTarget("EET", new VerticalConfigurationGroup(false, false)); + addTarget("Cuba", new VerticalConfigurationGroup(false, false)); + addTarget("CST6CDT", new VerticalConfigurationGroup(false, false)); + addTarget("CET", new VerticalConfigurationGroup(false, false)); +}; + +void TimezoneRegion::update_timezone_values(QString Gtimezone) +{ + QString region; + QString subregion; + region=Gtimezone.section('/',0,0); + subregion=Gtimezone.section('/',1,1); + HostTimeZoneRegion->setValue(region); + + if ( region == "US") + HostTimezoneRegion_US->setValue(subregion); + else if ( region == "Pacific") + HostTimezoneRegion_Pacific->setValue(subregion); + else if ( region == "Mideast") + HostTimezoneRegion_Mideast->setValue(subregion); + else if ( region == "Mexico") + HostTimezoneRegion_Mexico->setValue(subregion); + else if ( region == "Indian") + HostTimezoneRegion_Indian->setValue(subregion); + else if ( region == "Europe") + HostTimezoneRegion_Europe->setValue(subregion); + else if ( region == "Etc") + HostTimezoneRegion_Etc->setValue(subregion); + else if ( region == "Chile") + HostTimezoneRegion_Chile->setValue(subregion); + else if ( region == "Canada") + HostTimezoneRegion_Canada->setValue(subregion); + else if ( region == "Brazil") + HostTimezoneRegion_Brazil->setValue(subregion); + else if ( region == "Australia") + HostTimezoneRegion_Australia->setValue(subregion); + else if ( region == "Atlantic") + HostTimezoneRegion_Atlantic->setValue(subregion); + else if ( region == "Asia") + HostTimezoneRegion_Asia->setValue(subregion); + else if ( region == "Arctic") + HostTimezoneRegion_Arctic->setValue(subregion); + else if ( region == "Antarctica") + HostTimezoneRegion_Antarctica->setValue(subregion); + else if ( region == "America") + HostTimezoneRegion_America->setValue(subregion); + else if ( region == "Africa") + HostTimezoneRegion_Africa->setValue(subregion); +} + +/* +//________________Misc (NFS) Screen SETTINGS_________________________ +static HostComboBox *HostHaveCentralNFS() +{ + HostComboBox *gc = new HostComboBox("HostHaveCentralNFS"); + gc->setLabel(QObject::tr("Central NFS server")); + gc->addSelection("no"); + gc->addSelection("yes") ; + gc->setHelpText(QObject::tr("Select yes, if your media is stored on an NFS server different than the masterbackend. Say no if you are confused.")); + + return gc; +} + +static HostComboBox *HostCentralNFSIP() +{ + HostComboBox *gc = new HostComboBox("HostCentralNFSIP",true); + gc->setLabel(QObject::tr("NFS server and sharename ")); + gc->setHelpText(QObject::tr("Format should be IP:/SHARENAME, for example 192.168.1.6:/media. file:nfsmap will load shares from the nfsmap file")); + gc->addSelection("file:nfsmap") ; + gc->addSelection("") ; + return gc; +}; + +static HostComboBox *HostNFSmountpoint() +{ +#ifdef __MVAPP__ + HostComboBox *gc = new HostComboBox("HostNFSmountpoint"); + gc->addSelection("/data/media"); +#else + HostComboBox *gc = new HostComboBox("HostNFSmountpoint",true); + gc->addSelection("/myth"); +#endif + gc->setLabel(QObject::tr("Local mount point of NFS share")); + gc->addSelection("/mnt") ; + gc->setHelpText(QObject::tr("")); + return gc; +} + + +NFSSettings::NFSSettings(): + TriggeredConfigurationGroup(false,false,false,true,true,false,false,true) +{ + setLabel(QObject::tr("Misc Settings")); + + Setting* havenfs = HostHaveCentralNFS(); + addChild(havenfs); + setTrigger(havenfs); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(); + settings->addChild(HostCentralNFSIP()); + settings->addChild(HostNFSmountpoint()); + + addTarget("no", new VerticalConfigurationGroup()); + addTarget("yes", settings); +}; +*/ diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h new file mode 100755 index 0000000..325fc0e --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/misc_settings.h @@ -0,0 +1,97 @@ +#include <mythcontext.h> +#include <unistd.h> +#include <iostream> +#include <fstream> +#include <stdio.h> +#include "settings.h" +#include "installsettings.h" +#include <qsqldatabase.h> +#include <qsqlquery.h> + +#include <stdlib.h> +#include <cstdlib> +#include <mythtv/mythdbcon.h> +#include <qdir.h> +#include <qapplication.h> +#include "mythmiscutil.h" + + +class MiscMainFrame: public VerticalConfigurationGroup { + Q_OBJECT +public: + MiscMainFrame(); + QTimer *autoLaunchTimer; + +public slots: + QString mf_show_tz(QString); + +signals: + void update_timezone(QString); +}; + +class MiscMainFrame2: public VerticalConfigurationGroup { + Q_OBJECT +public: + MiscMainFrame2(); +}; + +/* +class TimezoneButton: public VerticalConfigurationGroup { + Q_OBJECT +public: + TimezoneButton(); + TransButtonSetting *TZButton; + void disableButton(); +public slots: + void launch_tzgui(); +signals: + QString mf_launch_tzgui(); + +}; +*/ +class TimezoneRegion: public TriggeredConfigurationGroup { + Q_OBJECT +public: + TimezoneRegion(); + HostComboBox *HostTimeZoneRegion; + HostComboBox *HostTimezoneRegion_US; + HostComboBox *HostTimezoneRegion_Pacific; + HostComboBox *HostTimezoneRegion_Mideast; + HostComboBox *HostTimezoneRegion_Mexico; + HostComboBox *HostTimezoneRegion_Indian; + HostComboBox *HostTimezoneRegion_Europe; + HostComboBox *HostTimezoneRegion_Etc; + HostComboBox *HostTimezoneRegion_Chile; + HostComboBox *HostTimezoneRegion_Canada; + HostComboBox *HostTimezoneRegion_Brazil; + HostComboBox *HostTimezoneRegion_Australia; + HostComboBox *HostTimezoneRegion_Atlantic; + HostComboBox *HostTimezoneRegion_Asia; + HostComboBox *HostTimezoneRegion_Arctic; + HostComboBox *HostTimezoneRegion_Antarctica; + HostComboBox *HostTimezoneRegion_America; + HostComboBox *HostTimezoneRegion_Africa; + void timezoneregion_fillselection(QString); + void timezoneregion_fillselection_zone(); + + +public slots: + void update_timezone_values(QString); + void timezone_gathersettings(); +signals: + void mf_show_tz(QString); +}; + +/* +class NFSSettings: public + TriggeredConfigurationGroup { +public: + NFSSettings(); + +};*/ + + + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h b/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h new file mode 100755 index 0000000..720655c --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mv_common.h @@ -0,0 +1,5 @@ +//#define __MVAPP__ LinHES +#define RELEASEFILE "LinHES-release" + +extern int timezone_unknown; + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro new file mode 100755 index 0000000..225d755 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/mythinstall.pro @@ -0,0 +1,55 @@ +#This is the path to the mythtv src + + + +PREFIX = /usr/include/mythtv +LIBVERSION = 0.27 +VERSION = 0.27.0 + + + + +INCLUDEPATH += $$PREFIX/libmythui $$PREFIX $$PREFIX/libmyth + +LIBS += -L /usr/local/lib + + + +LIBS += -lmythtv-$$LIBVERSION +#LIBS += -lmythdb-$$LIBVERSION +LIBS += -lmythui-$$LIBVERSION +LIBS += -lmyth-$$LIBVERSION +LIBS+= -lmythbase-$$LIBVERSION + + + +mingw { + LIBS += -lpthread + CONFIG += console +} + +TEMPLATE = app +CONFIG += thread +TARGET = mythinstall +target.path = $${PREFIX}/bin + +INSTALLS = target + +uifiles.path = $${PREFIX}/share/mythtv/themes/default +uifiles.files = install-ui.xml images/*.png + +INSTALLS += uifiles + +QMAKE_CLEAN += $(TARGET) + +# Input +//HEADERS += commandlineparser.h +//SOURCES += main.cpp commandlineparser.cpp + +HEADERS += installdialog.h commandlineparser.h installsettings.h settemplate.h installationtype.h autocard.h xorgsettings.h password_manage.h misc_settings.h mv_common.h infrared.h compat-mv.h supplemental.h vnc.h fileshare.h +SOURCES += main.cpp commandlineparser.cpp installdialog.cpp installsettings.cpp settemplate.cpp installationtype.cpp autocard.cpp xorgsettings.cpp password_manage.cpp misc_settings.cpp infrared.cpp compat-mv.cpp supplemental.cpp vnc.cpp fileshare.cpp + + +#The following line was inserted by qt3to4 +QT += qt3support sql xml network + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp new file mode 100755 index 0000000..ed7d369 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.cpp @@ -0,0 +1,436 @@ +#include <unistd.h> +#include "password_manage.h" +//Added by qt3to4: +#include <Q3TextStream> + +#include <qapplication.h> +#include "mythmiscutil.h" +#include "mythsystemlegacy.h" + +#include <qdir.h> +#include <iostream> + +/****************************************************************************/ +typedef enum { + UseraddPopup_OK = 0, + UseraddPopup_CANCEL, + UseraddPopup_DELETE +} +UseraddPopupResult; +bool passtoggle = TRUE; +QString invalid_chars = "&<>/~`;:!"; + +class AddUserPopup +{ +public: + static UseraddPopupResult showPopup(MythMainWindow *parent, QString title, + QString message, QString& text); +}; + +UseraddPopupResult AddUserPopup::showPopup(MythMainWindow *parent, + QString title, QString message, QString& text) +{ + MythPopupBox *popup = new MythPopupBox(parent, title); + popup->addLabel(message); + + MythLineEdit *textEdit = new MythLineEdit(popup, "chooseEdit"); + textEdit->setText(text); + popup->addWidget(textEdit); + + popup->addButton(QObject::tr("OK"), popup, SLOT(accept())); + popup->addButton(QObject::tr("Cancel"), popup, SLOT(reject())); + + textEdit->setFocus(); + + bool ok = (MythDialog::Accepted == popup->ExecPopup()); + if (ok) + text = textEdit->text(); + popup->hide(); + popup->deleteLater(); + return (ok) ? UseraddPopup_OK : UseraddPopup_CANCEL; +} + +/****************************************************************************/ + + +void UserManagement::user_fillselection() +{ + //only add users with UID above 1000 + QString line; + QString user; + QString quid; + int uid; + QFile file("/etc/passwd"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + user = line.section(":",0,0); + quid = line.section(":",2,2); + uid=quid.toInt(); + if ( uid >= 1000 ) + userlist->addSelection(user); + } + file.close(); + } + +} + +bool UserManagement::user_exisit_check(QString name) +{ + QString line; + QString user; + QString quid; + bool founduser; + founduser=false; + int uid; + QFile file("/etc/passwd"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + user = line.section(":",0,0); + quid = line.section(":",2,2); + uid=quid.toInt(); + if ( user == name ) + { + founduser=true; + break; + } + } + file.close(); + } + + return founduser; + +} + +bool UserManagement::user_valid_check(QString check_string) +{ + QChar current_char; + int upperlimit; + bool found_char; + int i ; + upperlimit = invalid_chars.length() -1 ; + for(i= 0; i <= upperlimit; i++) + { + found_char = FALSE; + current_char = invalid_chars.at(i); + found_char = check_string.contains(current_char,FALSE); + if ( found_char ) + return FALSE; + } + return TRUE ; + +} + +UserManagement::UserManagement(): + VerticalConfigurationGroup(false,false,false,false) +{ + setLabel(QObject::tr("User Accounts")); + userlist = new TransComboBoxSetting(false); + userlist->setLabel(QObject::tr("User")); + userlist->addSelection("root"); + userlist->addSelection("mythtv"); + user_fillselection(); + userlist->setHelpText(QObject::tr("Select the user to change the user password or delete the user account.")); + + userpass1= new TransLineEditSetting(true); + userpass1->setLabel("Password"); + userpass1->SetPasswordEcho(passtoggle); + userpass1->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + + + passToggleButton = new TransButtonSetting; + passToggleButton->setLabel("Toggle Password View"); + passToggleButton->setHelpText(QObject::tr("Hide or show the password.")); + + info = new TransLabelSetting; + info->setValue(""); + + userapplyButton = new TransButtonSetting; + userapplyButton->setLabel("Apply New Password"); + + usercreateButton = new TransButtonSetting; + usercreateButton->setLabel("Create New User Account"); + usercreateButton->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + + userdeleteButton = new TransButtonSetting; + userdeleteButton->setLabel("Delete User Account"); + ConfigurationGroup *buttonlist = new GridConfigurationGroup(2,false,false); + buttonlist-> addChild(passToggleButton); + buttonlist-> addChild(userapplyButton); + buttonlist-> addChild(usercreateButton); + buttonlist-> addChild(userdeleteButton); + +// ConfigurationGroup *buttonlist2 = new GridConfigurationGroup(2,false); +// buttonlist2-> addChild(passToggleButton); +// buttonlist2-> addChild(userapplyButton); + + rootSSH = new HostCheckBox("HOSTrootSSH"); + rootSSH->setLabel("Enable remote access for the root user account"); + rootSSH->setHelpText(QObject::tr("If checked, ssh for the root account will be enabled. If you are unsure leave this unchecked.")); + rootSSH->setValue(false); + + addChild(userlist); + addChild(userpass1); + addChild(rootSSH); +// addChild(buttonlist2); + addChild(buttonlist); + addChild(info); + + connect(userapplyButton, SIGNAL(pressed()), this, SLOT(applychanges())); + connect(userlist, SIGNAL(valueChanged(const QString&)), this, SLOT(userchanged())); + connect(usercreateButton, SIGNAL(pressed()), this, SLOT(usercreatepopup())); + connect(userdeleteButton, SIGNAL(pressed()), this, SLOT(userdeletepopup())); + connect(passToggleButton, SIGNAL(pressed()), this, SLOT(togglepass())); +}; + +void UserManagement::togglepass() +{ + if ( passtoggle) + passtoggle = false; + else + passtoggle = true; + + userpass1->SetPasswordEcho(passtoggle); +} + +void UserManagement::applychanges() +{ + QString user; + QString password; + QString user_e; + + user=userlist->getValue(); + password=userpass1->getValue(); + + user_e = QRegExp::escape( user ); + password = QRegExp::escape( password ); + if ( ! user_valid_check (password)) + { + info->setValue("ERROR: The password contains invalid characters!"); + return; + } + info->setValue("The password has been changed for user " + user + "."); + QString cmdtxt; + cmdtxt="sudo "; + cmdtxt.append("myth_user_call -c pass -u " + user_e + " -p " + password ); + myth_system(cmdtxt); +} + +void UserManagement::userchanged() +{ + info->setValue(" "); + userpass1->setValue(""); +} + +void UserManagement::usercreatepopup() +{ + QString name; + QString name_e; + int key = 0; + UseraddPopupResult result = AddUserPopup::showPopup( + GetMythMainWindow(), + tr(""), + tr("Enter New User Name"), name); + if (result == UseraddPopup_CANCEL) + return; + //check if name exisit || add it + if ( user_exisit_check(name) ) + { + info->setValue("User name " + name + " already exists. Cannot create user."); + userlist->setFocus(); + key = Qt::Key_Down; + QApplication::postEvent(GetMythMainWindow(), + new ExternalKeycodeEvent(key)); + + return; + } + + if ( ! user_valid_check (name)) + { + info->setValue("ERROR: The user name contains invalid characters!"); + return; + } + userlist->addSelection(name); + userlist->setValue(name); + //run program to add user right here + QString cmdtxt; + name_e = QRegExp::escape( name ); + + cmdtxt="sudo "; + cmdtxt.append("myth_user_call -c add -u " + name_e ); + myth_system(cmdtxt); + + info->setValue("Enter a password for " + name + " and press Apply New Password."); + //Set focus to userlist, then press down three times to set focus to the password box. + userlist->setFocus(); + + key = Qt::Key_Down; + QApplication::postEvent(GetMythMainWindow(), + new ExternalKeycodeEvent(key)); + key = Qt::Key_Down; + QApplication::postEvent(GetMythMainWindow(), + new ExternalKeycodeEvent(key)); + key = Qt::Key_Down; + QApplication::postEvent(GetMythMainWindow(), + new ExternalKeycodeEvent(key)); + +} + +void UserManagement::userdeletepopup() +{ + QString user; + QString user_e; + user=userlist->getValue(); + QString message = "Remove " + user + "?" ; + + DialogCode value = MythPopupBox::Show2ButtonPopup( + GetMythMainWindow(), "", message, + tr("Remove User"), + tr("Do NOT Remove User"), + kDialogCodeButton1); + + if (kDialogCodeButton0 == value) + { + info->setValue("Removed user: " + user); + if ( user == "root" || user == "mythtv" ) + { + info->setValue("Cannot remove user: " + user); + return; + } + userlist->setValue("root"); + userlist->removeSelection(user); + //run program to remove user + QString cmdtxt; + user_e = QRegExp::escape( user ); + cmdtxt="sudo "; + cmdtxt.append("myth_user_call -c delete -u " + user_e ); + myth_system(cmdtxt); + info->setValue("Removed user: " + user); + } + else + info->setValue("Did not remove user: " + user); +} + +WebPassword::WebPassword(): + TriggeredConfigurationGroup(false,false,true,true,true,true,true,true) +{ + webAuth = new HostCheckBox("HOSTwebauth"); + webAuth->setLabel("Enable Password"); + webAuth->setHelpText(QObject::tr("Use password protection for the local website.")); + webAuth->setValue(false); + webuser = new HostLineEdit("Hostwebuser"); + webuser->setLabel("Username"); + webuser->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + + webpassword = new HostLineEdit("Hostwebpassword"); + webpassword->setLabel("Password"); + webpassword->SetPasswordEcho(passtoggle); + webpassword->setHelpText(QObject::tr("The following characters will not be accepted: " + invalid_chars)); + + webpassToggleButton = new TransButtonSetting; + webpassToggleButton->setLabel("Toggle Password View"); + webpassToggleButton->setHelpText(QObject::tr("Hide or show the password.")); + + webapplyButton = new TransButtonSetting; + webapplyButton->setLabel("Apply New Password"); + + info = new TransLabelSetting; + info->setValue(""); + + connect(webpassToggleButton, SIGNAL(pressed()), this, SLOT(togglepass())); + connect(webapplyButton, SIGNAL(pressed()),this , SLOT(webpassword_gathersettings())); + + ConfigurationGroup* webpassgroup = new VerticalConfigurationGroup(false,false); + webpassgroup->addChild(webuser); + webpassgroup->addChild(webpassword); + webpassgroup->addChild(info); + webpassgroup->addChild(webpassToggleButton); + webpassgroup->addChild(webapplyButton); + + addChild(webAuth); + setTrigger(webAuth); + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", webpassgroup); + +} + + +void WebPassword::togglepass() +{ + if ( passtoggle) + passtoggle = false; + else + passtoggle = true; + webpassword->SetPasswordEcho(passtoggle); +} + +bool WebPassword::valid_check(QString check_string) +{ + // QString invalid_chars; + QChar current_char; + int upperlimit; + bool found_char; + int i ; + //invalid_chars = "&<>/~`;"; + upperlimit = invalid_chars.length() -1 ; + for(i= 0; i <= upperlimit; i++) + { + found_char = FALSE; + current_char = invalid_chars.at(i); + found_char = check_string.contains(current_char,FALSE); + if ( found_char ) + return FALSE; + } + return TRUE ; + +} + +void WebPassword::webpassword_gathersettings() +{ + + QString pass_enabled; + QString web_user; + QString web_pass; + QString webuser_e; + QString webpass_e; + pass_enabled=webAuth->getValue(); + web_user=webuser->getValue(); + web_pass=webpassword->getValue(); + webuser_e = QRegExp::escape( web_user ); + webpass_e = QRegExp::escape( web_pass ); + if ( ! valid_check (webuser_e)) + { + info->setValue("ERROR: The user name contains invalid characters!"); + return; + } + + if ( ! valid_check (webpass_e)) + { + info->setValue("ERROR: The password contains invalid characters!"); + return; + } + cout << "Running program to make the changes for web password" << endl; + QString cmdtxt; + + cmdtxt="sudo "; + cmdtxt.append("myth_user_call -c web -u " + webuser_e + " -p " + webpass_e ); + myth_system(cmdtxt); + info->setValue("The user name and password have been added."); + +} + +WebPasswordFrame::WebPasswordFrame(): + VerticalConfigurationGroup(false,false) + { + setLabel(QObject::tr("Web Security Settings")); + WebPassword *webpassword = new WebPassword(); + addChild(webpassword); + } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h new file mode 100755 index 0000000..3b4b471 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/password_manage.h @@ -0,0 +1,60 @@ +#include <settings.h> +#include "mythdialogs.h" +#include "libmyth/mythdialogs.h" +#include "libmyth/mythwidgets.h" +#include "installsettings.h" + + +class UserManagement: public VerticalConfigurationGroup { + Q_OBJECT +public: + UserManagement(); + TransComboBoxSetting *userlist; + TransLineEditSetting *userpass1; + TransButtonSetting *userapplyButton; + TransButtonSetting *usercreateButton; + TransButtonSetting *userdeleteButton; + TransButtonSetting *passToggleButton; + TransLabelSetting *info; + TransCheckBoxSetting *lockaccount; + HostCheckBox *rootSSH; + void user_fillselection(void); + bool user_exisit_check(QString); + bool user_valid_check(QString); + +public slots: + void applychanges(); + void userchanged(); + void usercreatepopup(); + void userdeletepopup(); + void togglepass(); +}; + + + +class WebPassword: public + TriggeredConfigurationGroup { + Q_OBJECT +public: + WebPassword(); + HostLineEdit *webuser; + HostLineEdit *webpassword; + HostCheckBox *webAuth; + TransButtonSetting *webpassToggleButton; + TransLabelSetting *info; + bool valid_check(QString); + TransButtonSetting *webapplyButton; + +public slots: + void webpassword_gathersettings(); + void togglepass(); +}; + +class WebPasswordFrame: public + VerticalConfigurationGroup { + Q_OBJECT +public: + WebPasswordFrame(); + TransButtonSetting *webapplyButton; + +}; diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp new file mode 100755 index 0000000..f7f9963 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.cpp @@ -0,0 +1,409 @@ +#include <mythcontext.h> +#include "installsettings.h" +#include "settemplate.h" +#include <stdlib.h> + + +void create_temp_table (QString create_table_name,QString like_name) +{ + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("create table " + create_table_name + " like " + like_name + ";" ); + query.exec(); + if ( like_name == "settings") + { + query.prepare("Alter table " + create_table_name + " add unique ( value ) ; " ); + query.exec(); + } + query.prepare(" truncate " + create_table_name + ";" ); + query.exec(); +}; + +void drop_temp_table (QString tname) +{ + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare("drop table " + tname + ";" ); + query.exec(); +} + +void restart_frontend () +{ + + QString cmdtxt; + cmdtxt=MV_ROOT ; + cmdtxt.append("bin/systemconfig.sh reloadfe" ); + //cout << "Calling systemconfig.sh reloadfe" << endl; + system(cmdtxt); + //system("/root/systemconfig.sh reloadfe" ); +} + +void choosetemplate (QString templateop, QString templatename , QString templatehostname = "") +{ + if ( templateop == "" ) + { + MythCtemplate setting; +// setting.load(); +// setting.save(); + setting.exec(); + }; + + QString thistemplate; + QString thisoperation; + QString thishost; + //QString runcommand = "/root/restore_default_settings.sh"; + QString runcommand = "echo "; + // //cout << templateop << endl; + // //cout << templatename << endl; + // //cout << templatehostname << endl; + + if (templateop == "") + thisoperation = gCoreContext->GetSetting("HOSTtemplatetype"); + else + thisoperation = templateop; + + thistemplate = "none"; + + + if ( thisoperation == "save" ) + { + if (templatename == "" ) + thistemplate = gCoreContext->GetSetting("HostTemplateSave"); + else + thistemplate = templatename; + + savesettings(thistemplate); + } + else if ( thisoperation == "restore" ) + { + if (templatename == "" ) + thistemplate = gCoreContext->GetSetting("HostTemplateRestore"); + else + thistemplate = templatename; + + if ( thistemplate == "default_1") + c_from("default_1" , thistemplate); + else if ( thistemplate == "default_2") + c_from("default_2" ,thistemplate); + else + restoresettings(thistemplate); + + } + else if ( thisoperation == "copy_from" ) + { + if (templatename == "" ) + { + thishost = gCoreContext->GetSetting("HostSelectcopy_from"); + thistemplate = gCoreContext->GetSetting("HostTemplateRestore"); + } + else + { + thishost=templatehostname; + thistemplate=templatename; + }; + + c_from(thishost,thistemplate); + } + + +// if ( thistemplate != "none" ) +// { +// std:://cout << runcommand << endl; + // system(runcommand); + //} +}; + + +void savesettings (QString templatenumber ) +{ + //cout << "SAVING....." << templatenumber << endl; + QString templatename = "settings_" + templatenumber ; + // Remove old saved values + MSqlQuery query(MSqlQuery::InitCon()); + query.prepare( "delete from " + templatename + " where hostname=:HOSTNAME ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + //insert all new settings + query.prepare( "replace into " + templatename + " (select * from settings where hostname=:HOSTNAME ) ;" ) ; + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + // repeat for keybindings + templatename = "keybindings_" + templatenumber ; + query.prepare( "delete from " + templatename + " where hostname=:HOSTNAME ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + query.prepare( "replace into " + templatename + " (select * from keybindings where hostname=:HOSTNAME ) ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + +} + +void restoresettings (QString templatenumber ) +{ +//cout << "RESTORING....." << templatenumber << endl; +// DEFAULT settings are handled by the copy from routine + MSqlQuery query(MSqlQuery::InitCon()); + QStringList tablelist ; + QStringList::Iterator it; + QString current_table; + tablelist.append ("settings"); + tablelist.append ("keybindings"); + QString templatename; + + for ( it = tablelist.begin(); it != tablelist.end(); ++it ) + { + current_table = *it ; + //find template table to use + QString templatename = current_table + "_" + templatenumber ; + QString temptable="temp_table_" + current_table + "_" + gCoreContext->GetHostName() ; + // create temp table for merging settings, The merge is needed to ac//coutn for any new settings. + create_temp_table(temptable, current_table ); + + // copy in current settings + query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME ) ; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + // need to remove all non HOST settigns + + // copy in stored settings + query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME ) ; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + // remove current settings. Need to remove because the old table allows for duplicates and replace into doesn' seem to "replace" + query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + + // copy new settings from temp to current + query.prepare( "replace into " + current_table + " (select * from " + temptable + " );" ); + query.exec(); + + // drop temptable + drop_temp_table(temptable); + + } + restart_frontend(); +}; + +void c_from(QString copyhost, QString templatenumber) +{ + //cout << "Copying....." + copyhost + " " + "templatenumber" << endl; + MSqlQuery query(MSqlQuery::InitCon()); + //Create temp table, copy in settings from host_template, update hostname for new host,copy temp_table to settings. + QStringList tablelist ; + QStringList::Iterator it; + QString current_table ; + tablelist.append ("settings"); + tablelist.append ("keybindings"); + QString templatename; + QString temptable; + for ( it = tablelist.begin(); it != tablelist.end(); ++it ) + { + current_table = *it ; + //cout << current_table << endl; + //find template table to use + if ( templatenumber == "Current" ) + templatename = current_table ; + else + templatename = current_table + "_" + templatenumber ; + + temptable="temp_table_" + current_table + "_" + gCoreContext->GetHostName() ; + // create temp table for merging settings + + create_temp_table(temptable, current_table ); + //cout << temptable + " " + current_table << endl; + + // copy current settings from this host into temptable minus all Mythvantage settings + if ( current_table == "settings") + { + query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME and value not like 'HOST%' ) ; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + } + else + query.prepare( "replace into " + temptable + " (select * from " + current_table + " where hostname=:HOSTNAME ) ; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + // update hostname to match whatever the hostname of the template is + query.prepare ("update " + temptable + " set hostname=:HOSTNAME ; " ); + query.bindValue( ":HOSTNAME" , copyhost ); + query.exec(); + + // copy current settings from copy host into temptable minus all Mythvantage settings + if ( current_table == "settings") + query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME and value not like 'HOST%' ) ; " ); + + else + query.prepare( "replace into " + temptable + " (select * from " + templatename + " where hostname=:HOSTNAME ) ; " ); + + query.bindValue( ":HOSTNAME" , copyhost ); + query.exec(); + + //update hostname + query.prepare ("update " + temptable + " set hostname=:HOSTNAME ; " ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + query.exec(); + + // delete old settings from settings table + if ( current_table == "settings") + { + query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME and value not like 'HOST%' ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + } + else + { + query.prepare( "delete from " + current_table + " where hostname=:HOSTNAME ;" ); + query.bindValue( ":HOSTNAME" , gCoreContext->GetHostName() ); + } + query.exec(); + + // copy settings from temptable to settings + if ( current_table == "settings") + query.prepare( "replace into " + current_table + " (select * from " + temptable + " where value not like 'HOST% ' ) ;" ); + else + query.prepare( "replace into " + current_table + " (select * from " + temptable + " );" ); + + + query.exec(); + + // drop temptable + // drop_temp_table(temptable); + + + restart_frontend(); + }; + + +}; + + + + +static HostComboBox *HOSTtemplatetype() +{ + HostComboBox *gc = new HostComboBox("HOSTtemplatetype"); + gc->setLabel(QObject::tr("Template options")); + gc->addSelection("Do Nothing") ; + gc->addSelection("restore"); + gc->addSelection("save") ; + gc->addSelection("copy_from"); + + gc->setHelpText(QObject::tr("Select the name to save, this will make a copy of your keybindings and videoplayback. Choose none if you do not wish to change anything.")); + + return gc; +} + +static HostComboBox *HostTemplateSave() +{ + HostComboBox *gc = new HostComboBox("HostTemplateSave"); + gc->setLabel(QObject::tr("Save Template")); +// gc->addSelection("none"); + gc->addSelection("user1") ; + gc->addSelection("user2") ; + gc->addSelection("user3") ; + gc->setHelpText(QObject::tr("Select the name to save, this will make a copy of your keybindings and videoplayback. Choose none if you do not wish to change anything.")); + + return gc; +} +static HostComboBox *HostTemplateCopy_restore() +{ + HostComboBox *gc = new HostComboBox("HostTemplateRestore"); + gc->setLabel(QObject::tr("Template")); + // gc->addSelection("none"); + gc->addSelection("Current"); + gc->addSelection("user1") ; + gc->addSelection("user2") ; + gc->addSelection("user3") ; + gc->setHelpText(QObject::tr("Select the template you wish to restore. This will change the way Myth repsonds to you remote buttons. Choose none if you do not wish to change anything.")); + + return gc; +} + +static HostComboBox *HostTemplateRestore() +{ + HostComboBox *gc = new HostComboBox("HostTemplateRestore"); + gc->setLabel(QObject::tr("Template")); + // gc->addSelection("none"); + gc->addSelection("default_1"); + gc->addSelection("default_2"); + gc->addSelection("user1") ; + gc->addSelection("user2") ; + gc->addSelection("user3") ; + gc->setHelpText(QObject::tr("Select the template you wish to restore. This will change the way Myth repsonds to you remote buttons. Choose none if you do not wish to change anything.")); + + return gc; +} + +static HostComboBox *HostSelectcopy_from() +{ + HostComboBox *gc = new HostComboBox("HostSelectcopy_from"); + gc->setLabel(QObject::tr("Host")); + // gc->addSelection("none"); + + QString tempItem; + + MSqlQuery query(MSqlQuery::InitCon()); + + query.prepare( "SELECT DISTINCT hostname from settings where hostname is not null;"); + + if (query.exec() && query.isActive() && query.size() > 0) + { + while (query.next()) + { + tempItem = query.value(0).toString(); + gc->addSelection(tempItem); + + } + } + gc->setHelpText(QObject::tr("Select the Host you wish to copy settings from.")); + + return gc; +} + +class TemplateSettings: + public TriggeredConfigurationGroup { +public: + TemplateSettings(): + //ConfigurationGroup(false, true, false, false), + //VerticalConfigurationGroup(false, true, false, false), + TriggeredConfigurationGroup(true) { + setLabel(QObject::tr("Manage templates")); +// setUseLabel(false); + + Setting* Mtemplate = HOSTtemplatetype(); + addChild(Mtemplate); + setTrigger(Mtemplate); + + + ConfigurationGroup* trestore = new VerticalConfigurationGroup(false); + trestore->addChild(HostTemplateRestore()); + + ConfigurationGroup* tsave = new VerticalConfigurationGroup(false); + tsave->addChild(HostTemplateSave()); + + ConfigurationGroup* tcopy = new VerticalConfigurationGroup(false); + tcopy->addChild(HostSelectcopy_from()); + tcopy->addChild(HostTemplateCopy_restore()); + + + addTarget("Do Nothing", new VerticalConfigurationGroup(true)); + addTarget("restore", trestore); + addTarget("save", tsave); + addTarget("copy_from", tcopy); + + }; +}; + +MythCtemplate::MythCtemplate() +{ + + TemplateSettings *templatesettings = new TemplateSettings(); + addChild(templatesettings); + +} + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h new file mode 100755 index 0000000..a730cf5 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/settemplate.h @@ -0,0 +1,13 @@ +#include <settings.h> +#include "mythdialogs.h" + +class MythCtemplate: public ConfigurationWizard { +public: + MythCtemplate(); + +}; + +void choosetemplate(QString,QString,QString); +void savesettings(QString); +void restoresettings(QString); +void c_from(QString , QString="current" ); diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp new file mode 100755 index 0000000..26d83ee --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.cpp @@ -0,0 +1,92 @@ +#include <unistd.h> +#include "misc_settings.h" +#include "mv_common.h" +//Added by qt3to4: +#include <Q3TextStream> +#include "mythuihelper.h" + +#include "supplemental.h" + + +using namespace std; + +extern HostParms hostparm; +static HostComboBox *HostWindowManager() +{ + HostComboBox *gc = new HostComboBox("HostWindowManager"); + gc->setLabel(QObject::tr("WindowManger")); + gc->addSelection("enlightenment"); + gc->addSelection("fluxbox"); + gc->addSelection("windowmaker"); + gc->setValue("enlightenment"); + gc->setHelpText(QObject::tr("Windowmanager to use. Most people will want to use the default of enlightenment")); + return gc; +} + +WindowManager_settings::WindowManager_settings(): + TriggeredConfigurationGroup(false, false, true, true,false, false, true, true) { + Setting* trigger = HostWindowManager() ; + addChild(trigger); + setTrigger(trigger); + + QString systemtype = gCoreContext->GetSetting("HostSystemType"); + QString runfe = gCoreContext->GetSetting("HostRunFrontend"); + + + + HostSupplemental = new HostCheckBox("HOSTSupplemental"); + HostSupplemental->setLabel("Install supplemental package"); + HostSupplemental->setHelpText(QObject::tr("Checking this will enable xymon and an alternate local website .")); + HostSupplemental->setValue(true); + + + HostEnhancedWMStyle = new HostCheckBox("HostEnhancedWMStyle"); + HostEnhancedWMStyle->setLabel(QObject::tr("Use Enhanced Sytle")); + HostEnhancedWMStyle->setHelpText(QObject::tr("Enhanced will change the startup behaviour of Mythtv and messages. Checking enhanced will also install supplemental")); + HostEnhancedWMStyle->setValue(true); + + + + connect(HostEnhancedWMStyle, SIGNAL(valueChanged(bool)), + this, SLOT(change_supplemental(bool))); + + + ConfigurationGroup* blanksettings = new GridConfigurationGroup(2,true); + ConfigurationGroup* settings = new GridConfigurationGroup(2,true); + settings->addChild(HostEnhancedWMStyle); +// if ( systemtype == "Master_backend" || systemtype == "Standalone" ) +// settings->addChild(HostSupplemental); + + addTarget("enlightenment", settings); + addTarget("windowmaker", settings ); + addTarget("fluxbox", settings); + }; +//}; + +void WindowManager_settings::change_supplemental(bool newvalue) +{ + if ( newvalue == true ) + HostSupplemental->setValue(true); +} + + +Supplementalhostsettings::Supplementalhostsettings(): + VerticalConfigurationGroup(false,false,false,false) + { + WindowManager_settings *wmsettings = new WindowManager_settings(); + QString systemtype = gCoreContext->GetSetting("HostSystemType"); + QString runfe = gCoreContext->GetSetting("HostRunFrontend"); + if (systemtype == "Standalone" || runfe == "1" ) + addChild(wmsettings); + +// HostComboBox *HostAudiotype; +// HostAudiotype = new HostComboBox("HostAudiotype",false); +// HostAudiotype->setLabel(QObject::tr("Sound card driver")); +// HostAudiotype->addSelection("ALSA"); +// HostAudiotype->addSelection("OSS"); +// HostAudiotype->addSelection("tinker"); +// +// HostAudiotype->setHelpText(QObject::tr("Select the sound driver set to use (OSS or ALSA)." ) ); +// addChild(HostAudiotype); + + } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h new file mode 100755 index 0000000..835d161 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/supplemental.h @@ -0,0 +1,44 @@ +#include <mythcontext.h> +#include <unistd.h> +#include <iostream> +#include <fstream> +#include <stdio.h> +#include "settings.h" +#include "installsettings.h" +#include <qsqldatabase.h> +#include <qsqlquery.h> + +#include <stdlib.h> +#include <cstdlib> +#include <mythtv/mythdbcon.h> +#include <qdir.h> +#include <qapplication.h> +#include "mythmiscutil.h" + +class WindowManager_settings: public TriggeredConfigurationGroup { + Q_OBJECT +public: + WindowManager_settings(); + HostCheckBox *HostEnhancedWMStyle; + HostCheckBox *HostSupplemental; + signals: + void eth0_is_default(void); + public slots: + void change_supplemental(bool); +}; + + + +class Supplementalhostsettings: public VerticalConfigurationGroup { + // Q_OBJECT +public: + Supplementalhostsettings(); + // HostCheckBox *HostSupplemental; + // HostComboBox *HostAudiotype; //duplicated + +}; + + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp new file mode 100755 index 0000000..9f53f18 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.cpp @@ -0,0 +1,112 @@ +#include <unistd.h> +#include "misc_settings.h" +#include "mv_common.h" +//Added by qt3to4: +#include <Q3TextStream> +#include "mythuihelper.h" + +#include "vnc.h" + + +using namespace std; + +extern HostParms hostparm; + +// static HostLineEdit *HostVNClogin() +// { +// HostLineEdit *gc = new HostLineEdit("HostVNClogin"); +// gc->setLabel(QObject::tr("Login")); +// gc->setValue(""); +// gc->setHelpText(QObject::tr("Login for vnc account")); +// return gc; +// }; +//---------x11vnc +static HostLineEdit *HostXVNCpassword() +{ + HostLineEdit *gc = new HostLineEdit("HostXVNCpassword"); + gc->setLabel(QObject::tr("Password")); + gc->setValue(""); + gc->SetPasswordEcho(true); + gc->setHelpText(QObject::tr("Password for XVNC account must be at least 5 characters long. Passwords shorter than 5 characters long will silently fail.")); + return gc; +}; + +static HostCheckBox *HostXVNCEnable() +{ + HostCheckBox *gc = new HostCheckBox("HostXVNCEnable"); + gc->setLabel(QObject::tr("Enable XVNC")); + gc->setValue(false); + gc->setHelpText(QObject::tr("This will allow you to remotely see what is currently displayed on the main screen. The session will be available on vnc:2 (port 5902).")); + return gc; +}; + +class XVNCsettings: public TriggeredConfigurationGroup { +public: + XVNCsettings(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("XVNC Settings")); + SetVertical(true); + Setting* trigger = HostXVNCEnable() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); + //settings->addChild(HostXVNClogin()); + settings->addChild(HostXVNCpassword()); + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + + +//------------------ +static HostLineEdit *HostVNCpassword() +{ + HostLineEdit *gc = new HostLineEdit("HostVNCpassword"); + gc->setLabel(QObject::tr("Password")); + gc->setValue(""); + gc->SetPasswordEcho(true); + gc->setHelpText(QObject::tr("Password for VNC account must be at least 5 characters long. Passwords shorter than 5 characters long will silently fail.")); + return gc; +}; + +static HostCheckBox *HostVNCEnable() +{ + HostCheckBox *gc = new HostCheckBox("HostVNCEnable"); + gc->setLabel(QObject::tr("Enable VNC")); + gc->setValue(false); + gc->setHelpText(QObject::tr("This will start a seperate VNC session that can be used for remote administration. The session will be available on vnc:1 (port 5901).")); + return gc; +}; + +class VNCsettings: public TriggeredConfigurationGroup { +public: + VNCsettings(): + TriggeredConfigurationGroup(false,false,false,false) { + setLabel(QObject::tr("VNC Settings")); + SetVertical(true); + Setting* trigger = HostVNCEnable() ; + addChild(trigger); + setTrigger(trigger); + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false,false,false,false); + //settings->addChild(HostVNClogin()); + settings->addChild(HostVNCpassword()); + + addTarget("0", new VerticalConfigurationGroup(false, false)); + addTarget("1", settings); + }; +}; + + + +VNChostsettings::VNChostsettings(): + VerticalConfigurationGroup(false,false,false,false) + { + setLabel(QObject::tr("Screen Sharing Settings")); + VNCsettings *vncframe = new VNCsettings(); + XVNCsettings *xvncframe = new XVNCsettings(); + addChild(vncframe); + addChild(xvncframe); + } diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h new file mode 100755 index 0000000..3b1b349 --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/vnc.h @@ -0,0 +1,28 @@ +#include <mythcontext.h> +#include <unistd.h> +#include <iostream> +#include <fstream> +#include <stdio.h> +#include "settings.h" +#include "installsettings.h" +#include <qsqldatabase.h> +#include <qsqlquery.h> + +#include <stdlib.h> +#include <cstdlib> +#include <mythtv/mythdbcon.h> +#include <qdir.h> +#include <qapplication.h> +#include "mythmiscutil.h" + + +class VNChostsettings: public VerticalConfigurationGroup { +public: + VNChostsettings(); + +}; + + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp new file mode 100755 index 0000000..00a375e --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.cpp @@ -0,0 +1,696 @@ +#include <unistd.h> + + + +//Added by qt3to4: +#include <Q3TextStream> +#include "mythcontext.h" +//#include "tv.h" +#include <stdlib.h> + +#include "xorgsettings.h" + +#include <qdir.h> +#include <cstdlib> + + +extern HostParms hostparm; +extern DDCinfo ddcinfo; +// __________________All the Xorg settings______________ +void ReadDDCvalues (void) +{ + QString line; + QString currentitem; + // system ("/usr/sbin/ddcprobe > /tmp/ddcinfo"); + QFile file("/tmp/ddcinfo"); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.contains("Timing ranges:") ) + { + currentitem = line.section( "=", 1,1 ); + ddcinfo.XVrefresh = line.section( "=", 2,2 ); + ddcinfo.XHsync = currentitem.section( "," , 0,0 ); + } + else if ( line.contains (" Dimensions") ) + { + ddcinfo.Displaysize= line.section( ":", 1,1 ); + }; + } + file.close(); + } +}; + +static HostCheckBox *HostXUseAdvanced() +{ + HostCheckBox *gc = new HostCheckBox("HostXUseAdvanced"); + gc->setLabel(QObject::tr("Advanced xorg configuration")); + gc->setValue(false); + gc->setHelpText(QObject::tr("Displays more settings for Xorg")); + return gc; +}; + +static HostComboBox *HostXgeneric_connection() +{ + HostComboBox *gc = new HostComboBox("HostXgenericConnection",false); + gc->setLabel(QObject::tr("Connection")); + gc->addSelection("VGA"); + gc->addSelection("DVI"); + gc->addSelection("TV"); + gc->addSelection("AUTO"); + gc->setHelpText(QObject::tr("Video-out")); + return gc; +} + + +static HostCheckBox *HostXIgnoreEDID() +{ + HostCheckBox *gc = new HostCheckBox("HostXIgnoreEDID"); + gc->setLabel(QObject::tr("Ignore data provided by monitor")); + gc->setValue(false); + gc->setHelpText(QObject::tr("")); + return gc; +}; + + +static HostSpinBox *HostXHsyncLow() +{ + HostSpinBox *gc = new HostSpinBox("HostXHsyncLow", 1, 200, 1, true); + gc->setLabel(QObject::tr("Hsync")); + gc->setValue(6); + gc->setHelpText(QObject::tr("" )); + return gc; +} +static HostSpinBox *HostXHsyncHigh() +{ + HostSpinBox *gc = new HostSpinBox("HostXHsyncHigh", 1, 200, 1, true); + gc->setLabel(QObject::tr("")); + gc->setValue(6); + gc->setHelpText(QObject::tr("" )); + return gc; +} + +static HostSpinBox *HostXVrefreshLow() +{ + HostSpinBox *gc = new HostSpinBox("HostXVrefreshLow", 1, 200, 1, true); + gc->setLabel(QObject::tr("Vrefresh")); + gc->setValue(6); + gc->setHelpText(QObject::tr("" )); + return gc; +} +static HostSpinBox *HostXVrefreshHigh() +{ + HostSpinBox *gc = new HostSpinBox("HostXVrefreshHigh", 1, 200, 1, true); + gc->setLabel(QObject::tr("")); + gc->setValue(6); + gc->setHelpText(QObject::tr("" )); + return gc; +} + +static HostComboBox *HostXDisplaysize() +{ + HostComboBox *gc = new HostComboBox("HostXdisplaysize",true); + gc->setLabel(QObject::tr("Display size")); + gc->setHelpText(QObject::tr("Format should be two numbers 320 250" )); + gc->addSelection("487 274 _ 1920x1080 at 100dpi (16:9)"); + gc->addSelection("325 182 _ 1280x720 at 100dpi (16:9)"); + gc->addSelection("325 243 _ 1280x960 at 100dpi (4:3)"); + gc->addSelection("260 195 _ 1024x768 at 100dpi (4:3)"); + gc->addSelection("203 153 _ 800x600 at 100dpi (4:3)"); + gc->addSelection("162 121 _ 640x480 at 100dpi (4:3)"); + gc->addSelection("Custom"); + return gc; +} + +class EDIDprobedinfo : public TransLabelSetting +{ +public: + EDIDprobedinfo() + { + QString currentitem = "Reported info \n"; + currentitem.append("Hsync: "); + currentitem.append (ddcinfo.XHsync); + currentitem.append (" Vrefresh: "); + currentitem.append(ddcinfo.XVrefresh ); + currentitem.append (" Displaysize: "); + currentitem.append(ddcinfo.Displaysize); + setLabel(currentitem); + }; +}; + + +void AdvancedXGeneric_modelines::generic_fillselection(QString modelinefile ) +{ + if ( hostparm.displayshowadvancedX ) + { + QString currentitem; + QString cfiletxt; + cfiletxt=MV_ROOT; + cfiletxt.append("templates/xorg/modeline." ); + QString currentfile = cfiletxt; + currentfile.append(modelinefile); + QString line; + QRegExp sep( "\"" ); + QFile file(currentfile); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("ModeLine")) + { + currentitem = line.section( sep , 1,1 ); + if ( modelinefile == "VESA") + HostXadvancedresVESA->addSelection(currentitem); + else if ( modelinefile == "ATSC") + HostXadvancedresATSC->addSelection(currentitem); + else if ( modelinefile == "DVD") + HostXadvancedresDVD->addSelection(currentitem); + else if ( modelinefile == "NTSC") + HostXadvancedresNTSC->addSelection(currentitem); + else if ( modelinefile == "Custom") + HostXadvancedresCustom->addSelection(currentitem); + } + } + file.close(); + } + } + return ; + +} + + +class UseEDID: public TriggeredConfigurationGroup { +public: + UseEDID(): + TriggeredConfigurationGroup(true,false,true,true,false,false,false,true) { + Setting* useedid = HostXIgnoreEDID(); + addChild(useedid); + setTrigger(useedid); + + ConfigurationGroup* XSYNC = new GridConfigurationGroup(2,false); + XSYNC->addChild(HostXHsyncLow()); + XSYNC->addChild(HostXHsyncHigh()); + + ConfigurationGroup* XVREFRESH = new GridConfigurationGroup(2,false); + XVREFRESH->addChild(HostXVrefreshLow()); + XVREFRESH->addChild(HostXVrefreshHigh()); + + + ConfigurationGroup* settings = new GridConfigurationGroup(1,false); + settings->addChild(new EDIDprobedinfo); + settings->addChild( XSYNC); + settings->addChild(XVREFRESH); + settings->addChild(HostXDisplaysize()); + + addTarget("0", new GridConfigurationGroup(1,false)); + addTarget("1", settings); + }; +}; + + +EDIDOptions::EDIDOptions() +{ + VerticalConfigurationGroup* rec = new VerticalConfigurationGroup(false); + rec->setLabel(QObject::tr("Advanced X options")); + rec->setUseLabel(false); + rec->addChild(new UseEDID); + addChild(rec); +} + + +AdvancedXGeneric_modelines::AdvancedXGeneric_modelines(): + TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +{ + SetVertical(false); + HostXModelineCatagory = new HostComboBox("HostXModelineCatagory"); + HostXModelineCatagory->setLabel(QObject::tr("Type")); + HostXModelineCatagory->addSelection("Auto"); + HostXModelineCatagory->addSelection("VESA"); + HostXModelineCatagory->addSelection("ATSC"); + HostXModelineCatagory->addSelection("DVD"); + HostXModelineCatagory->addSelection("NTSC"); + HostXModelineCatagory->addSelection("Custom"); + //HostXModelineCatagory->addSelection("Nvidia_modeline"); + HostXModelineCatagory->setHelpText(QObject::tr("")); + + HostXadvancedresVESA = new HostComboBox("HostXadvancedresVESA"); + HostXadvancedresATSC = new HostComboBox("HostXadvancedresATSC"); + HostXadvancedresDVD = new HostComboBox("HostXadvancedresDVD"); + HostXadvancedresNTSC = new HostComboBox("HostXadvancedresNTSC"); + HostXadvancedresCustom= new HostComboBox("HostXadvancedresCustom"); + + generic_fillselection("VESA"); + generic_fillselection("ATSC"); + generic_fillselection("DVD"); + generic_fillselection("NTSC"); + generic_fillselection("Custom"); + + addChild(HostXModelineCatagory); + setTrigger(HostXModelineCatagory); + + addTarget("VESA", HostXadvancedresVESA); + addTarget("ATSC", HostXadvancedresATSC); + addTarget("DVD", HostXadvancedresDVD); + addTarget("NTSC", HostXadvancedresNTSC); + addTarget("Custom",HostXadvancedresCustom); + addTarget("Auto", new VerticalConfigurationGroup(false, false)); + +}; + +void AdvancedXGeneric_modelines::AdvancedXGeneric_modelines_GatherSettings(void) +{ + QString modelinetype = HostXModelineCatagory->getValue(); + QString tempmodeline = "HostXadvancedres" + modelinetype ; + QString modeline; + if ( modelinetype == "VESA") + modeline= HostXadvancedresVESA->getValue() ; + else if ( modelinetype == "ATSC") + modeline= HostXadvancedresATSC->getValue() ; + else if ( modelinetype == "DVD") + modeline= HostXadvancedresDVD->getValue(); + else if ( modelinetype == "NTSC") + modeline= HostXadvancedresNTSC->getValue(); + else if ( modelinetype == "Custom") + modeline= HostXadvancedresCustom->getValue(); + hostparm.ThisXresadvanced = modelinetype +"_"+modeline; + // Jump to final step + testXconfiguration(); +} + + +// --------------------------------------------start of nvidia specific ------------------------------------ + + +AdvancedXNvidiaConnections::AdvancedXNvidiaConnections(): + TriggeredConfigurationGroup(false,false,true,true,true,true,true,true) { + + HostXNvidiaConnection = new HostComboBox("HostXNvidiaConnection",false); + HostXNvidiaConnection->setLabel(QObject::tr("Connection")); + HostXNvidiaConnection->addSelection("Auto"); + HostXNvidiaConnection->addSelection("DVI"); + HostXNvidiaConnection->addSelection("VGA"); + HostXNvidiaConnection->addSelection("TV"); + HostXNvidiaConnection->setHelpText(QObject::tr("Video-out")); + + addChild(HostXNvidiaConnection); + setTrigger(HostXNvidiaConnection); + AdvancedXNvidia_modelines *ADVANCEDXNVIDIA_MODELINES = new AdvancedXNvidia_modelines; + + HostXnVidiaTVstandard = new HostComboBox("HostXnVidiaTVstandard"); + HostXnVidiaTVstandard->setLabel(QObject::tr("nVidia-out")); + HostXnVidiaTVstandard->addSelection("PAL-B" ); + HostXnVidiaTVstandard->addSelection("PAL-D" ); + HostXnVidiaTVstandard->addSelection("PAL-G" ); + HostXnVidiaTVstandard->addSelection("PAL-H" ); + HostXnVidiaTVstandard->addSelection("PAL-I" ); + HostXnVidiaTVstandard->addSelection("PAL-K1"); + HostXnVidiaTVstandard->addSelection("PAL-M" ); + HostXnVidiaTVstandard->addSelection("PAL-N" ); + HostXnVidiaTVstandard->addSelection("PAL-NC"); + HostXnVidiaTVstandard->addSelection("NTSC-J"); + HostXnVidiaTVstandard->addSelection("NTSC-M"); + HostXnVidiaTVstandard->addSelection("HD480i" ); + HostXnVidiaTVstandard->addSelection("HD480p" ); + HostXnVidiaTVstandard->addSelection("HD720p" ); + HostXnVidiaTVstandard->addSelection("HD1080i" ); + HostXnVidiaTVstandard->addSelection("HD1080p"); + HostXnVidiaTVstandard->addSelection("HD576i" ); + HostXnVidiaTVstandard->addSelection("HD576p" ); + HostXnVidiaTVstandard->setHelpText(QObject::tr("Indrustry standard resolution to send to the TV")); + + HostXnVidiaTVformat = new HostComboBox("HostXnVidiaTVformat"); + HostXnVidiaTVformat->setLabel(QObject::tr("TV-Format(nvidia)")); + HostXnVidiaTVformat->addSelection("AUTOSELECT"); + HostXnVidiaTVformat->addSelection("COMPOSITE"); + HostXnVidiaTVformat->addSelection("SVIDEO"); + HostXnVidiaTVformat->addSelection("COMPONENT"); + HostXnVidiaTVformat->addSelection("SCART"); + HostXnVidiaTVformat->setHelpText(QObject::tr("Physical connection to the nvidia card")); + + ConfigurationGroup* nvtvout = new VerticalConfigurationGroup(false); + nvtvout ->addChild(HostXnVidiaTVformat); + nvtvout->addChild(HostXnVidiaTVstandard); + + addTarget("Auto",ADVANCEDXNVIDIA_MODELINES ); + addTarget("DVI", ADVANCEDXNVIDIA_MODELINES ); + addTarget("VGA",ADVANCEDXNVIDIA_MODELINES); + addTarget("TV", nvtvout); + + connect(this, SIGNAL(nVidia_sig(void)), + ADVANCEDXNVIDIA_MODELINES, SLOT(AdvancedXNvidia_modelines_GatherSettings())); +}; + + + + +void AdvancedXNvidia_modelines::Nvidia_fillselection(QString modelinefile ) +{ + if ( hostparm.displayshowadvancedX ) + { + QString currentitem; + QString cfiletxt; + cfiletxt=MV_ROOT; + cfiletxt.append("templates/xorg/modeline." ); + QString currentfile = cfiletxt; + currentfile.append(modelinefile); + QString line; + QRegExp sep( "\"" ); + QFile file(currentfile); + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + if ( line.startsWith("ModeLine")) + { + currentitem = line.section( sep , 1,1 ); + if ( modelinefile == "VESA") + HostXNvidiaadvancedresVESA->addSelection(currentitem); + else if ( modelinefile == "ATSC") + HostXNvidiaadvancedresATSC->addSelection(currentitem); + else if ( modelinefile == "DVD") + HostXNvidiaadvancedresDVD->addSelection(currentitem); + else if ( modelinefile == "NTSC") + HostXNvidiaadvancedresNTSC->addSelection(currentitem); + else if ( modelinefile == "Custom") + HostXNvidiaadvancedresCustom->addSelection(currentitem); + } + } + file.close(); + } + } + return ; + +} + + + +AdvancedXNvidia_modelines::AdvancedXNvidia_modelines(): + TriggeredConfigurationGroup(true,false,true,true,true,true,true,true) +{ + SetVertical(true); + HostXNvidiaModelineCatagory = new HostComboBox("HostXNvidiaModelineCatagory"); + HostXNvidiaModelineCatagory->setLabel(QObject::tr("Category")); + //HostXNvidiaModelineCatagory->addSelection("Auto"); + // HostXNvidiaModelineCatagory->addSelection("VESA"); + // HostXNvidiaModelineCatagory->addSelection("ATSC"); + // HostXNvidiaModelineCatagory->addSelection("DVD"); + // HostXNvidiaModelineCatagory->addSelection("NTSC"); + // HostXNvidiaModelineCatagory->addSelection("Custom"); + HostXNvidiaModelineCatagory->addSelection("Nvidia_modeline"); + HostXNvidiaModelineCatagory->setHelpText(QObject::tr("")); + +// HostXNvidiaadvancedresVESA = new HostComboBox("HostXNvidiaadvancedresVESA"); +// HostXNvidiaadvancedresATSC = new HostComboBox("HostXNvidiaadvancedresATSC"); +// HostXNvidiaadvancedresDVD = new HostComboBox("HostXNvidiaadvancedresDVD"); +// HostXNvidiaadvancedresNTSC = new HostComboBox("HostXNvidiaadvancedresNTSC"); +// HostXNvidiaadvancedresCustom= new HostComboBox("HostXNvidiaadvancedresCustom"); +// +// Nvidia_fillselection("VESA"); +// Nvidia_fillselection("ATSC"); +// Nvidia_fillselection("DVD"); +// Nvidia_fillselection("NTSC"); +// Nvidia_fillselection("Custom"); + + HostXnVidia1080p = new HostCheckBox("HostXnVidia1080p"); + HostXnVidia1080p->setLabel(QObject::tr("1080p")); + HostXnVidia1080p->setValue(true); + HostXnVidia1080p->setHelpText(QObject::tr(" ")); + + HostXnVidia1080i = new HostCheckBox("HostXnVidia1080i"); + HostXnVidia1080i->setLabel(QObject::tr("1080i")); + HostXnVidia1080i->setValue(true); + HostXnVidia1080i->setHelpText(QObject::tr(" ")); + + HostXnVidia720p = new HostCheckBox("HostXnVidia720p"); + HostXnVidia720p->setLabel(QObject::tr("720p")); + HostXnVidia720p->setValue(true); + HostXnVidia720p->setHelpText(QObject::tr(" ")); + + HostXnVidia480p = new HostCheckBox("HostXnVidia480p"); + HostXnVidia480p->setLabel(QObject::tr("480p")); + HostXnVidia480p->setValue(true); + HostXnVidia480p->setHelpText(QObject::tr(" ")); + + ConfigurationGroup* nVidiastandard = new GridConfigurationGroup(2,false,false,true,true); + nVidiastandard ->addChild(HostXnVidia480p); + nVidiastandard ->addChild(HostXnVidia720p); + nVidiastandard ->addChild(HostXnVidia1080p); + nVidiastandard ->addChild(HostXnVidia1080i); + nVidiastandard ->addChild(HostXres()); + nVidiastandard ->setLabel(QObject::tr("Standard Nvidia Modelines")); + + + addChild(HostXNvidiaModelineCatagory); + setTrigger(HostXNvidiaModelineCatagory); + +// addTarget("VESA", HostXNvidiaadvancedresVESA); +// addTarget("ATSC", HostXNvidiaadvancedresATSC); +// addTarget("DVD", HostXNvidiaadvancedresDVD); +// addTarget("NTSC", HostXNvidiaadvancedresNTSC); +// addTarget("Custom",HostXNvidiaadvancedresCustom); + addTarget("Nvidia_modeline",nVidiastandard); + addTarget("Auto", new VerticalConfigurationGroup(false, false)); + +}; + + +void AdvancedXNvidiaConnections::AdvancedXNvidiaConnectionsGatherSettings(void) +{ + //cout << "inside AdvancedXNvidiaConnectionsGatherSettings" << endl; + hostparm.ThisXconnection = HostXNvidiaConnection->getValue(); + hostparm.ThisXTVstandard = HostXnVidiaTVformat->getValue(); + hostparm.ThisXTVconnection = HostXnVidiaTVstandard->getValue(); + emit nVidia_sig(); // jump to AdvancedXNvidia_modelines_GatherSettings + +}; + + +void AdvancedXNvidia_modelines::AdvancedXNvidia_modelines_GatherSettings(void) +{ + QString modelinecatagory = HostXNvidiaModelineCatagory->getValue(); + QString tempmodeline = "HostXadvancedres" + modelinecatagory ; + QString modeline; + + if ( modelinecatagory == "VESA") + modeline= HostXNvidiaadvancedresVESA->getValue() ; + else if ( modelinecatagory == "ATSC") + modeline= HostXNvidiaadvancedresATSC->getValue() ; + else if ( modelinecatagory == "DVD") + modeline= HostXNvidiaadvancedresDVD->getValue(); + else if ( modelinecatagory == "NTSC") + modeline= HostXNvidiaadvancedresNTSC->getValue(); + else if ( modelinecatagory == "Custom") + modeline= HostXNvidiaadvancedresCustom->getValue(); + else if ( modelinecatagory == "Nvidia_modeline" ) + modeline = "Builtin" ; + // need to add stuff to find the built in nvidia modelines + hostparm.ThisXresadvanced = modelinecatagory +"_"+modeline; + // Jump to final step + testXconfiguration(); +}; +// ----------------------------------------END nvidia specific + + + +AdvancedXcardtype::AdvancedXcardtype(): + TriggeredConfigurationGroup(false,false,true,true,true,true,false,false) { + HostXcardtype = new HostComboBox("HostXcardtype",false); + HostXcardtype->setLabel(QObject::tr("Video card/driver")); + HostXcardtype->addSelection("nVidia"); + //HostXcardtype->addSelection("ATI"); + HostXcardtype->addSelection("VMWARE"); + HostXcardtype->addSelection("Intel"); + //HostXcardtype->addSelection("Via"); + HostXcardtype->setHelpText(QObject::tr("Force video card driver to use.")); + addChild(HostXcardtype); + setTrigger(HostXcardtype); + + AdvancedXGeneric_modelines *ADVANCEDXGENERICMODELINES = new AdvancedXGeneric_modelines; + AdvancedXNvidiaConnections *ADVANCEDXNVIDIACONNECTIONS = new AdvancedXNvidiaConnections; + + + + + addTarget("VMWARE", HostXres()); + addTarget("Intel", HostXres()); + //addTarget("nVidia",HostXres()); + + //addTarget("VMWARE", ADVANCEDXGENERICMODELINES); + //addTarget("Intel", ADVANCEDXGENERICMODELINES); + addTarget("nVidia",ADVANCEDXNVIDIACONNECTIONS); + + //addTarget("Via", ADVANCEDXGENERICMODELINES); + //addTarget("ATI",ADVANCEDXGENERICMODELINES); + + //connect(this, SIGNAL(go(void)), + // ADVANCEDXGENERICMODELINES, SLOT(AdvancedXGeneric_modelines_GatherSettings())); + //connect(this, SIGNAL(gonVidia(void)), + // ADVANCEDXNVIDIACONNECTIONS, SLOT(AdvancedXNvidiaConnectionsGatherSettings())); + +}; + +void AdvancedXcardtype::AdvancedXcardgatherSettings(void) +{ + //called when test button is pressed + hostparm.ThisXcardtype = HostXcardtype->getValue() ; + if (hostparm.ThisXcardtype == "nVidia") + emit gonVidia(); + else if (hostparm.ThisXcardtype =="ATI") + emit goATI(); + else + emit go(); +}; + + +// AdvancedXSettings::AdvancedXSettings(): +// TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { +// setLabel(QObject::tr("Display Settings")); +// Setting* Advancedxsettings = HostXUseAdvanced(); +// addChild(Advancedxsettings); +// setTrigger(Advancedxsettings); +// HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig"); +// HostXIgnoreConfig->setLabel(QObject::tr("User supplied config. ")); +// HostXIgnoreConfig->setValue(false); +// #ifdef __MVAPP__ +// HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /data/home/mythtv/templates/xorg.user.")); +// #else +// HostXIgnoreConfig->setHelpText(QObject::tr("When this is checked, the system will use the configuration file provided by YOU. Place the file you want to use in /home/mythtv/templates/xorg.user.")); +// #endif +// // HorizontalConfigurationGroup *lp = +// // new HorizontalConfigurationGroup(false, false, true, true); +// // +// // TransButtonSetting *EDIDbutton = new TransButtonSetting(); +// // EDIDbutton->setLabel(tr("Display Settings")); +// // +// // TransButtonSetting *TestXbutton = new TransButtonSetting(); +// // TestXbutton->setLabel(tr("Test X Configuration")); +// // lp->addChild(EDIDbutton); +// // lp->addChild(TestXbutton); +// +// AdvancedXcardtype *AXCT = new AdvancedXcardtype ; +// +// ConfigurationGroup* settings = new VerticalConfigurationGroup(false); +// // settings->addChild(AXCT); +// //settings->addChild(lp); +// +// ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false); +// setting1->addChild(HostXres()); +// setting1->addChild(HostXIgnoreConfig); +// +// // connect(EDIDbutton, SIGNAL(pressed()), this, SLOT(ADJUSTEDID())); +// // connect(TestXbutton, SIGNAL(pressed()), AXCT, SLOT(AdvancedXcardgatherSettings())); +// addTarget("0",setting1); +// addTarget("1", settings); +// +// +// +// +// }; + +AdvancedXSettings::AdvancedXSettings(): + TriggeredConfigurationGroup(true,true,true,true,true,true,true,true) { + setLabel(QObject::tr("Display Settings")); + + + + + HostXIgnoreConfig = new HostCheckBox("HostXIgnoreConfig"); + HostXIgnoreConfig->setLabel(QObject::tr("User Supplied Configuration")); + HostXIgnoreConfig->setValue(false); +#ifdef __MVAPP__ + HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user.")); +#else + HostXIgnoreConfig->setHelpText(QObject::tr("If checked, the system will use the configuration file provided by YOU. Place your configuration file in /data/home/mythtv/templates/xorg.user.")); +#endif + + Setting* Advancedxsettings = HostXIgnoreConfig; + addChild(Advancedxsettings); + setTrigger(Advancedxsettings); + + + + + + + ConfigurationGroup* settings = new VerticalConfigurationGroup(false); + + + ConfigurationGroup* setting1 = new GridConfigurationGroup(1,false); + setting1->addChild(HostXres()); + + addTarget("0",setting1); + addTarget("1", settings); + + + + +}; + + + +void AdvancedXSettings::ADJUSTEDID(void) +{ + EDIDOptions edidscreen; + edidscreen.exec(); +} + + +void testXconfiguration(void) +{ + hostparm.ThisXIgnoreEDID =gCoreContext->GetSetting("HostXIgnoreEDID"); + QString tempstring ; + tempstring = gCoreContext->GetSetting("HostXHsyncLow"); + tempstring.append(" - "); + tempstring.append(gCoreContext->GetSetting("HostXHsyncHigh") ); + hostparm.ThisXHsync=tempstring; + + tempstring =""; + tempstring=gCoreContext->GetSetting("HostXVrefreshLow"); + tempstring.append(" - "); + tempstring.append(gCoreContext->GetSetting("HostXVrefreshHigh")); + hostparm.ThisXVrefresh=tempstring; + hostparm.ThisXDisplaysize= gCoreContext->GetSetting("HostXDisplaysize"); + + QString commandline = "xconfig.sh test 0 "; + commandline.append(hostparm.ThisXcardtype); + commandline.append(" " ); + commandline.append(hostparm.ThisXIgnoreEDID ); + commandline.append(" " ); + commandline.append(hostparm.ThisXconnection ); + commandline.append(" \"" ); + commandline.append(hostparm.ThisXHsync ); + commandline.append(" \" " ); + commandline.append(" \"" ); + commandline.append(hostparm.ThisXVrefresh); + commandline.append(" \" " ); + commandline.append(hostparm.ThisXresadvanced ); + commandline.append(" " ); + commandline.append(hostparm.ThisXTVconnection ); + commandline.append(" " ); + commandline.append(" \"" ); + commandline.append(hostparm.ThisXDisplaysize); + commandline.append(" \" " ); + + QString message; + message = "Someday this button will do something, but for right now all it does is show this message."; + message.append ("\n"); + + message.append(commandline); + MythPopupBox::showOkPopup( + GetMythMainWindow(), QObject::tr("Test X button"), + message); +}; + + + + + + + diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h new file mode 100755 index 0000000..f8985cd --- /dev/null +++ b/abs/core/mythinstall/MythVantage-app/mythinstall/xorgsettings.h @@ -0,0 +1,130 @@ +#include <settings.h> +#include "mythdialogs.h" +#include "libmyth/mythdialogs.h" +#include "libmyth/mythwidgets.h" +#include "installsettings.h" + +#include <Q3TextStream> +#include <qdir.h> + + +class AdvancedXNvidiaConnections: public TriggeredConfigurationGroup { + Q_OBJECT +public: + AdvancedXNvidiaConnections(); + HostComboBox *HostXNvidiaConnection; + HostComboBox *HostXnVidiaTVformat; + HostComboBox *HostXnVidiaTVstandard; + +public slots: + void AdvancedXNvidiaConnectionsGatherSettings(); +signals: + void nVidia_sig(void); +}; + + +class AdvancedXNvidia_modelines: public TriggeredConfigurationGroup { + Q_OBJECT +public: + AdvancedXNvidia_modelines(); + HostComboBox *HostXNvidiaModelineCatagory; + HostComboBox *HostXNvidiaadvancedresVESA; + HostComboBox *HostXNvidiaadvancedresATSC; + HostComboBox *HostXNvidiaadvancedresDVD; + HostComboBox *HostXNvidiaadvancedresNTSC; + HostComboBox *HostXNvidiaadvancedresCustom; + HostCheckBox *HostXnVidia1080p; + HostCheckBox *HostXnVidia1080i; + HostCheckBox *HostXnVidia720p; + HostCheckBox *HostXnVidia480p; + void Nvidia_fillselection(QString); +public slots: + void AdvancedXNvidia_modelines_GatherSettings(void); +}; + + +//------------------------------------------------- + +class AdvancedXcardtype: public TriggeredConfigurationGroup { + Q_OBJECT +public: + AdvancedXcardtype(); + HostComboBox *HostXcardtype; + +public slots: + void AdvancedXcardgatherSettings(); +signals: + void go(void ); + void goATI(void); + void gonVidia(void); +}; + + +class AdvancedXSettings: public TriggeredConfigurationGroup { + Q_OBJECT +public: + AdvancedXSettings(); + HostCheckBox *HostXIgnoreConfig; +protected slots: + void ADJUSTEDID(void); +}; + + +class AdvancedXGeneric_modelines: public TriggeredConfigurationGroup { + Q_OBJECT +public: + AdvancedXGeneric_modelines(); + HostComboBox *HostXModelineCatagory; + HostComboBox *HostXadvancedresVESA; + HostComboBox *HostXadvancedresATSC; + HostComboBox *HostXadvancedresDVD; + HostComboBox *HostXadvancedresNTSC; + HostComboBox *HostXadvancedresCustom; + void generic_fillselection(QString); +public slots: + void AdvancedXGeneric_modelines_GatherSettings(void); +}; + + +class EDIDOptions : public ConfigurationWizard +{ +public: + EDIDOptions(); +}; + + +void testXconfiguration(); +void ReadDDCvalues(); + + + + +#include <iostream> + +static HostComboBox *HostXres() +//Used in the simple config +{ + HostComboBox *gc = new HostComboBox("HostXres"); + gc->setLabel(QObject::tr("Initial Resolution")); + gc->addSelection("Auto") ; + gc->setHelpText(QObject::tr("")); + system ("print_xorg_res.py"); + + QFile file("/tmp/modelines"); + QString line; + if ( file.open(QIODevice::ReadOnly | QIODevice::Text) ) + { + Q3TextStream t( &file ); // use a text stream + while ( !t.eof() ) + { + line = t.readLine(); + gc->addSelection(line) ; + } + file.close(); + } + + return gc; +} + + + diff --git a/abs/core/mythinstall/PKGBUILD b/abs/core/mythinstall/PKGBUILD index 7f2bef6..9e18549 100644 --- a/abs/core/mythinstall/PKGBUILD +++ b/abs/core/mythinstall/PKGBUILD @@ -1,39 +1,43 @@ # Maintainer: Jams pkgname=mythinstall -pkgver=3 -pkgrel=80 +pkgver=8.1 +pkgrel=6 pkgdesc="LinHES installer/systemconfig GUI." -arch=('i686' 'x86_64') -depends=('mythtv>=0.25') -makedepends=('mythtv>=0.25') +arch=('i686' 'x86_64') +depends=('mythtv>=0.27') +makedepends=('mythtv>=0.27') logofiles=`ls logo*.png` source=('install-ui.xml' $logofiles) +build() { + msg "Copying MythVantage-app to src" + rsync -au $startdir/MythVantage-app $srcdir + + msg "Building mythinstall" + cd $srcdir/MythVantage-app/mythinstall && qmake + make || exit 1 +} + package() { -# It is assumed that you have built the mythtv package in the same - #cd $startdir - #cd - - #install -D MythVantage-app/mythinstall/install-ui.xml $pkgdir/usr/share/mythtv/themes/default/install-ui.xml install -D $srcdir/install-ui.xml $pkgdir/usr/share/mythtv/themes/default/install-ui.xml MVBINDIR=$pkgdir/usr/MythVantage/bin mkdir -p $MVBINDIR - install -m 0755 $startdir/mythinstall.bin $MVBINDIR/MythVantage + install -m 0755 $srcdir/MythVantage-app/mythinstall/mythinstall $MVBINDIR/MythVantage cd $MVBINDIR ln -s MythVantage mythvantage ln -s MythVantage mythinstall - #cd - -echo $logofiles + echo $logofiles for i in $logofiles do - install -D -m 0755 $srcdir/$i $pkgdir/usr/MythVantage/logos/$i + install -D -m 0755 $srcdir/$i $pkgdir/usr/MythVantage/logos/$i done - } + md5sums=('39d6b7bd1ee305c5523a3cf66d4c2338' '3291ad55fe6d7884fc732313f1cc2924' '80c0326a253df275afbe875a8ec14a3c' - '46925d6fbcb7ec1fc51714d03ac6b72d' + 'f7507a6c218c81228d2a3fbcd02565bb' '27ce7f89a83864dfc5abe23c61964c0c' '2e85a1b9559557dade6e87daf2abb673' - '7f3045f740760c828e2e18293c2a4ab1' + '532c5d9f1f8e1aef575ceecb69cc9c96' '91393e9cca0e6168f772fb48c88d3829') diff --git a/abs/core/mythinstall/checkout_MythVantage.sh b/abs/core/mythinstall/checkout_MythVantage.sh index e0d4b0c..1b6fe97 100755 --- a/abs/core/mythinstall/checkout_MythVantage.sh +++ b/abs/core/mythinstall/checkout_MythVantage.sh @@ -2,15 +2,14 @@ MYDIR=`pwd` PREFIX="\/usr\/include\/mythtv" -LIBVERSION=0.25 -VERSION=0.25.0 - +LIBVERSION=0.27 +VERSION=0.27.0 function setup_links { -rm mythinstall.bin -rm mythbeselect.bin -ln -s $MYDIR/src/MythVantage-app/mythinstall/mythinstall ./mythinstall.bin -ln -s $MYDIR/src/MythVantage-app/mythbeselect/mythbeselect ./mythbeselect.bin +rm $MYDIR/mythinstall.bin +rm $MYDIR/mythbeselect.bin +ln -s $MYDIR/src/MythVantage-app-patched/mythinstall/mythinstall $MYDIR/mythinstall.bin +ln -s $MYDIR/src/MythVantage-app-patched/mythbeselect/mythbeselect $MYDIR/mythbeselect.bin } function dl_repo { @@ -22,10 +21,9 @@ then cd MythVantage-app # git checkout --track -b LinHES origin/LinHES cd $MYDIR - setup_links cd - else - echo "updating exisiting tree" + echo "----updating exisiting tree----" cd MythVantage-app git pull git checkout master @@ -36,19 +34,41 @@ fi cd MythVantage-app git checkout master #git checkout origin/LinHES - +cd $MYDIR/src +if [ -d MythVantage-app-patched ] +then + echo "removing old patched dir" + rm -rf MythVantage-app-patched +fi +cp -a MythVantage-app MythVantage-app-patched +setup_links } dl_repo -set -x -sed -i "s/^LIBVERSION.*$/LIBVERSION = $LIBVERSION/g" $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro -sed -i "s/^VERSION.*$/VERSION = $VERSION/g" $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro -sed -i "s/^PREFIX.*$/PREFIX = $PREFIX/g" $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro +#patches +patches=('fileshare.cpp.patch' 'installdialog.cpp.patch' 'installationtype.cpp.patch' + 'installsettings.cpp.patch' 'infrared.cpp.patch' 'misc_settings.cpp.patch' + 'xorgsettings.cpp.patch' 'xorgsettings.h.patch' ) +echo "--------------------------applying patches------------------------------" +cd $MYDIR/src/MythVantage-app-patched/mythinstall +for i in `echo ${patches[@]:0}` +do + echo applying $i + patch -N -i $MYDIR/$i || return 1 + echo "-----------------------------" +done +cd $MYDIR +echo "--------------------------done applying patches-------------------------" -sed -i "s/#define __MVAPP__/\/\/#define __MVAPP__/g" $MYDIR/src/MythVantage-app/mythinstall/mv_common.h -sed -i "s/mythvantage/LinHES/g" $MYDIR/src/MythVantage-app/mythinstall/mv_common.h +set -x +sed -i "s/^LIBVERSION.*$/LIBVERSION = $LIBVERSION/g" $MYDIR/src/MythVantage-app-patched/mythinstall/mythinstall.pro +sed -i "s/^VERSION.*$/VERSION = $VERSION/g" $MYDIR/src/MythVantage-app-patched/mythinstall/mythinstall.pro +sed -i "s/^PREFIX.*$/PREFIX = $PREFIX/g" $MYDIR/src/MythVantage-app-patched/mythinstall/mythinstall.pro + +sed -i "s/#define __MVAPP__/\/\/#define __MVAPP__/g" $MYDIR/src/MythVantage-app-patched/mythinstall/mv_common.h +sed -i "s/mythvantage/LinHES/g" $MYDIR/src/MythVantage-app-patched/mythinstall/mv_common.h # echo "INCLUDEPATH += /usr/include/mythtv" >> $MYDIR/src/MythVantage-app/mythbeselect/mythberestart.pro # echo "INCLUDEPATH += /usr/include/mythtv" >> $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro @@ -56,14 +76,7 @@ sed -i "s/mythvantage/LinHES/g" $MYDIR/src/MythVantage-app/mythinstall/mv_common #echo 'INCLUDEPATH += $$MYTHPATH/mythtv/libs/libmythtv/' >> $MYDIR/src/MythVantage-app/mythinstall/mythinstall.pro -#remove hitchhiker guide to timezones -patch -N $MYDIR/src/MythVantage-app/mythinstall/misc_settings.cpp < $MYDIR/misc_settings.cpp.patch -patch -N $MYDIR/src/MythVantage-app/mythinstall/misc_settings.h < $MYDIR/misc_settings.h.patch - -#update help screen -patch -N $MYDIR/src/MythVantage-app/mythinstall/main.cpp < $MYDIR/main.cpp.patch - -cd $MYDIR/src/MythVantage-app/mythinstall && qmake +cd $MYDIR/src/MythVantage-app-patched/mythinstall && qmake make || exit 1 #cd $MYDIR/src/MythVantage-app/mythbeselect && qmake #make ||exit 1 diff --git a/abs/core/mythinstall/logo-3.png b/abs/core/mythinstall/logo-3.png Binary files differindex 8fff988..800fefc 100644 --- a/abs/core/mythinstall/logo-3.png +++ b/abs/core/mythinstall/logo-3.png diff --git a/abs/core/mythinstall/logo-6.png b/abs/core/mythinstall/logo-6.png Binary files differindex d370e2e..a81a62f 100644 --- a/abs/core/mythinstall/logo-6.png +++ b/abs/core/mythinstall/logo-6.png diff --git a/abs/core/mythinstall/logo_src/hp_logo.png b/abs/core/mythinstall/logo_src/hp_logo.png Binary files differindex 211b19e..23a6261 100644 --- a/abs/core/mythinstall/logo_src/hp_logo.png +++ b/abs/core/mythinstall/logo_src/hp_logo.png diff --git a/abs/core/mythinstall/logo_src/simerec.png b/abs/core/mythinstall/logo_src/simerec.png Binary files differindex 93db677..29db2eb 100644 --- a/abs/core/mythinstall/logo_src/simerec.png +++ b/abs/core/mythinstall/logo_src/simerec.png diff --git a/abs/core/mythinstall/main.cpp.patch b/abs/core/mythinstall/main.cpp.patch deleted file mode 100644 index 9c4c3ce..0000000 --- a/abs/core/mythinstall/main.cpp.patch +++ /dev/null @@ -1,63 +0,0 @@ ---- main.cpp.orig 2013-09-18 13:57:34.589499257 +0000 -+++ main.cpp 2013-09-18 14:27:59.535328888 +0000 -@@ -445,38 +445,45 @@ - { - DialogBox *dia = NULL; - QString prompt; -- QString *problems = new QString(" Help Screen"); -+ QString *problems = new QString("LinHES Help"); - problems->append("\n"); -- problems->append("-------------------------------------------------"); -+ problems->append("Visit http://linhes.org for additional help."); - problems->append("\n"); -- problems->append("Alt+h This screen"); -+ problems->append("\n"); -+ problems->append("------Keyboard Shortcuts---------------------------------"); -+ problems->append("\n"); -+ problems->append("Alt + h: This Screen"); - problems->append("\n"); - #ifdef __MVAPP__ -- problems->append("F2 open/close terminal"); -+ problems->append("F2: Open/Close Terminal"); - problems->append("\n"); -- problems->append("Shift + Return opens new xterm"); -+ problems->append("Shift + Return: Open New Terminal (xterm)"); - problems->append("\n"); -- problems->append("Alt+F2 for 2nd desktop Alt+F1 to go back"); -+ problems->append("Alt + F2: Show 2nd desktop Alt + F1 To Go Back"); - problems->append("\n"); -- problems->append("Alt+c Capture myth screenshot"); -+ problems->append("Alt + c: Capture Myth Screenshot"); - problems->append("\n"); - #else -- problems->append("Alt + X opens new xterm "); -+ problems->append("Alt + x: Open New Terminal (xterm)"); - problems->append("\n"); -- problems->append("Alt + m start mythfrontend"); -+ problems->append("Alt + m: Open mythfrontend"); - problems->append("\n"); -- problems->append("m will display a popup for power/about"); -+ problems->append("m in mythfrontend: Display Power/About Menu"); - problems->append("\n"); - #endif -- problems->append("Ctrl + Alt + u unhide mouse cursor"); -+ problems->append("Alt + 1: Start Master mythbackend"); -+ problems->append("\n"); -+ problems->append("Alt + 2: Stop Master mythbackend"); -+ problems->append("\n"); -+ problems->append("Alt + 3: Restart Master mythbackend"); - problems->append("\n"); -- problems->append("Alt+1 start masterbackend"); -+ problems->append("Alt + s: Open mythtv-setup"); - problems->append("\n"); -- problems->append("Alt+2 stop masterbackend"); -+ problems->append("Alt + u: Unhide/Hide Mouse Pointer"); - problems->append("\n"); -- problems->append("Alt+3 restart masterbackend"); -+ problems->append("Alt + w: Open Web Browser (Chrome if installed)"); - problems->append("\n"); -- problems->append("Alt+s run mythtv-setup"); -+ problems->append("Alt + f: Restart Window Manager"); - problems->append("\n"); - - diff --git a/abs/core/mythinstall/misc_settings.cpp.patch b/abs/core/mythinstall/misc_settings.cpp.patch deleted file mode 100644 index 75c4d8d..0000000 --- a/abs/core/mythinstall/misc_settings.cpp.patch +++ /dev/null @@ -1,57 +0,0 @@ ---- misc_settings.cpp.orig 2013-09-06 21:04:22.406221919 +0000 -+++ misc_settings.cpp 2013-09-06 21:01:01.927900734 +0000 -@@ -74,17 +74,17 @@ - // miscsettings_2->addChild(HostZipcode()); - - TimezoneRegion *timezoneregion = new TimezoneRegion(); -- TimezoneButton *timezonebutton = new TimezoneButton(); -+// TimezoneButton *timezonebutton = new TimezoneButton(); - - VerticalConfigurationGroup* miscsettings = - new VerticalConfigurationGroup(false, true,false,false); -- miscsettings->addChild(timezonebutton); -+// miscsettings->addChild(timezonebutton); - if ( showLabels && ( hostparm.ThisTimeZone != "" )) - { - if (MVAPP) - { - miscsettings->addChild(temptimezone); -- timezonebutton->disableButton(); -+// timezonebutton->disableButton(); - } - else - miscsettings->addChild(timezoneregion); -@@ -104,13 +104,13 @@ - - - -- connect(timezonebutton, SIGNAL(mf_launch_tzgui()),timezoneregion ,SLOT(timezone_gathersettings())); -+// connect(timezonebutton, SIGNAL(mf_launch_tzgui()),timezoneregion ,SLOT(timezone_gathersettings())); - - connect(timezoneregion,SIGNAL(mf_show_tz(QString)),this,SLOT(mf_show_tz(QString))); - connect(this,SIGNAL(update_timezone(QString)),timezoneregion,SLOT(update_timezone_values(QString))); - - autoLaunchTimer = new QTimer(this); -- connect(autoLaunchTimer, SIGNAL(timeout()), timezonebutton, SLOT(launch_tzgui())); -+// connect(autoLaunchTimer, SIGNAL(timeout()), timezonebutton, SLOT(launch_tzgui())); - autoLaunchTimer->start(0); - } - -@@ -191,7 +191,7 @@ - - - //_______________Misc time timezone -- -+/* - TimezoneButton::TimezoneButton(): - VerticalConfigurationGroup(false,false,false,false) - { -@@ -211,7 +211,7 @@ - { - TZButton->setEnabled(false); - } -- -+*/ - //This is used for the timezone - QStringList findFilesRecursively ( QStringList paths, QString fileTypes ) { - if ( fileTypes.isEmpty() ) fileTypes = "*"; diff --git a/abs/core/mythinstall/misc_settings.h.patch b/abs/core/mythinstall/misc_settings.h.patch deleted file mode 100644 index 10c69fb..0000000 --- a/abs/core/mythinstall/misc_settings.h.patch +++ /dev/null @@ -1,20 +0,0 @@ ---- misc_settings.h.orig 2013-09-06 20:57:11.240009509 +0000 -+++ misc_settings.h 2013-09-06 21:06:16.558645309 +0000 -@@ -35,7 +35,7 @@ - MiscMainFrame2(); - }; - -- -+/* - class TimezoneButton: public VerticalConfigurationGroup { - Q_OBJECT - public: -@@ -48,7 +48,7 @@ - QString mf_launch_tzgui(); - - }; -- -+*/ - class TimezoneRegion: public TriggeredConfigurationGroup { - Q_OBJECT - public: diff --git a/abs/core/mythtv/stable-0.27/git_src/checkout_mythtv.sh b/abs/core/mythtv/stable-0.27/git_src/checkout_mythtv.sh new file mode 100755 index 0000000..f0fc6bd --- /dev/null +++ b/abs/core/mythtv/stable-0.27/git_src/checkout_mythtv.sh @@ -0,0 +1,40 @@ +#!/bin/bash +#Quick script used to checkout the MythTV source +#This source should be used build all mythplugins & main program + +_gitroot="https://github.com/MythTV/mythtv.git" +_gitname="mythtv" +_gitbranch="fixes/0.27" + +startdir=`pwd` + +#Set this to True, to update mythtv to the latest. +#If not true then it will use the hash stored in git_hash +_current="True" + +_checkoutHASH=`cat git_hash` + +if [ -d $_gitname ] +then + cd $_gitname + git checkout $_gitbranch + git pull + echo "The local files are updated." +else + git clone -b $_gitbranch $_gitroot +fi + +if [ -d $_gitname ] +then + cd $_gitname + if [ $_current == True ] + then + git rev-parse HEAD > $startdir/git_hash + else + git checkout $_checkoutHASH + fi + pwd + ls + sh ./version.sh `pwd` +fi +echo "GIT checkout done or server timeout" diff --git a/abs/core/mythtv/stable-0.27/git_src/checkout_mythweb.sh b/abs/core/mythtv/stable-0.27/git_src/checkout_mythweb.sh new file mode 100755 index 0000000..bec4829 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/git_src/checkout_mythweb.sh @@ -0,0 +1,39 @@ +#!/bin/bash +#Quick script used to checkout the Mythweb source +#This source should be used build all mythplugins & main program + +_gitroot="https://github.com/MythTV/mythweb.git" +_gitname="mythweb" +_gitbranch="fixes/0.27" + +startdir=`pwd` + +#Set this to True, to update mythtv to the latest. +#If not true then it will use the hash stored in git_hash +_current="True" + +_checkoutHASH=`cat git_hash_web` + +if [ -d $_gitname ] +then + cd $_gitname + git checkout $_gitbranch + git pull + echo "The local files are updated." +else + git clone -b $_gitbranch $_gitroot +fi + +if [ -d $_gitname ] +then + cd $_gitname + if [ $_current == True ] + then + git rev-parse HEAD > $startdir/git_hash_web + else + git checkout $_checkoutHASH + fi + pwd + ls +fi +echo "GIT checkout done or server timeout" diff --git a/abs/core/mythtv/stable-0.27/git_src/git_hash b/abs/core/mythtv/stable-0.27/git_src/git_hash new file mode 100644 index 0000000..fd8badd --- /dev/null +++ b/abs/core/mythtv/stable-0.27/git_src/git_hash @@ -0,0 +1 @@ +39171be37ab8d63f0f44e5dbd5a78ca6893ceafa diff --git a/abs/core/mythtv/stable-0.27/git_src/git_hash_web b/abs/core/mythtv/stable-0.27/git_src/git_hash_web new file mode 100644 index 0000000..fbb64a1 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/git_src/git_hash_web @@ -0,0 +1 @@ +6d10afe73e1fb5f21688d4b6d6919cab618e6e88 diff --git a/abs/core/mythtv/stable-0.27/mythplugins/PKGBUILD b/abs/core/mythtv/stable-0.27/mythplugins/PKGBUILD new file mode 100644 index 0000000..8fe13bb --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythplugins/PKGBUILD @@ -0,0 +1,116 @@ +pkgbase=mythplugins +pkgname=('mytharchive' + 'mythbrowser' + 'mythgallery' + 'mythgame' + 'mythmusic' + 'mythnetvision' + 'mythnews' + 'mythweather' + 'mythzoneminder') +pkgver=0.27 +pkgrel=7 +arch=('i686' 'x86_64') +url="http://www.mythtv.org" +license=('GPL') +makedepends=('cdrkit' 'dvdauthor' 'dvd+rw-tools' 'ffmpeg' 'flac' 'libexif' + 'libvorbis' 'mesa' 'libgl' 'mplayer' "mythtv>=${pkgver}" + 'perl-datetime-format-iso8601' 'perl-date-manip' 'perl-image-size' + 'perl-json' 'perl-libwww' 'perl-soap-lite' 'perl-xml-sax' + 'perl-xml-simple' 'perl-xml-xpath' 'python-oauth' 'python-imaging' + 'python-pycurl' 'zlib') +source=('mythburn.py-aspectratio.patch') + +build() { + if [ -e ${srcdir}/mythplugins ] + then + msg "Removing old mythplugins src" + rm -rf ${srcdir}/mythplugins + fi + + cd ${startdir} + msg "Copying in mythplugins git_src" + cp -rp ../git_src/mythtv/mythplugins $srcdir + cd ${srcdir}/${pkgbase} + + msg "Configuring mythplugins" + ./configure --prefix=/usr \ + --enable-all \ + --python=/usr/bin/python2 + + msg "Compiling mythplugins" + qmake mythplugins.pro || return 1 + make || return 1 +} + +package_mytharchive() { + pkgdesc="Create DVDs or archive recorded shows in MythTV" + depends=('cdrkit' 'dvdauthor' 'dvd+rw-tools' 'ffmpeg' "mythtv>=${pkgver}" + 'python-imaging') + cd "${srcdir}/${_gitname}/${pkgbase}/mytharchive" + patch mythburn/scripts/mythburn.py < $srcdir/mythburn.py-aspectratio.patch || return 1 + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythbrowser() { + pkgdesc="Mini web browser for MythTV" + depends=("mythtv>=${pkgver}") + cd "${srcdir}/${_gitname}/${pkgbase}/mythbrowser" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythgallery() { + pkgdesc="Image gallery plugin for MythTV" + depends=('libexif' "mythtv>=${pkgver}") + cd "${srcdir}/${_gitname}/${pkgbase}/mythgallery" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythgame() { + pkgdesc="Game emulator plugin for MythTV" + depends=("mythtv>=${pkgver}" 'zlib') + cd "${srcdir}/${_gitname}/${pkgbase}/mythgame" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythmusic() { + pkgdesc="Music playing plugin for MythTV" + depends=('cdparanoia' 'fftw' 'flac' 'libcdaudio' 'libcdio' + 'libvisual-plugins' 'libvorbis' "mythtv>=${pkgver}" 'taglib') + cd "${srcdir}/${_gitname}/${pkgbase}/mythmusic" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythnetvision() { + pkgdesc="MythNetvision plugin for MythTV" + depends=("mythtv>=${pkgver}" 'python-pycurl' 'python-oauth' + 'python2-lxml' 'python2') + cd "${srcdir}/${_gitname}/${pkgbase}/mythnetvision" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythnews() { + pkgdesc="News checking plugin for MythTV" + depends=("mythtv>=${pkgver}") + cd "${srcdir}/${_gitname}/${pkgbase}/mythnews" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythweather() { + pkgdesc="Weather checking plugin for MythTV" + depends=("mythtv>=${pkgver}" 'perl-date-manip' 'perl-json' 'perl-soap-lite' + 'perl-xml-sax' 'perl-xml-simple' 'perl-xml-xpath' 'perl-image-size' + 'perl-datetime-format-iso8601') + cd "${srcdir}/${_gitname}/${pkgbase}/mythweather" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +package_mythzoneminder() { + pkgdesc="View CCTV footage from zoneminder in MythTV" + depends=("mythtv>=${pkgver}") +# install=mythplugins-mythzoneminder.install + cd "${srcdir}/${_gitname}/${pkgbase}/mythzoneminder" + make INSTALL_ROOT="${pkgdir}" install || return 1 +} + +md5sums=('e98c2a09bcb051fdde959fb4bb2e5ab2') diff --git a/abs/core/mythtv/stable-0.27/mythplugins/__changelog b/abs/core/mythtv/stable-0.27/mythplugins/__changelog new file mode 100644 index 0000000..48cdce8 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythplugins/__changelog @@ -0,0 +1 @@ +placeholder diff --git a/abs/core/mythtv/stable-0.27/mythplugins/mythburn.py-aspectratio.patch b/abs/core/mythtv/stable-0.27/mythplugins/mythburn.py-aspectratio.patch new file mode 100644 index 0000000..377de95 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythplugins/mythburn.py-aspectratio.patch @@ -0,0 +1,138 @@ +--- mythburn.py.orig 2013-12-16 22:41:31.532703825 +0000 ++++ mythburn.py 2013-12-16 22:40:52.191109409 +0000 +@@ -98,6 +98,7 @@ + from fcntl import ioctl + import CDROM + from shutil import copy ++from subprocess import Popen, PIPE + + import MythTV + from MythTV import datetime +@@ -440,7 +441,7 @@ + os.remove(os.path.join(root, name)) + + ############################################################# +-# Romoves all the objects from a directory ++# Removes all the objects from a directory + + def deleteEverythingInFolder(folder): + for root, dirs, files in os.walk(folder, topdown=False): +@@ -666,14 +667,14 @@ + # Gets the aspect ratio of a video file from its stream info file + + def getAspectRatioOfVideo(index): +- """Returns the aspect ratio of the video file (1.333, 1.778, etc)""" ++ """Returns the aspect ratio of the original video file (1.333, 1.778, etc)""" + + #open the XML containing information about this file +- infoDOM = xml.dom.minidom.parse(os.path.join(getItemTempPath(index), 'streaminfo.xml')) ++ infoDOM = xml.dom.minidom.parse(os.path.join(getItemTempPath(index), 'streaminfo_orig.xml')) + + #error out if its the wrong XML + if infoDOM.documentElement.tagName != "file": +- fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo.xml')) ++ fatalError("Stream info file doesn't look right (%s)" % os.path.join(getItemTempPath(index), 'streaminfo_orig.xml')) + video = infoDOM.getElementsByTagName("file")[0].getElementsByTagName("streams")[0].getElementsByTagName("video")[0] + if video.attributes["aspectratio"].value != 'N/A': + aspect_ratio = float(video.attributes["aspectratio"].value) +@@ -1695,6 +1696,37 @@ + fatalError("Failed while running mytharchivehelper to get stream information.\n" + "Result: %d, Command was %s" % (result, command)) + ++ #open the XML containing information about this file ++ infoDOM = xml.dom.minidom.parse(xmlFilename) ++ ++ #error out if its the wrong XML ++ if infoDOM.documentElement.tagName != "file": ++ fatalError("This info file doesn't look right (%s)." % xmlFilename) ++ ++ file = infoDOM.getElementsByTagName("file")[0] ++ video = infoDOM.getElementsByTagName("file")[0].getElementsByTagName("streams")[0].getElementsByTagName("video")[0] ++ ++ #use ffmpeg to get display aspect ratio (DAR) of video ++ cmd = "mythffmpeg -i " + quoteCmdArg(file.attributes["filename"].value) + " 2>&1" ++ aspect_ratio = Popen(cmd, shell=True, stdout=PIPE).stdout.read() ++ if "DAR" in aspect_ratio: ++ #clean DAR string ++ aspect_ratio = aspect_ratio.split("DAR ")[-1].split(",")[0] ++ aspect_ratio = ''.join([c for c in aspect_ratio if c in '1234567890:']).split(":") ++ else: ++ #calculate aspect from video size ++ aspect_ratio = getVideoSize(xmlFilename) ++ ++ #convert to decimal+ ++ aspect_ratio = float(aspect_ratio[0]) / float(aspect_ratio[1]) ++ ++ write("Video %s aspect ratio is: %s" % (filename, aspect_ratio)) ++ ++ #set aspect ratio ++ video.setAttribute("aspectratio",str(aspect_ratio)) ++ ++ WriteXMLToFile (infoDOM,xmlFilename) ++ + # print out the streaminfo.xml file to the log + infoDOM = xml.dom.minidom.parse(xmlFilename) + write(xmlFilename + ":-\n" + infoDOM.toprettyxml(" ", ""), False) +@@ -2010,7 +2042,7 @@ + ############################################################# + # Re-encodes a file to mpeg2 + +-def encodeVideoToMPEG2(source, destvideofile, video, audio1, audio2, aspectratio, profile): ++def encodeVideoToMPEG2(source, destvideofile, video, folder, audio1, audio2, aspectratio, profile): + """Encodes an unknown video source file eg. AVI to MPEG2 video and AC3 audio, use mythffmpeg""" + + profileNode = findEncodingProfile(profile) +@@ -2035,6 +2067,35 @@ + value = quoteCmdArg(destvideofile) + if value == "%aspect": + value = aspectratio ++ if value == "720x480" or value == "720x576": ++ videores, fps, videoAR = getVideoParams(folder) ++ videoWidth = int(videores.split("x")[0]) ++ videoHeight = int(videores.split("x")[1]) ++ ++ #add padding to correct for aspects > than 1.9:1 ++ if float(videoAR) >= 1.9: ++ #check which video type and set the correct height ++ if videomode == "ntsc": ++ videoModeHeight = 480 ++ else: ++ videoModeHeight = 576 ++ ++ #calculate the video height based on the aspect ratio of the video ++ #multiply by 1.185 to compensate for dvds non-square pixels ++ calVideoHeight = int(round((720 / float(videoAR)) * 1.185)) ++ if calVideoHeight % 2 == 1: ++ calVideoHeight = calVideoHeight + 1 ++ #write("calVideoHeight: %s" % calVideoHeight) ++ ++ #use original video height if the calculated video height is close ++ if (calVideoHeight + 20 < videoHeight) or (calVideoHeight - 20 > videoHeight): ++ videoHeight = calVideoHeight ++ ++ cropPixels = videoModeHeight - videoHeight ++ ++ write("Crop Pixels Total: %s" % cropPixels) ++ name = "-vf" ++ value = "\"scale=720:%d, setsar=1:1, pad=720:%d:0:%d:black\"" % (videoModeHeight - cropPixels, videoModeHeight, cropPixels / 2) + + # only re-encode the audio if it is not already in AC3 format + if audio1[AUDIO_CODEC] == "AC3": +@@ -4608,7 +4669,7 @@ + + #do the re-encode + encodeVideoToMPEG2(mediafile, os.path.join(folder, "newfile2.mpg"), video, +- audio1, audio2, aspectratio, profile) ++ folder, audio1, audio2, aspectratio, profile) + mediafile = os.path.join(folder, 'newfile2.mpg') + + #remove the old mediafile that was run through mythtranscode +@@ -4762,7 +4823,7 @@ + + #do the re-encode + encodeVideoToMPEG2(mediafile, os.path.join(folder, "newfile2.mpg"), video, +- audio1, audio2, aspectratio, profile) ++ folder, audio1, audio2, aspectratio, profile) + mediafile = os.path.join(folder, 'newfile2.mpg') + + #remove an intermediate file diff --git a/abs/core/mythtv/stable-0.27/mythplugins/mythplugins-mythzoneminder.install b/abs/core/mythtv/stable-0.27/mythplugins/mythplugins-mythzoneminder.install new file mode 100644 index 0000000..a4e0c0d --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythplugins/mythplugins-mythzoneminder.install @@ -0,0 +1,11 @@ +post_install() { + . /etc/systemconfig + if [ $SystemType = Master_backend -o $SystemType = Standalone ] + then + echo "This looks a zoneminder server install" + echo "Installing zoneminder" + #for reference the pacman statement below will not work because of a db lock. + pacman -S zoneminder + fi + +} diff --git a/abs/core/mythtv/stable-0.27/mythtv/0001-protect-metadata-loads-from-multiple-threads.patch b/abs/core/mythtv/stable-0.27/mythtv/0001-protect-metadata-loads-from-multiple-threads.patch new file mode 100644 index 0000000..d8f4a0c --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/0001-protect-metadata-loads-from-multiple-threads.patch @@ -0,0 +1,52 @@ +From b20171597097f8b933065ef3291c63194d310fbf Mon Sep 17 00:00:00 2001 +From: George Nassas <george@nassas.com> +Date: Sun, 10 Jun 2012 13:36:42 -0400 +Subject: [PATCH] protect metadata loads from multiple threads + +--- + mythtv/libs/libmythmetadata/dbaccess.cpp | 9 +++++++++ + 1 files changed, 9 insertions(+), 0 deletions(-) + +diff --git a/mythtv/libs/libmythmetadata/dbaccess.cpp b/mythtv/libs/libmythmetadata/dbaccess.cpp +index 67cd904..46adb7a 100644 +--- a/mythtv/libs/libmythmetadata/dbaccess.cpp ++++ b/mythtv/libs/libmythmetadata/dbaccess.cpp +@@ -47,8 +47,11 @@ class SingleValueImp + + virtual ~SingleValueImp() {} + ++ mutable QMutex mutex; ++ + void load_data() + { ++ QMutexLocker locker(&mutex); + if (!m_ready) + { + fill_from_db(); +@@ -271,8 +274,11 @@ class MultiValueImp + .arg(m_value_name).arg(m_table_name).arg(m_id_name); + } + ++ mutable QMutex mutex; ++ + void load_data() + { ++ QMutexLocker locker(&mutex); + if (!m_ready) + { + fill_from_db(); +@@ -730,8 +736,11 @@ class FileAssociationsImp + } + } + ++ mutable QMutex mutex; ++ + void load_data() + { ++ QMutexLocker locker(&mutex); + if (!m_ready) + { + fill_from_db(); +-- +1.7.2.5 + diff --git a/abs/core/mythtv/stable-0.27/mythtv/PKGBUILD b/abs/core/mythtv/stable-0.27/mythtv/PKGBUILD new file mode 100644 index 0000000..9a7e954 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/PKGBUILD @@ -0,0 +1,106 @@ +pkgname=mythtv +pkgver=0.27 +pkgrel=7 +commit_hash=`cat ../git_src/git_hash` +pkgdesc="A Homebrew PVR project $commit_hash" +arch=('i686' 'x86_64') +url="http://www.mythtv.org/" +license=('GPL') +depends=('avahi' 'faad2' 'fftw' 'glew' 'lame' 'libass' 'libavc1394' 'libcdio' + 'libcec' 'libcrystalhd-git' 'libiec61883' 'libva' 'libvdpau' 'libvpx' + 'libxinerama' 'libxrandr' 'libxml2' 'LinHES-config>=8.1-6' 'lirc-utils' + 'mysql-clients' 'mysql-python' 'openssl' 'perl-date-manip' 'perl-dbd-mysql' + 'perl-io-socket-inet6' 'perl-libwww' 'perl-math-round' + 'perl-net-upnp' 'perl-soap-lite' 'perl-xml-sax' 'python-pycurl' + 'python2-lxml' 'qt' 'qtwebkit' 'taglib' 'urlgrabber' 'x264' 'xmltv') +makedepends=('mesa' 'libgl' 'yasm' 'git' 'rsync') +replaces=() +groups=('pvr') +backup=() +install='mythtv.install' + +patches=('myth_settings.patch' + '0001-protect-metadata-loads-from-multiple-threads.patch' + #http://code.mythtv.org/trac/ticket/10825 thread safety in video metadata load + 'suggestedstarttime.patch.v1') + #http://code.mythtv.org/trac/ticket/11562 next mythfilldatabase run in mythweb + +optdepends=() +replaces=('mythvideo' 'myththemes') +conflicts=('mythvideo' 'myththemes') +source=(`echo ${patches[@]:0}` 'recordings') + +build() { + if [ -e ${srcdir}/mythtv ] + then + msg "Removing old mythtv src" + rm -rf ${srcdir}/mythtv + fi + + cd ${startdir} + msg "Copying in mythtv git_src" + cp -rp ../git_src/mythtv/mythtv $srcdir + cd ${srcdir}/$pkgname + echo "#!/bin/bash" > version.sh + + msg "--------------------------applying patches------------------------------" + for i in `echo ${patches[@]:0}` + do + echo applying $i + patch -Np2 -i ${startdir}/src/$i || return 1 + echo "-----------------------------" + done + msg "--------------------------done applying patches-------------------------" + + msg "Configuring mythtv" + ARCH=${CARCH/_/-} + ./configure --prefix=/usr \ + --cpu=${ARCH} \ + --disable-altivec \ + --disable-audio-jack \ + --disable-audio-pulse \ + --disable-ccache \ + --disable-distcc \ + --dvb-path=/usr/include \ + --enable-libfftw3 \ + --enable-libmp3lame \ + --enable-libvpx \ + --enable-libx264 \ + --enable-vaapi \ + --python=python2 \ + --with-bindings=perl,python || return 1 + msg "Compiling mythtv" + make all || return 1 +} + +package() { + cd "${srcdir}/${pkgname}" + # basic install + make INSTALL_ROOT="${pkgdir}" install + # install contrib files + rsync -arp --exclude .svn --delete-excluded contrib ${pkgdir}/usr/share/mythtv/ || return 1 + # install database structure + rsync -arp --exclude .svn --delete-excluded database ${pkgdir}/usr/share/mythtv/ || return 1 + # install docs + rsync -arp --exclude .svn --delete-excluded docs ${pkgdir}/usr/share/mythtv/ || return 1 + + # patch the xml LinHES style + cp -r ${startdir}/menu-xml/*.xml ${pkgdir}/usr/share/mythtv/themes/defaultmenu/ + cd ${pkgdir}/usr/share/mythtv + patch -p0 < ${startdir}/menu-xml/mainmenu.xml.patch || return 1 + patch -p0 < ${startdir}/menu-xml/optical_menu.xml.patch || return 1 + patch -p0 < ${startdir}/menu-xml/library.xml.patch || return 1 + + # make mythtv log dir for old scripts that use it + mkdir -p ${pkgdir}/var/log/mythtv + chown 1000.1000 ${pkgdir}/var/log/mythtv + + #install recordings (was pretty) + mkdir -p ${pkgdir}/etc/cron.hourly/ + install -m0755 ${srcdir}/recordings ${pkgdir}/etc/cron.hourly/ +} + +md5sums=('5f3e43567e62afe17bad39f5a9b604cf' + '67f7316c750fba17fa578d10840b9dbd' + '35a7fd3e3057691e3b1bf355bb9e8b16' + '65a08d8949431ecdeb51a686dc6f9c21') diff --git a/abs/core/mythtv/stable-0.27/mythtv/__changelog b/abs/core/mythtv/stable-0.27/mythtv/__changelog new file mode 100644 index 0000000..91a959c --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/__changelog @@ -0,0 +1,2 @@ +update to 0.27-fixes + diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/HOST_SETTINGS.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/HOST_SETTINGS.xml new file mode 100644 index 0000000..e454959 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/HOST_SETTINGS.xml @@ -0,0 +1,114 @@ +<mythmenu name="HOST_SETTINGS"> + <button> + <type>MV_ACCESS_SETUP_MENU</type> + <text>Access</text> + <description>Manage which LinHES Settings can be used</description> + <action>EXEC mythinstall -s accesscontrol </action> + </button> + + <button> + <type>MV_ADVANCED_SETUP_MENU</type> + <text>Advanced</text> + <description>Manage various Advanced Settings</description> + <action>EXEC mythinstall -s advanced</action> + </button> + + <button> + <type>MV_AUDIO_SETUP_MENU</type> + <text>Audio</text> + <description>Manage Audio drivers, cards & devices</description> + <action>EXEC mythinstall -s sound </action> + </button> + + <button> + <type>MV_ADVANCED_X_SETUP_MENU</type> + <text>Display</text> + <description>Set the display resolution</description> + <action>EXEC mythinstall -s advancedX</action> + </button> + + <button> + <type>MV_NETWORK_SETUP_MENU</type> + <text>Dynamic DNS</text> + <description>Manage your dyndns.com account</description> + <action>EXEC mythinstall -s ddns </action> + </button> + + <button> + <type>MV_FILESHARES_MENU</type> + <text>File Sharing</text> + <description>Manage file sharing via NFS or SMB</description> + <action>EXEC mythinstall -s fileshare</action> + </button> + + <button> + <type>MV_SYSTEM_SETUP_MENU</type> + <text>Host</text> + <description>Manage LinHES system type, pointer size & MythWelcome</description> + <action>EXEC mythinstall -s hostype </action> + </button> + + <button> + <type>MV_MISC_SETUP_MENU</type> + <text>Miscellanous</text> + <description>Set timezone, shortcuts & auto updates</description> + <action>EXEC mythinstall -s misc </action> + </button> + + <button> + <type>MV_NETWORK_SETUP_MENU</type> + <text>Network</text> + <description>Manage network devices & hostname</description> + <action>EXEC mythinstall -s network </action> + </button> + + <button> + <type>MV_SOFTWARE_MENU</type> + <text>Programs</text> + <description>Manage programs for LinHES</description> + <action>EXEC mythinstall -s plugins,software </action> + </button> + + <button> + <type>MV_IR_SETUP_MENU</type> + <text>Remotes</text> + <description>Manage remotes, receivers & blasters</description> + <action>EXEC mythinstall -s ir </action> + </button> + + <button> + <type>MV_SCREENSAVER_SETUP_MENU</type> + <text>Screensaver</text> + <description>Manage the Screensaver</description> + <action>EXEC mythinstall -s screensaver </action> + </button> + + <button> + <type>MV_VNC_SETUP_MENU</type> + <text>Screen Sharing</text> + <description>Manage VNC and XVNC screen sharing</description> + <action>EXEC mythinstall -s vnc </action> + </button> + + <button> + <type>MV_SHUTDOWN_SETUP_MENU</type> + <text>Shutdown</text> + <description>Set when to turn off LinHES</description> + <action>EXEC mythinstall -s sleep </action> + </button> +<!-- disabled in the db so no need to show + <button> + <type>MV_USER_SETUP_MENU</type> + <text>User Accounts</text> + <description>Manage Users on LinHES</description> + <action>EXEC mythinstall -s user </action> + </button> +--> + <button> + <type>MV_WEBACCESS_SETUP_MENU</type> + <text>Web Security</text> + <description>Manage local website security</description> + <action>EXEC mythinstall -s webuser </action> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/dvd_backup.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/dvd_backup.xml new file mode 100644 index 0000000..2647d81 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/dvd_backup.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<mythmenu name="OPTICAL_DISK"> + + <button> + <type>DVD_RIP</type> + <text>Mirror DVD</text> + <description>Creates a mirror of your DVD</description> + <action>EXEC /usr/LH/bin/ripD_eject.sh m &</action> + </button> + + <button> + <type>DVD_RIP</type> + <text>ISO of DVD</text> + <description>Creates an ISO of your DVD</description> + <action>EXEC /usr/LH/bin/ripD_eject.sh i &</action> + </button> + + <button> + <type>DVD_RIP</type> + <text>High Quality</text> + <description>Creates a high quality MPEG4 of your DVD</description> + <action>EXEC /usr/LH/bin/ripD_eject.sh h &</action> + </button> + + <button> + <type>DVD_RIP</type> + <text>Normal Quality</text> + <description>Creates a normal quality MPEG4 of your DVD</description> + <action>EXEC /usr/LH/bin/ripD_eject.sh n &</action> + </button> + + <button> + <type>DVD_RIP</type> + <text>Low Quality</text> + <description>Creates a low quality MPEG4 of your DVD</description> + <action>EXEC /usr/LH/bin/ripD_eject.sh l &</action> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/game.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/game.xml new file mode 100644 index 0000000..293a9e6 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/game.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<mythmenu name="GAME"> + + <button> + <type>GAME</type> + <text>MythGame</text> + <description>Play video games</description> + <action>PLUGIN mythgame</action> + <depends>mythgame</depends> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/info_menu.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/info_menu.xml new file mode 100644 index 0000000..017f90b --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/info_menu.xml @@ -0,0 +1,76 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<mythmenu name="INFO"> + + <button> + <type>NEWS</type> + <text>News Feeds</text> + <description>Keep up with the news</description> + <action>PLUGIN mythnews</action> + <depends>mythnews</depends> + </button> + + <button> + <type>MYTHTWITTER_TIMELINE</type> + <text>Twitter</text> + <description>Send and receive tweets</description> + <action>JUMP MythTwitter_Timeline</action> + <depends>mythtwitter</depends> + </button> + + <button> + <type>WEATHER</type> + <text>Weather</text> + <action>PLUGIN mythweather</action> + <description>Local weather forecast</description> + <depends>mythweather</depends> + </button> + + <button> + <type>WEATHER</type> + <text>Weather Station</text> + <action>PLUGIN mythwstation</action> + <depends>mythwstation</depends> + </button> + + <button> + <type>WEBPAGE</type> + <text>Web</text> + <description>Browse the web</description> + <action>PLUGIN mythbrowser</action> + <depends>mythbrowser</depends> + </button> + + <button> + <type>RECIPE</type> + <text>Recipes</text> + <description>Start cooking!</description> + <action>PLUGIN mythRecipe</action> + <depends>mythrecipe</depends> + </button> + + <button> + <type>TV_STATUS</type> + <text>System Status</text> + <description>See what your system is doing</description> + <action>TV_STATUS</action> + </button> + + <button> + <type>ZONEMINDER</type> + <text>ZoneMinder</text> + <description>Home surveillance</description> + <action>PLUGIN mythzoneminder</action> + <depends>mythzoneminder</depends> + </button> + +<!-- + <button> + <type>SMOLT</type> + <text>Hardware profile</text> + <description>Tell us what hardware you have so we can support it</description> + <action>PLUGIN mythsmolt</action> + <depends>mythsmolt</depends> + </button> + --> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/is.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/is.xml new file mode 100644 index 0000000..88b7e6b --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/is.xml @@ -0,0 +1,3 @@ +<mythmenu name="Internet Steams"> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/library.xml.patch b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/library.xml.patch new file mode 100644 index 0000000..8f80928 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/library.xml.patch @@ -0,0 +1,26 @@ +--- themes/defaultmenu/library.xml.orig 2012-06-10 08:02:54.000000000 +0000 ++++ themes/defaultmenu/library.xml 2012-06-10 08:03:38.000000000 +0000 +@@ -40,6 +40,13 @@ + </button> + + <button> ++ <type>STREAM</type> ++ <text>Online Content</text> ++ <description>Play content from online sources</description> ++ <action>MENU gen_is.xml</action> ++ </button> ++ ++ <button> + <type>IMAGES</type> + <text>Image Gallery</text> + <description>Look at Pictures</description> +@@ -51,8 +58,7 @@ + <type>GAME</type> + <text>Play Games</text> + <description>Play video games</description> +- <action>PLUGIN mythgame</action> +- <depends>mythgame</depends> ++ <action>MENU game.xml</action> + </button> + + </mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/linhes.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/linhes.xml new file mode 100644 index 0000000..b661b23 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/linhes.xml @@ -0,0 +1,63 @@ +<mythmenu name="LinHES"> + + <button> + <type>SETUP_GENERAL</type> + <text>MythTV Settings</text> + <text lang="IT">Impostazioni</text> + <text lang="ES">Configuración</text> + <text lang="DE">Zubehör / Konfiguration</text> + <text lang="DA">Tilbehør/Indstillinger</text> + <text lang="IS">Uppsetning</text> + <text lang="NL">Configuratie</text> + <text lang="PT">UtensÃlios</text> + <text lang="SV">Verktyg / Inställningar</text> + <text lang="JA">è¨å®~Z</text> + <text lang="FI">Oheis/Asetukset</text> + <text lang="ZH_TW">å·¥å~E·/è¨å®~Z</text> + <text lang="SL">Nastavitve</text> + <text lang="ET">Utiliidid / sätted</text> + <text lang="RU">УÑ~BилиÑ~BÑ~K / Ð~]аÑ~AÑ~BÑ~@ойки</text> + <text lang="AR">تضبÙ~Jطات</text> + <text lang="PL">NarzÄ~Ydzia / ustawienia</text> + <text lang="HE">×¢×~Vר×~Y×~] / ×~T×~R×~Sר×~Uת</text> + <text lang="HU">Eszközök / BeállÃtások</text> + <alttext lang="DE">Verschiedenes</alttext> + <alttext lang="SV">Inställningar</alttext> + <alttext lang="ET">Sätted</alttext> + <alttext lang="RU">Ð~]аÑ~AÑ~BÑ~@ойки</alttext> + <alttext lang="AR">تضبÙ~Jطات</alttext> + <description>Configure MythTV and Plugins</description> + <description lang="DE">MythTV und Plugins konfigurieren</description> + <action>MENU util_menu.xml</action> + </button> + + <button> + <type>LINHES_SETUP</type> + <text>LinHES Settings</text> + <description>Configure the LinHES System</description> + <action>MENU HOST_SETTINGS.xml</action> + </button> + + <button> + <type>BACKUP</type> + <text>Backup LinHES</text> + <description>Backup the LinHES System</description> + <action>MENU mythbackup.xml</action> + </button> + + <button> + <type>RESTORE</type> + <text>Restore LinHES</text> + <description>Restore the LinHES System</description> + <action>MENU mythrestore.xml</action> + </button> + +<!--#Check for updates--> + <button> + <type>UPGRADE</type> + <text>Update LinHES</text> + <description>Update the LinHES System</description> + <action>MENU update.xml</action> + </button> +<!--#Check for updates--> +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mainmenu.xml.patch b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mainmenu.xml.patch new file mode 100644 index 0000000..73a8940 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mainmenu.xml.patch @@ -0,0 +1,37 @@ +--- themes/defaultmenu/mainmenu.xml.orig 2012-07-29 21:39:46.000000000 +0000 ++++ themes/defaultmenu/mainmenu.xml 2012-07-29 21:41:50.000000000 +0000 +@@ -1,5 +1,11 @@ + <?xml version="1.0" encoding="UTF-8" ?> + <mythmenu name="MAIN"> ++ <button> ++ <type>TV_WATCH_TV</type> ++ <text>Watch TV</text> ++ <description>Watch live television</description> ++ <action>TV_WATCH_LIVE</action> ++ </button> + + <button> + <type>MENU_MEDIA_LIBRARY</type> +@@ -30,18 +36,11 @@ + </button> + + <button> +- <type>TV_WATCH_TV</type> +- <text>Watch TV</text> +- <description>Watch live television</description> +- <action>TV_WATCH_LIVE</action> +- </button> +- +- <button> + <type>MENU_UTILITIES_SETUP</type> +- <text>Setup</text> +- <description>Configure MythTV and plugins</description> +- <action>MENU main_settings.xml</action> +- <password>SetupPinCode</password> ++ <text>Service Menu</text> ++ <description>Configure your system</description> ++ <action>MENU linhes.xml</action> ++ <password>SetupPinCode</password> + </button> + + </mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythbackup.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythbackup.xml new file mode 100644 index 0000000..61dc4d3 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythbackup.xml @@ -0,0 +1,22 @@ +<mythmenu name="LinHES"> + <button> + <type>BACKUP</type> + <text>Backup Now?</text> + <description></description> + <action>NONE</action> + </button> + + <button> + <type>BACKUP</type> + <text>Yes</text> + <description>Start Backup</description> + <action>EXEC sudo /usr/LH/bin/lh_system_backup &</action> + </button> + + <button> + <type>JUMP_RELOAD_THEME</type> + <text>No</text> + <description>Return to Main Menu</description> + <action>JUMP Reload Theme</action> + </button> +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythrestore.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythrestore.xml new file mode 100644 index 0000000..c4025c5 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/mythrestore.xml @@ -0,0 +1,24 @@ +<mythmenu name="LinHES"> + + <button> + <type>RESTORE</type> + <text>Restore Now?</text> + <description>This will restore from the most recent backup.</description> + <action>NONE</action> + </button> + + <button> + <type>RESTORE</type> + <text>Yes</text> + <description>Start Restore</description> + <action>EXEC sudo /usr/LH/bin/lh_system_restore &</action> + </button> + + <button> + <type>JUMP_RELOAD_THEME</type> + <text>No</text> + <description>Return to Main Menu</description> + <action>JUMP Reload Theme</action> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/optical_menu.xml.patch b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/optical_menu.xml.patch new file mode 100644 index 0000000..b836e85 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/optical_menu.xml.patch @@ -0,0 +1,23 @@ +--- themes/defaultmenu/optical_menu.xml.orig 2012-05-02 18:41:38.000000000 +0000 ++++ themes/defaultmenu/optical_menu.xml 2012-07-30 05:33:03.000000000 +0000 +@@ -17,6 +17,20 @@ + </button> + + <button> ++ <type>DVD_RIP</type> ++ <text>Backup DVD</text> ++ <description>Backup your DVDs</description> ++ <action>MENU dvd_backup.xml</action> ++ </button> ++ ++ <button> ++ <type>DVD_RIP</type> ++ <text>Import Files from DVD</text> ++ <description>Import all files from a data DVD</description> ++ <action>EXEC /usr/LH/bin/importfiles.sh &</action> ++ </button> ++ ++ <button> + <type>MUSIC_RIP</type> + <text>Import CD</text> + <description>Import music from an audio CD</description> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/original/create_patch.sh b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/original/create_patch.sh new file mode 100644 index 0000000..34d8b8c --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/original/create_patch.sh @@ -0,0 +1,5 @@ +#!/bin/bash +for i in *.xml +do + diff -u $i.orig $i > ../$i.patch +done diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/siriusmenu.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/siriusmenu.xml new file mode 100644 index 0000000..e317b36 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/siriusmenu.xml @@ -0,0 +1,419 @@ +<mythmenu name="SIRIUS"> + <button> + <type>MUSIC</type> + <text>Sirius Hits 1</text> + <action>EXEC /usr/bin/cliSipie siriushits1</action> + </button> + <button> + <type>MUSIC</type> + <text>StarLite</text> + <action>EXEC /usr/bin/cliSipie starlite</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius Love</text> + <action>EXEC /usr/bin/cliSipie siriuslove</action> + </button> + <button> + <type>MUSIC</type> + <text>Movin EZ</text> + <action>EXEC /usr/bin/cliSipie movineasy</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius Gold</text> + <action>EXEC /usr/bin/cliSipie siriusgold</action> + </button> + <button> + <type>MUSIC</type> + <text>'60s Vibrations</text> + <action>EXEC /usr/bin/cliSipie 60svibrations</action> + </button> + <button> + <type>MUSIC</type> + <text>Totally '70s</text> + <action>EXEC /usr/bin/cliSipie totally70s</action> + </button> + <button> + <type>MUSIC</type> + <text>Big '80s</text> + <action>EXEC /usr/bin/cliSipie big80s</action> + </button> + <button> + <type>MUSIC</type> + <text>ThePulse</text> + <action>EXEC /usr/bin/cliSipie thepulse</action> + </button> + <button> + <type>MUSIC</type> + <text>Bridge</text> + <action>EXEC /usr/bin/cliSipie thebridge</action> + </button> + <button> + <type>MUSIC</type> + <text>BBC Radio 1</text> + <action>EXEC /usr/bin/cliSipie bbcradio1</action> + </button> + <button> + <type>MUSIC</type> + <text>Super Shuffle</text> + <action>EXEC /usr/bin/cliSipie supershuffle</action> + </button> + <button> + <type>MUSIC</type> + <text>Elvis Radio</text> + <action>EXEC /usr/bin/cliSipie elvisradio</action> + </button> + <button> + <type>MUSIC</type> + <text>Classic Vinyl</text> + <action>EXEC /usr/bin/cliSipie classicvinyl</action> + </button> + <button> + <type>MUSIC</type> + <text>Classic Rewind</text> + <action>EXEC /usr/bin/cliSipie classicrewind</action> + </button> + <button> + <type>MUSIC</type> + <text>TheVault</text> + <action>EXEC /usr/bin/cliSipie thevault</action> + </button> + <button> + <type>MUSIC</type> + <text>Jam_ON</text> + <action>EXEC /usr/bin/cliSipie jamon</action> + </button> + <button> + <type>MUSIC</type> + <text>Spectrum</text> + <action>EXEC /usr/bin/cliSipie thespectrum</action> + </button> + <button> + <type>MUSIC</type> + <text>BuzzSaw</text> + <action>EXEC /usr/bin/cliSipie buzzsaw</action> + </button> + <button> + <type>MUSIC</type> + <text>Octane</text> + <action>EXEC /usr/bin/cliSipie octane</action> + </button> + <button> + <type>MUSIC</type> + <text>Alt Nation</text> + <action>EXEC /usr/bin/cliSipie altnation</action> + </button> + <button> + <type>MUSIC</type> + <text>1st Wave</text> + <action>EXEC /usr/bin/cliSipie firstwave</action> + </button> + <button> + <type>MUSIC</type> + <text>Hair Nation</text> + <action>EXEC /usr/bin/cliSipie hairnation</action> + </button> + <button> + <type>MUSIC</type> + <text>'90s Alternative</text> + <action>EXEC /usr/bin/cliSipie 90salternative</action> + </button> + <button> + <type>MUSIC</type> + <text>Garage</text> + <action>EXEC /usr/bin/cliSipie undergroundgarage</action> + </button> + <button> + <type>MUSIC</type> + <text>Left of Center</text> + <action>EXEC /usr/bin/cliSipie leftofcenter</action> + </button> + <button> + <type>MUSIC</type> + <text>Hard Attack</text> + <action>EXEC /usr/bin/cliSipie hardattack</action> + </button> + <button> + <type>MUSIC</type> + <text>Faction</text> + <action>EXEC /usr/bin/cliSipie faction</action> + </button> + <button> + <type>MUSIC</type> + <text>Punk</text> + <action>EXEC /usr/bin/cliSipie punk</action> + </button> + <button> + <type>MUSIC</type> + <text>The Coffee House</text> + <action>EXEC /usr/bin/cliSipie coffeehouse</action> + </button> + <button> + <type>MUSIC</type> + <text>Margaritaville</text> + <action>EXEC /usr/bin/cliSipie radiomargaritaville</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius Disorder</text> + <action>EXEC /usr/bin/cliSipie siriusdisorder</action> + </button> + <button> + <type>MUSIC</type> + <text>Reggae</text> + <action>EXEC /usr/bin/cliSipie reggaerhythms</action> + </button> + <button> + <type>MUSIC</type> + <text>Area 33</text> + <action>EXEC /usr/bin/cliSipie area33</action> + </button> + <button> + <type>MUSIC</type> + <text>Boombox</text> + <action>EXEC /usr/bin/cliSipie boombox</action> + </button> + <button> + <type>MUSIC</type> + <text>Chill</text> + <action>EXEC /usr/bin/cliSipie chill</action> + </button> + <button> + <type>MUSIC</type> + <text>The Beat</text> + <action>EXEC /usr/bin/cliSipie thebeat</action> + </button> + <button> + <type>MUSIC</type> + <text>Strobe</text> + <action>EXEC /usr/bin/cliSipie thestrobe</action> + </button> + <button> + <type>MUSIC</type> + <text>Hip-Hop Nation</text> + <action>EXEC /usr/bin/cliSipie hiphopnation</action> + </button> + <button> + <type>MUSIC</type> + <text>BackSpin</text> + <action>EXEC /usr/bin/cliSipie backspin</action> + </button> + <button> + <type>MUSIC</type> + <text>Shade 45</text> + <action>EXEC /usr/bin/cliSipie shade45</action> + </button> + <button> + <type>MUSIC</type> + <text>Hot Jamz</text> + <action>EXEC /usr/bin/cliSipie hotjamz</action> + </button> + <button> + <type>MUSIC</type> + <text>Heart & Soul</text> + <action>EXEC /usr/bin/cliSipie heartandsoul</action> + </button> + <button> + <type>MUSIC</type> + <text>SoulTown</text> + <action>EXEC /usr/bin/cliSipie soultown</action> + </button> + <button> + <type>MUSIC</type> + <text>New Country</text> + <action>EXEC /usr/bin/cliSipie newcountry</action> + </button> + <button> + <type>MUSIC</type> + <text>Prime Country</text> + <action>EXEC /usr/bin/cliSipie primecountry</action> + </button> + <button> + <type>MUSIC</type> + <text>Roadhouse</text> + <action>EXEC /usr/bin/cliSipie theroadhouse</action> + </button> + <button> + <type>MUSIC</type> + <text>Outlaw Country</text> + <action>EXEC /usr/bin/cliSipie outlawcountry</action> + </button> + <button> + <type>MUSIC</type> + <text>Bluegrass</text> + <action>EXEC /usr/bin/cliSipie bluegrass</action> + </button> + <button> + <type>MUSIC</type> + <text>Spirit</text> + <action>EXEC /usr/bin/cliSipie spirit</action> + </button> + <button> + <type>MUSIC</type> + <text>Praise</text> + <action>EXEC /usr/bin/cliSipie praise</action> + </button> + <button> + <type>MUSIC</type> + <text>Planet Jazz</text> + <action>EXEC /usr/bin/cliSipie planetjazz</action> + </button> + <button> + <type>MUSIC</type> + <text>JazzCafe</text> + <action>EXEC /usr/bin/cliSipie jazzcafe</action> + </button> + <button> + <type>MUSIC</type> + <text>PureJazz</text> + <action>EXEC /usr/bin/cliSipie purejazz</action> + </button> + <button> + <type>MUSIC</type> + <text>Spa 73</text> + <action>EXEC /usr/bin/cliSipie spa73</action> + </button> + <button> + <type>MUSIC</type> + <text>Blues</text> + <action>EXEC /usr/bin/cliSipie siriusblues</action> + </button> + <button> + <type>MUSIC</type> + <text>Siriusly Sinatra</text> + <action>EXEC /usr/bin/cliSipie siriuslysinatra</action> + </button> + <button> + <type>MUSIC</type> + <text>Broadway's Best</text> + <action>EXEC /usr/bin/cliSipie broadwaysbest</action> + </button> + <button> + <type>MUSIC</type> + <text>Symphony Hall</text> + <action>EXEC /usr/bin/cliSipie symphonyhall</action> + </button> + <button> + <type>MUSIC</type> + <text>Met Opera Radio</text> + <action>EXEC /usr/bin/cliSipie metropolitanopera</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius Pops</text> + <action>EXEC /usr/bin/cliSipie siriuspops</action> + </button> + <button> + <type>MUSIC</type> + <text>Universo Latino</text> + <action>EXEC /usr/bin/cliSipie universolatino</action> + </button> + <button> + <type>MUSIC</type> + <text>Rumbon</text> + <action>EXEC /usr/bin/cliSipie rumbon</action> + </button> + <button> + <type>MUSIC</type> + <text>Martha Stewart</text> + <action>EXEC /usr/bin/cliSipie marthastewartlivingradio</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius Stars</text> + <action>EXEC /usr/bin/cliSipie siriusstars</action> + </button> + <button> + <type>MUSIC</type> + <text>OutQ Gay Radio</text> + <action>EXEC /usr/bin/cliSipie siriusoutq</action> + </button> + <button> + <type>MUSIC</type> + <text>Patriot</text> + <action>EXEC /usr/bin/cliSipie siriuspatriot</action> + </button> + <button> + <type>MUSIC</type> + <text>Left</text> + <action>EXEC /usr/bin/cliSipie siriusleft</action> + </button> + <button> + <type>MUSIC</type> + <text>CNN</text> + <action>EXEC /usr/bin/cliSipie cnn</action> + </button> + <button> + <type>MUSIC</type> + <text>wrn</text> + <action>EXEC /usr/bin/cliSipie wrn</action> + </button> + <button> + <type>MUSIC</type> + <text>Blue Collar Comedy</text> + <action>EXEC /usr/bin/cliSipie bluecollarcomedy</action> + </button> + <button> + <type>MUSIC</type> + <text>Raw Dog Comedy</text> + <action>EXEC /usr/bin/cliSipie rawdog</action> + </button> + <button> + <type>MUSIC</type> + <text>Laugh Break Comedy</text> + <action>EXEC /usr/bin/cliSipie laughbreak</action> + </button> + <button> + <type>MUSIC</type> + <text>thefoxxhole</text> + <action>EXEC /usr/bin/cliSipie thefoxxhole</action> + </button> + <button> + <type>MUSIC</type> + <text>lime</text> + <action>EXEC /usr/bin/cliSipie lime</action> + </button> + <button> + <type>MUSIC</type> + <text>Kids Stuff</text> + <action>EXEC /usr/bin/cliSipie kidsstuff</action> + </button> + <button> + <type>MUSIC</type> + <text>Catholic Channel</text> + <action>EXEC /usr/bin/cliSipie thecatholicchannel</action> + </button> + <button> + <type>MUSIC</type> + <text>EWTN</text> + <action>EXEC /usr/bin/cliSipie ewtnglobal</action> + </button> + <button> + <type>MUSIC</type> + <text>christiantalk</text> + <action>EXEC /usr/bin/cliSipie christiantalk</action> + </button> + <button> + <type>MUSIC</type> + <text>Sirius NFL Radio</text> + <action>EXEC /usr/bin/cliSipie siriusnflradio</action> + </button> + <button> + <type>MUSIC</type> + <text>Maxim Radio</text> + <action>EXEC /usr/bin/cliSipie maximradio</action> + </button> + <button> + <type>MUSIC</type> + <text>Cosmo Radio</text> + <action>EXEC /usr/bin/cliSipie cosmopolitanradio</action> + </button> + <button> + <type>TV_DELETE</type> + <text>Stop Listening</text> + <action>EXEC /usr/bin/sipie_kill</action> + </button> + +</mythmenu> + diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update.xml new file mode 100644 index 0000000..802774b --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update.xml @@ -0,0 +1,11 @@ +<mythmenu name="LinHES"> + + <button> + <type>JUMP Reload Theme</type> + <text>Check for Updates</text> + <description>Search for LinHES system updates</description> + <action>EXEC sudo /usr/LH/bin/linhes_update.sh</action> + <action>JUMP Reload Theme</action> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update2.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update2.xml new file mode 100644 index 0000000..ed527fd --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/update2.xml @@ -0,0 +1,24 @@ +<mythmenu name="LinHES"> + + <button> + <type>UPGRADE</type> + <text>Install Updates</text> + <description>Install updates for the LinHES system</description> + <action>EXEC sudo /usr/LH/bin/linhes_update2.sh install</action> + </button> + + <button> + <type>JUMP_RELOAD_THEME</type> + <text>Cancel Updates</text> + <description>Return to Main Menu</description> + <action>EXEC sudo /usr/LH/bin/linhes_update2.sh</action> + <action>JUMP Reload Theme</action> + </button> + + <button> + <type>UPGRADE</type> + <text>View Updates</text> + <description>Displays the packages to be updated</description> + <action>MENU update3.xml</action> + </button> +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/menu-xml/xmmenu.xml b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/xmmenu.xml new file mode 100644 index 0000000..6b26d11 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/menu-xml/xmmenu.xml @@ -0,0 +1,574 @@ +<!-- Current as of April 25, 2007 --> +<mythmenu name="XM"> + + <button> + <type>MUSIC</type> + <text>The '40s</text> + <action>EXEC /usr/bin/xamp kill 4</action> + </button> + + <button> + <type>MUSIC</type> + <text>The '50s</text> + <action>EXEC /usr/bin/xamp kill 5</action> + </button> + + <button> + <type>MUSIC</type> + <text>The '60s</text> + <action>EXEC /usr/bin/xamp kill 6</action> + </button> + + <button> + <type>MUSIC</type> + <text>The '70s</text> + <action>EXEC /usr/bin/xamp kill 7</action> + </button> + + <button> + <type>MUSIC</type> + <text>The '80s</text> + <action>EXEC /usr/bin/xamp kill 8</action> + </button> + + <button> + <type>MUSIC</type> + <text>The '90s</text> + <action>EXEC /usr/bin/xamp kill 9</action> + </button> + + <button> + <type>MUSIC</type> + <text>America</text> + <action>EXEC /usr/bin/xamp kill 10</action> + </button> + + <button> + <type>MUSIC</type> + <text>X Country</text> + <action>EXEC /usr/bin/xamp kill 12</action> + </button> + + <button> + <type>MUSIC</type> + <text>Willie's Place</text> + <action>EXEC /usr/bin/xamp kill 13</action> + </button> + + <button> + <type>MUSIC</type> + <text>Bluegrass Junction</text> + <action>EXEC /usr/bin/xamp kill 14</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Village</text> + <action>EXEC /usr/bin/xamp kill 15</action> + </button> + + <button> + <type>MUSIC</type> + <text>Highway 16</text> + <action>EXEC /usr/bin/xamp kill 16</action> + </button> + + <button> + <type>MUSIC</type> + <text>US Country</text> + <action>EXEC /usr/bin/xamp kill 17</action> + </button> + + <button> + <type>MUSIC</type> + <text>20 on 20</text> + <action>EXEC /usr/bin/xamp kill 20</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Heart</text> + <action>EXEC /usr/bin/xamp kill 23</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Blend</text> + <action>EXEC /usr/bin/xamp kill 25</action> + </button> + + <button> + <type>MUSIC</type> + <text>Flight 26</text> + <action>EXEC /usr/bin/xamp kill 26</action> + </button> + + <button> + <type>MUSIC</type> + <text>Cinemagic</text> + <action>EXEC /usr/bin/xamp kill 27</action> + </button> + + <button> + <type>MUSIC</type> + <text>On Broadway</text> + <action>EXEC /usr/bin/xamp kill 28</action> + </button> + + <button> + <type>MUSIC</type> + <text>U-Pop</text> + <action>EXEC /usr/bin/xamp kill 29</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Hitlist</text> + <action>EXEC /usr/bin/xamp kill 30</action> + </button> + + <button> + <type>MUSIC</type> + <text>Torch</text> + <action>EXEC /usr/bin/xamp kill 31</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Message</text> + <action>EXEC /usr/bin/xamp kill 32</action> + </button> + + <button> + <type>MUSIC</type> + <text>Spirit</text> + <action>EXEC /usr/bin/xamp kill 33</action> + </button> + + <button> + <type>MUSIC</type> + <text>enLighten</text> + <action>EXEC /usr/bin/xamp kill 34</action> + </button> + + <button> + <type>MUSIC</type> + <text>Deep Tracks</text> + <action>EXEC /usr/bin/xamp kill 40</action> + </button> + + <button> + <type>MUSIC</type> + <text>Boneyard</text> + <action>EXEC /usr/bin/xamp kill 41</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Liquid Metal</text> + <action>EXEC /usr/bin/xamp kill 42</action> + </button> + + <button> + <type>MUSIC</type> + <text>XMU</text> + <action>EXEC /usr/bin/xamp kill 43</action> + </button> + + <button> + <type>MUSIC</type> + <text>Fred</text> + <action>EXEC /usr/bin/xamp kill 44</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Cafe</text> + <action>EXEC /usr/bin/xamp kill 45</action> + </button> + + <button> + <type>MUSIC</type> + <text>Top Tracks</text> + <action>EXEC /usr/bin/xamp kill 46</action> + </button> + + <button> + <type>MUSIC</type> + <text>Ethel</text> + <action>EXEC /usr/bin/xamp kill 47</action> + </button> + + <button> + <type>MUSIC</type> + <text>Squizz</text> + <action>EXEC /usr/bin/xamp kill 48</action> + </button> + + <button> + <type>MUSIC</type> + <text>Big Tracks</text> + <action>EXEC /usr/bin/xamp kill 49</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Loft</text> + <action>EXEC /usr/bin/xamp kill 50</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Music Lab</text> + <action>EXEC /usr/bin/xamp kill 51</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Verge</text> + <action>EXEC /usr/bin/xamp kill 52</action> + </button> + + <button> + <type>MUSIC</type> + <text>Fungus</text> + <action>EXEC /usr/bin/xamp kill 53</action> + </button> + + <button> + <type>MUSIC</type> + <text>Lucy</text> + <action>EXEC /usr/bin/xamp kill 54</action> + </button> + + <button> + <type>MUSIC</type> + <text>Soul Street</text> + <action>EXEC /usr/bin/xamp kill 60</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Flow</text> + <action>EXEC /usr/bin/xamp kill 61</action> + </button> + + <button> + <type>MUSIC</type> + <text>Suite 62</text> + <action>EXEC /usr/bin/xamp kill 62</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Groove</text> + <action>EXEC /usr/bin/xamp kill 64</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Rhyme</text> + <action>EXEC /usr/bin/xamp kill 65</action> + </button> + + <button> + <type>MUSIC</type> + <text>RAW</text> + <action>EXEC /usr/bin/xamp kill 66</action> + </button> + + <button> + <type>MUSIC</type> + <text>The City</text> + <action>EXEC /usr/bin/xamp kill 67</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Heat</text> + <action>EXEC /usr/bin/xamp kill 68</action> + </button> + + <button> + <type>MUSIC</type> + <text>Real Jazz</text> + <action>EXEC /usr/bin/xamp kill 70</action> + </button> + + <button> + <type>MUSIC</type> + <text>Watercolors</text> + <action>EXEC /usr/bin/xamp kill 71</action> + </button> + + <button> + <type>MUSIC</type> + <text>Beyond Jazz</text> + <action>EXEC /usr/bin/xamp kill 72</action> + </button> + + <button> + <type>MUSIC</type> + <text>High Standards</text> + <action>EXEC /usr/bin/xamp kill 73</action> + </button> + + <button> + <type>MUSIC</type> + <text>Bluesville</text> + <action>EXEC /usr/bin/xamp kill 74</action> + </button> + + <button> + <type>MUSIC</type> + <text>Hear Music</text> + <action>EXEC /usr/bin/xamp kill 75</action> + </button> + + <button> + <type>MUSIC</type> + <text>Fine Tuning</text> + <action>EXEC /usr/bin/xamp kill 76</action> + </button> + + <button> + <type>MUSIC</type> + <text>Audio Visions</text> + <action>EXEC /usr/bin/xamp kill 77</action> + </button> + + <button> + <type>MUSIC</type> + <text>Escape</text> + <action>EXEC /usr/bin/xamp kill 78</action> + </button> + + <button> + <type>MUSIC</type> + <text>On The Rocks</text> + <action>EXEC /usr/bin/xamp kill 79</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Move</text> + <action>EXEC /usr/bin/xamp kill 80</action> + </button> + + <button> + <type>MUSIC</type> + <text>BPM</text> + <action>EXEC /usr/bin/xamp kill 81</action> + </button> + + <button> + <type>MUSIC</type> + <text>The System</text> + <action>EXEC /usr/bin/xamp kill 82</action> + </button> + + <button> + <type>MUSIC</type> + <text>Chrome</text> + <action>EXEC /usr/bin/xamp kill 83</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM-Chill</text> + <action>EXEC /usr/bin/xamp kill 84</action> + </button> + + <button> + <type>MUSIC</type> + <text>Fuego</text> + <action>EXEC /usr/bin/xamp kill 90</action> + </button> + + <button> + <type>MUSIC</type> + <text>Viva</text> + <action>EXEC /usr/bin/xamp kill 91</action> + </button> + + <button> + <type>MUSIC</type> + <text>Aguila</text> + <action>EXEC /usr/bin/xamp kill 92</action> + </button> + + <button> + <type>MUSIC</type> + <text>Caliente</text> + <action>EXEC /usr/bin/xamp kill 94</action> + </button> + + <button> + <type>MUSIC</type> + <text>Luna</text> + <action>EXEC /usr/bin/xamp kill 95</action> + </button> + + <button> + <type>MUSIC</type> + <text>Air Musique</text> + <action>EXEC /usr/bin/xamp kill 100</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Joint</text> + <action>EXEC /usr/bin/xamp kill 101</action> + </button> + + <button> + <type>MUSIC</type> + <text>Sur La Route</text> + <action>EXEC /usr/bin/xamp kill 102</action> + </button> + + <button> + <type>MUSIC</type> + <text>World Zone</text> + <action>EXEC /usr/bin/xamp kill 103</action> + </button> + + <button> + <type>MUSIC</type> + <text>Ngoma</text> + <action>EXEC /usr/bin/xamp kill 104</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Classics</text> + <action>EXEC /usr/bin/xamp kill 110</action> + </button> + + <button> + <type>MUSIC</type> + <text>Vox</text> + <action>EXEC /usr/bin/xamp kill 112</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Pops</text> + <action>EXEC /usr/bin/xamp kill 113</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Kids</text> + <action>EXEC /usr/bin/xamp kill 116</action> + </button> + + <button> + <type>MUSIC</type> + <text>Bob Edwards Show</text> + <action>EXEC /usr/bin/xamp kill 133</action> + </button> + + <button> + <type>MUSIC</type> + <text>XM Comedy</text> + <action>EXEC /usr/bin/xamp kill 150</action> + </button> + + <button> + <type>MUSIC</type> + <text>Laugh USA</text> + <action>EXEC /usr/bin/xamp kill 151</action> + </button> + + <button> + <type>MUSIC</type> + <text>Special X</text> + <action>EXEC /usr/bin/xamp kill 154</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Agenda</text> + <action>EXEC /usr/bin/xamp kill 134</action> + </button> + + <button> + <type>MUSIC</type> + <text>Oprah and Friends</text> + <action>EXEC /usr/bin/xamp kill 156</action> + </button> + + <button> + <type>MUSIC</type> + <text>The Virus</text> + <action>EXEC /usr/bin/xamp kill 202</action> + </button> + + <button> + <type>MUSIC</type> + <text>1 Hit Wonders</text> + <action>EXEC /usr/bin/xamp kill 300</action> + </button> + + <button> + <type>MUSIC</type> + <text>Metalcore</text> + <action>EXEC /usr/bin/xamp kill 301</action> + </button> + + <button> + <type>MUSIC</type> + <text>New Indie First</text> + <action>EXEC /usr/bin/xamp kill 302</action> + </button> + + <button> + <type>MUSIC</type> + <text>Late Night Mix</text> + <action>EXEC /usr/bin/xamp kill 303</action> + </button> + + <button> + <type>MUSIC</type> + <text>Sessions@AOL</text> + <action>EXEC /usr/bin/xamp kill 304</action> + </button> + + <button> + <type>MUSIC</type> + <text>Shuffle</text> + <action>EXEC /usr/bin/xamp kill 305</action> + </button> + + <button> + <type>MUSIC</type> + <text>New Rock First</text> + <action>EXEC /usr/bin/xamp kill 306</action> + </button> + + <button> + <type>MUSIC</type> + <text>New Country First</text> + <action>EXEC /usr/bin/xamp kill 307</action> + </button> + + <button> + <type>MUSIC</type> + <text>New Hip Hop First</text> + <action>EXEC /usr/bin/xamp kill 308</action> + </button> + + <button> + <type>MUSIC</type> + <text>New Pop First</text> + <action>EXEC /usr/bin/xamp kill 309</action> + </button> + + <button> + <type>TV_DELETE</type> + <text>Stop Listening</text> + <action>EXEC /usr/bin/xamp kill</action> + </button> + +</mythmenu> diff --git a/abs/core/mythtv/stable-0.27/mythtv/myth_settings.patch b/abs/core/mythtv/stable-0.27/mythtv/myth_settings.patch new file mode 100644 index 0000000..27f9283 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/myth_settings.patch @@ -0,0 +1,1988 @@ +commit 0bfb6515f1c6f10d4d9d5d7297ca56a18ac3c138 +Author: James Meyer <james.meyer@operamail.com> +Date: Sun Nov 17 18:58:50 2013 -0600 + + mythutil updated with myth_settings for .27 + +diff --git a/mythtv/libs/libmythbase/mythcorecontext.cpp b/mythtv/libs/libmythbase/mythcorecontext.cpp +index e9cc880..4f7a3bd 100644 +--- a/mythtv/libs/libmythbase/mythcorecontext.cpp ++++ b/mythtv/libs/libmythbase/mythcorecontext.cpp +@@ -1262,6 +1262,90 @@ void MythCoreContext::ResetLanguage(void) + d->language.clear(); + } + ++//JM ADDED ++void MythCoreContext::savesettings_togroup (QString src_hostname, ++ QString saved_settingsgroupname ) ++{ ++ return d->m_database->savesettings_togroup(src_hostname, ++ saved_settingsgroupname); ++} ++ ++void MythCoreContext::deletesettings(QString delete_hostname, ++ QString saved_settingsgroupname) ++{ ++ return d->m_database->deletesettings(delete_hostname, ++ saved_settingsgroupname); ++} ++ ++QMap<QString,QStringList> MythCoreContext::list_settingsgroupname() ++{ ++ return d->m_database->list_settingsgroupname(); ++} ++ ++QMap<QString,QStringList> MythCoreContext::diff_settingsgroupname( ++ QString diff_hostname1, ++ QString diff_hostname2, ++ QStringList table_list) ++{ ++ return d->m_database->diff_settingsgroupname(diff_hostname1, ++ diff_hostname2, ++ table_list); ++} ++ ++void MythCoreContext::clonesettings(QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool is_full_clone, ++ QString dest_hostname) ++{ ++ return d->m_database->clonesettings(src_hostname, ++ saved_settingsgroupname, ++ table_list, ++ is_full_clone, ++ dest_hostname); ++} ++ ++void MythCoreContext::restoresettings(QString dest_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list ) ++{ ++ return d->m_database->restoresettings( dest_hostname, ++ saved_settingsgroupname, ++ table_list); ++} ++ ++void MythCoreContext::change_hostname(QString old_hostname, ++ QString new_hostname) ++{ ++ return d->m_database->change_hostname(old_hostname, new_hostname) ; ++} ++ ++bool MythCoreContext::settings_check(QString src_hostname, ++ QString saved_settingsgroupname) ++{ ++ return d->m_database->settings_check(src_hostname,saved_settingsgroupname); ++} ++ ++void MythCoreContext::import_settings(QMap<QString,QString> vp_map, ++ QString table) ++{ ++ return d->m_database->import_settings(vp_map, table); ++} ++ ++ ++QMap<QString, QMap<QString,QString> > MythCoreContext::export_settings( ++ QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, bool skip_host ) ++{ ++ return d->m_database->export_settings(src_hostname, ++ saved_settingsgroupname, ++ table_list , skip_host ); ++} ++ ++//END JM ADDED ++ ++ + void MythCoreContext::InitLocale(void ) + { + if (!d->m_locale) +diff --git a/mythtv/libs/libmythbase/mythcorecontext.h b/mythtv/libs/libmythbase/mythcorecontext.h +index aed83d7..3f0de5e 100644 +--- a/mythtv/libs/libmythbase/mythcorecontext.h ++++ b/mythtv/libs/libmythbase/mythcorecontext.h +@@ -198,7 +198,42 @@ class MBASE_PUBLIC MythCoreContext : public QObject, public MythObservable, publ + void emitTVPlaybackUnpaused(void) { emit TVPlaybackUnpaused(); } + void emitTVPlaybackAborted(void) { emit TVPlaybackAborted(); } + void emitTVPlaybackPlaying(void) { emit TVPlaybackPlaying(); } +- ++ ++ //JM ADDED ++ void savesettings_togroup(QString src_hostname, ++ QString saved_settingsgroupname ); ++ ++ void deletesettings(QString delete_hostname, ++ QString saved_settingsgroupname); ++ ++ QMap<QString,QStringList> list_settingsgroupname(); ++ QMap<QString,QStringList> diff_settingsgroupname(QString diff_hostname1, ++ QString diff_hostname2, ++ QStringList table_list); ++ ++ void clonesettings(QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool is_full_clone=TRUE, ++ QString dest_hostname=""); ++ ++ void restoresettings (QString dest_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list); ++ ++ void change_hostname (QString old_hostname, QString new_hostname); ++ ++ bool settings_check (QString src_hostname ,QString saved_settingsgroupname); ++ void import_settings(QMap<QString,QString> vp_map, QString table); ++ ++ QMap<QString,QMap <QString,QString> > export_settings( ++ QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool skip_host = FALSE ); ++ //END JM ADDED ++ ++ + signals: + void TVPlaybackStarted(void); + //// TVPlaybackStopped signal should be used in combination with +@@ -211,6 +246,7 @@ class MBASE_PUBLIC MythCoreContext : public QObject, public MythObservable, publ + void TVPlaybackAboutToStart(void); + void TVPlaybackPlaying(void); + ++ + private: + MythCoreContextPrivate *d; + +diff --git a/mythtv/libs/libmythbase/mythdb.cpp b/mythtv/libs/libmythbase/mythdb.cpp +index e60fce0..ed3bdf7 100644 +--- a/mythtv/libs/libmythbase/mythdb.cpp ++++ b/mythtv/libs/libmythbase/mythdb.cpp +@@ -775,7 +775,7 @@ void MythDB::OverrideSettingForSession( + QString mk = key.toLower(), mk2 = d->m_localhostname + ' ' + mk, mv = value; + if ("dbschemaver" == mk) + { +- LOG(VB_GENERAL, LOG_ERR, ++ LOG(VB_GENERAL, LOG_ERR, + QString("ERROR: Refusing to allow override for '%1'.").arg(key)); + return; + } +@@ -896,6 +896,1015 @@ void MythDB::WriteDelayedSettings(void) + } + } + ++//JM ADDED ++void MythDB::savesettings_togroup(QString src_hostname, ++ QString saved_settingsgroupname ) ++{ ++ LOG(VB_GENERAL, LOG_ERR, QString("Using hostname of : %1") ++ .arg(src_hostname)); ++ LOG(VB_GENERAL, LOG_ERR, QString("Saving to group: %1") ++ .arg(saved_settingsgroupname)); ++ if ( settings_check( src_hostname , "current" ) ) ++ { ++ QStringList table_list; ++ QString hostname_clause; ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ table_list.append("jumppoints"); ++ if ( src_hostname == "GLOBAL" ) ++ hostname_clause = "hostname IS NULL"; ++ else ++ hostname_clause ="hostname = :HOSTNAME"; ++ ++ foreach (QString table, table_list) ++ { ++ QString dest_tablename = table +"_" + saved_settingsgroupname ; ++ create_new_table(dest_tablename,table); ++ ++ QString query_string; ++ // Remove old saved values ++ MSqlQuery query(MSqlQuery::InitCon()); ++ query_string = QString("DELETE FROM %1 WHERE %2") ++ .arg(dest_tablename) ++ .arg(hostname_clause); ++ ++ //query_string = QString("DELETE FROM %1 WHERE " ++ // "hostname = :HOSTNAME").arg(dest_tablename); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" ,src_hostname); ++ query.exec(); ++ ++ //insert all new settings ++ query_string = QString("REPLACE INTO %1 " ++ "SELECT * from %2 where %3") ++ .arg(dest_tablename) ++ .arg(table) ++ .arg(hostname_clause); ++// query_string = QString("REPLACE INTO %1 " ++// "SELECT * from %2 where hostname = :HOSTNAME)") ++// .arg(dest_tablename) ++// .arg(table); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME",src_hostname); ++ query.exec(); ++ } ++ } ++ else ++ LOG(VB_GENERAL| VB_STDIO|VB_FLUSH, LOG_ERR, ++ QString("Couldn't find settings for: %1 \n").arg(src_hostname)); ++ return; ++ ++}; ++ ++void MythDB::deletesettings(QString delete_hostname, ++ QString saved_settingsgroupname) ++{ ++ LOG(VB_GENERAL, LOG_ERR, QString("Using hostname of : %1") ++ .arg(delete_hostname)); ++ LOG(VB_GENERAL, LOG_ERR, QString("Deleting: %1") ++ .arg(saved_settingsgroupname)); ++ int tempItem; ++ QString src_tablename; ++ QStringList table_list; ++ ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ table_list.append("jumppoints"); ++ QString hostname_clause; ++ if ( delete_hostname == "GLOBAL" ) ++ hostname_clause = "hostname IS NULL"; ++ else ++ hostname_clause ="hostname = :HOSTNAME"; ++ ++ foreach (QString table, table_list) ++ { ++ src_tablename = find_group_table_name(table, saved_settingsgroupname); ++ MSqlQuery query(MSqlQuery::InitCon()); ++ // Remove old saved values ++ if ( does_table_exist(src_tablename)) ++ { ++ QString query_string = QString("DELETE from %1 " ++ "WHERE %2") ++ .arg(src_tablename) ++ .arg(hostname_clause); ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" ,delete_hostname); ++ query.exec(); ++ ++ //check if ok to delete table ++ query_string = QString("SELECT count(*) from %1") ++ .arg(src_tablename); ++ query.prepare(query_string); ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ query.next(); ++ tempItem = query.value(0).toInt(); ++ if ( tempItem == 0 ) ++ drop_temp_table(src_tablename); ++ } ++ } ++ else ++ LOG(VB_GENERAL, LOG_ERR, ++ QString("Couldn't find table: %1").arg(src_tablename)); ++ } ++ return; ++}; // end delete settings ++ ++ ++QMap<QString,QStringList> MythDB::list_settingsgroupname() ++{ ++ //Returns a QMAP of "settings_groups: hostname" ++ MSqlQuery query(MSqlQuery::InitCon()); ++ MSqlQuery subquery(MSqlQuery::InitCon()); ++ QString tempItem; ++ QString temp_hostnameItem; ++ QStringList hostname_list; ++ QMap<QString,QStringList> return_list; ++ QString full_table_name; ++ query.prepare( "show tables like \"settings%\" " ); ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ full_table_name = query.value(0).toString(); ++ tempItem=query.value(0).toString().remove(QRegExp("settings_")); ++ if ( tempItem != "distro_default" ) ++ { ++ //loop over tables looking for hostnames ++ QString query_string = QString("SELECT DISTINCT " ++ "hostname from %1") ++ .arg(full_table_name); ++ subquery.prepare(query_string); ++ ++ if (subquery.exec() && subquery.isActive() ++ && subquery.size() > 0) ++ { ++ while (subquery.next()) ++ { ++ temp_hostnameItem = subquery.value(0).toString(); ++ hostname_list.append(temp_hostnameItem); ++ } ++ } ++ //Special case of naming for the settings table; ++ //This only affects output. ++ if ( tempItem == "settings" ) ++ return_list["current"] = hostname_list; ++ else ++ return_list[tempItem] = hostname_list; ++ ++ //reset hostname_list for the next group ++ hostname_list = QStringList(); ++ } ++ } ++ } ++ return return_list; ++}; // end list_settingsgroupname ++ ++QMap<QString,QStringList> MythDB::diff_settingsgroupname( ++ QString diff_hostname1 , ++ QString diff_hostname2, ++ QStringList table_list ) ++{ ++ // Returns a QMAP of tablename : diff results ++ LOG(VB_GENERAL, LOG_ERR, QString("Comparing settings for:")); ++ LOG(VB_GENERAL, LOG_ERR, QString("host 1: %1").arg(diff_hostname1)); ++ LOG(VB_GENERAL, LOG_ERR, QString("host 2: %1").arg(diff_hostname2)); ++ ++ QString qstr; ++ QString tempItem; ++ QString tempString; ++ ++ QStringList diff_list; ++ QStringList settings_list; ++ QStringList keybinding_list; ++ ++ QMap<QString,QStringList> return_list; ++ if ( table_list.isEmpty() ) ++ { ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ } ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ foreach (QString table, table_list) ++ { ++ if ( table == "settings") ++ { ++ ++ qstr= "SELECT distinct settings.value, :DIFF_HOSTNAME1 AS `hostname`, settings_a.data, :DIFF_HOSTNAME2 AS `hostname`" ++ " , settings_b.data FROM settings LEFT JOIN settings AS settings_a ON settings_a.value = settings.value AND settings_a.hostname = :DIFF_HOSTNAME1" ++ " LEFT JOIN settings AS settings_b ON settings_b.value = settings.value AND settings_b.hostname = :DIFF_HOSTNAME2" ++ " WHERE settings_a.data != settings_b.data OR " ++ " (settings_a.data IS NULL AND settings_b.data IS NOT NULL) OR (settings_a.data IS NOT NULL AND settings_b.data IS NULL);"; ++ ++ query.prepare(qstr); ++ query.bindValue(":DIFF_HOSTNAME1" , diff_hostname1); ++ query.bindValue(":DIFF_HOSTNAME2" , diff_hostname2); ++ ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ tempString=""; ++ //value ++ tempItem = query.value(0).toString(); ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //hostname_1 ++ tempItem = query.value(1).toString(); ++ if (tempItem.isEmpty()) ++ tempItem=diff_hostname1; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //data ++ tempItem = query.value(2).toString(); ++ if (tempItem.isEmpty()) ++ tempItem="NULL"; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //hostname_2 ++ tempItem = query.value(3).toString(); ++ if (tempItem.isEmpty()) ++ tempItem=diff_hostname2; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //data ++ tempItem = query.value(4).toString(); ++ if (tempItem.isEmpty()) ++ tempItem="NULL"; ++ tempString.append(tempItem); ++ ++ settings_list.append(tempString); ++ } ++ return_list["Settings"] = settings_list; ++ } ++ } ++ else if ( table == "keybindings") ++ { ++ ++ qstr="SELECT distinct keybindings.context, keybindings.action, :DIFF_HOSTNAME1 AS `hostname`, keybindings_a.keylist, :DIFF_HOSTNAME2 AS `hostname`, keybindings_b.keylist FROM keybindings " ++ " LEFT JOIN keybindings AS keybindings_a ON keybindings_a.context = keybindings.context AND keybindings_a.action = keybindings.action " ++ " AND keybindings_a.hostname = :DIFF_HOSTNAME1 " ++ " LEFT JOIN keybindings AS keybindings_b ON keybindings_b.context = keybindings.context " ++ " AND keybindings_b.action = keybindings.action AND keybindings_b.hostname = :DIFF_HOSTNAME2 " ++ " WHERE keybindings_a.keylist != keybindings_b.keylist OR " ++ " (keybindings_a.keylist IS NULL AND keybindings_b.keylist IS NOT NULL) OR (keybindings_a.keylist IS NOT NULL AND keybindings_b.keylist IS NULL);"; ++ query.prepare(qstr); ++ query.bindValue(":DIFF_HOSTNAME1" , diff_hostname1); ++ query.bindValue(":DIFF_HOSTNAME2" , diff_hostname2); ++ ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ tempString=""; ++ //context ++ tempItem = query.value(0).toString(); ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //action ++ tempItem = query.value(1).toString(); ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //hostname ++ tempItem = query.value(2).toString(); ++ if (tempItem.isEmpty()) ++ tempItem=diff_hostname1; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //keylist ++ tempItem = query.value(3).toString(); ++ if (tempItem.isEmpty()) ++ tempItem="NULL"; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //hostname ++ tempItem = query.value(4).toString(); ++ if (tempItem.isEmpty()) ++ tempItem=diff_hostname2; ++ tempString.append(tempItem); ++ tempString.append("|"); ++ ++ //keylist ++ tempItem = query.value(5).toString(); ++ if (tempItem.isEmpty()) ++ tempItem="NULL"; ++ tempString.append(tempItem); ++ keybinding_list.append(tempString); ++ } ++ return_list["Keybindings"] = keybinding_list; ++ } ++ } ++ ++ } ++ return return_list; ++}; //end diff_settingsgroupname ++ ++void MythDB::clonesettings(QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool is_full_clone, QString dest_hostname) ++{ ++ LOG(VB_GENERAL, LOG_ERR, QString("Using src hostname of : %1") ++ .arg(src_hostname)); ++ LOG(VB_GENERAL, LOG_ERR, QString("Using dest hostname of : %1") ++ .arg(dest_hostname)); ++ LOG(VB_GENERAL, LOG_ERR, QString("Cloning setting group: %1") ++ .arg(saved_settingsgroupname)); ++ LOG(VB_GENERAL, LOG_ERR, QString("Full Copy : %1") ++ .arg(is_full_clone)); ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ QStringList::Iterator it; ++ QString current_table; ++ QString dest_tablename; ++ QString temptable; ++ ++ if ( table_list.isEmpty() ) ++ { ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ table_list.append("jumppoints"); ++ } ++ ++ for ( it = table_list.begin(); it != table_list.end(); ++it ) ++ { ++ current_table = *it ; ++ dest_tablename = find_group_table_name(current_table, ++ saved_settingsgroupname); ++ ++ if ( does_table_exist(dest_tablename)) ++ { ++ // create temp table for merging settings ++ temptable="temp_table_" + dest_tablename; ++ create_temp_table(temptable, current_table ); ++ ++ // copy in stored settings ++ QString query_string = QString("REPLACE INTO %1 " ++ "(SELECT * from %2 where hostname = :HOSTNAME)") ++ .arg(temptable) ++ .arg(dest_tablename); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME",src_hostname ); ++ query.exec(); ++ ++ // update hostname for dest_hostname ++ query_string = QString("UPDATE %1 set hostname = :HOSTNAME") ++ .arg(temptable); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" , dest_hostname ); ++ query.exec(); ++ ++ //if not full clone remove HOST% settings from temp table; ++ if ( current_table == "settings" && !is_full_clone) ++ { ++ query_string = QString("DELETE FROM %1 WHERE " ++ "hostname=:HOSTNAME and value like 'HOST%' " ) ++ .arg(temptable); ++ ++ query.prepare(query_string); ++ query.bindValue( ":HOSTNAME" , dest_hostname ); ++ query.exec(); ++ } ++ ++ //remove current settings from dest table, ++ //if not full clone, then leave HOST% ++ //Need to remove because the old table allows for duplicates ++ ++ if ( current_table == "settings" && !is_full_clone) ++ query_string = QString ("DELETE FROM %1 WHERE " ++ "hostname = :HOSTNAME " ++ "and value not like 'HOST%'") ++ .arg(dest_tablename); ++ ++ else ++ query_string = QString ("DELETE FROM %1 WHERE " ++ "hostname = :HOSTNAME ") ++ .arg(dest_tablename); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME",dest_hostname); ++ query.exec(); ++ ++ // copy new settings from temp to current ++ query_string = QString("REPLACE INTO %1 " ++ "(SELECT * from %2)") ++ .arg(dest_tablename) ++ .arg(temptable); ++ ++ query.prepare(query_string); ++ query.exec(); ++ ++ // drop temptable ++ drop_temp_table(temptable); ++ } ++ else ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Couldn't find table: %1") ++ .arg(dest_tablename)); ++ } ++}; //end clonesettings ++ ++void MythDB::restoresettings (QString dest_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list ) ++{ ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Restoring Settings:")); ++ LOG(VB_GENERAL, LOG_NOTICE, QString(" src: %1") ++ .arg(saved_settingsgroupname)); ++ LOG(VB_GENERAL, LOG_NOTICE, QString(" dest:%1") ++ .arg(dest_hostname)); ++ ++ QString hostname_clause; ++ if ( dest_hostname == "GLOBAL" ) ++ hostname_clause = "hostname IS NULL"; ++ else ++ hostname_clause ="hostname = :HOSTNAME"; ++ ++ bool table_check; ++ if ( saved_settingsgroupname == "distro_default" ) ++ table_check = settings_check ( "distro_default" , saved_settingsgroupname ); ++ else ++ table_check = settings_check ( dest_hostname , saved_settingsgroupname ); ++ ++ ++ if ( table_check == TRUE ) ++ { ++ MSqlQuery query(MSqlQuery::InitCon()); ++ QStringList::Iterator it; ++ QString current_table; ++ if ( table_list.isEmpty() ) ++ { ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ table_list.append("jumppoints"); ++ } ++ ++ for ( it = table_list.begin(); it != table_list.end(); ++it ) ++ { ++ current_table = *it ; ++ //find tablenames to use ++ QString src_tablename = find_group_table_name(current_table, ++ saved_settingsgroupname); ++ ++ QString temptable="temp_table_" + src_tablename; ++ if ( ! does_table_exist(src_tablename)) ++ { ++ LOG(VB_GENERAL, LOG_NOTICE, QString("table does not exist: %1") ++ .arg(src_tablename)); ++ continue; ++ } ++ // create temp table for merging settings ++ create_temp_table(temptable, current_table ); ++ ++ //could copy in current settings here to account for new stuff ++ ++ ++ ++ // copy in stored settings ++ QString query_string; ++ if ( saved_settingsgroupname == "distro_default" ) ++ { //special case for restoring default settings ++ query_string = QString("REPLACE INTO %1 " ++ "(SELECT * from %2 WHERE %3)") ++ .arg(temptable) ++ .arg(src_tablename) ++ .arg(hostname_clause); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME", "distro_default" ); ++ query.exec(); ++ ++ // update hostname in temp table from distro_default ++ query_string = QString("UPDATE %1 set hostname = :HOSTNAME") ++ .arg(temptable); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" , dest_hostname ); ++ query.exec(); ++ ++ } ++ else ++ { //normal use case ++ query_string = QString("REPLACE INTO %1 " ++ "(SELECT * from %2 WHERE %3)") ++ .arg(temptable) ++ .arg(src_tablename) ++ .arg(hostname_clause); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME",dest_hostname ); ++ query.exec(); ++ } ++ ++ //Remove current settings. ++ //Need to remove because the old table allows for duplicates ++ query_string = QString("DELETE FROM %1 WHERE " ++ "%2") ++ .arg(current_table) ++ .arg(hostname_clause); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME",dest_hostname); ++ query.exec(); ++ ++ // copy new settings from temp to current ++ query_string = QString("REPLACE INTO %1 " ++ "(SELECT * from %2)") ++ .arg(current_table) ++ .arg(temptable); ++ ++ query.prepare(query_string); ++ query.exec(); ++ // drop temptable ++ drop_temp_table(temptable); ++ } ++ } ++}; //end restore settings ++ ++void MythDB::change_hostname (QString old_hostname, QString new_hostname) ++{ ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Changing hostname from %1 -> %2") ++ .arg(old_hostname) ++ .arg(new_hostname)); ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ MSqlQuery sub_query(MSqlQuery::InitCon()); ++ query.prepare( "SHOW TABLES" ); ++ ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ QString table_name = query.value(0).toString(); ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Scanning %1") ++ .arg(table_name)); ++ ++ // LOOP OVER TABLES, CHECK IF IT HAS A HOSTNAME FIELD ++ QString query_string=QString("SHOW COLUMNS from %1 " ++ "where field='hostname'") ++ .arg(table_name); ++ sub_query.prepare(query_string); ++ ++ if (sub_query.exec() && sub_query.size() > 0) ++ { //update hostname ++ LOG(VB_GENERAL, LOG_NOTICE, QString(" Updating hostname in: %1") ++ .arg(table_name)); ++ query_string = QString("UPDATE %1 SET hostname = :NEW_HOSTNAME " ++ "WHERE hostname = :OLD_HOSTNAME") ++ .arg(table_name); ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":NEW_HOSTNAME" , new_hostname); ++ sub_query.bindValue(":OLD_HOSTNAME" , old_hostname); ++ sub_query.exec(); ++ } ++ } ++ } ++ ++ ++ ++ ++ ++ ++} ++ ++bool MythDB::settings_check(QString src_hostname, ++ QString saved_settingsgroupname) ++{ ++ int tempItem; ++ bool returncode = FALSE ; ++ QString table="settings"; ++ ++ QString tablename = find_group_table_name(table, saved_settingsgroupname); ++ QString hostname_clause; ++ if ( src_hostname == "GLOBAL" ) ++ hostname_clause = "hostname IS NULL"; ++ else ++ hostname_clause ="hostname = :HOSTNAME"; ++ ++ if (does_table_exist (tablename)) ++ { ++ MSqlQuery query(MSqlQuery::InitCon()); ++ QString query_string = QString("SELECT COUNT(data) from %1 " ++ "WHERE %2") ++ .arg(tablename) ++ .arg(hostname_clause); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" , src_hostname ); ++ ++ if (query.exec() && query.isActive() && query.size() > 0 ) ++ { ++ while (query.next()) ++ { ++ tempItem = query.value(0).toInt(); ++ if ( tempItem >= 1 ) ++ returncode = TRUE; ++ else ++ { ++ LOG(VB_GENERAL, LOG_NOTICE, ++ QString("Group %1 does not contain" ++ " valid settings") ++ .arg(saved_settingsgroupname)); ++ } ++ } ++ } ++ } ++ else ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Couldn't find table: %1") ++ .arg(tablename)); ++ return returncode; ++}; // end settings_check ++ ++void MythDB::import_settings(QMap<QString,QString> vp_map, ++ QString table) ++{ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ ++ //IMPORT SETTINGS TABLE ++ if (table.startsWith("settings")) ++ { ++ if ( table != "settings" ) ++ create_new_table(table,"settings"); ++ QString hostname = vp_map.value("hostname"); ++ QString value = vp_map.value("value"); ++ QString data = vp_map.value("data"); ++ ++ QString hostname_clause; ++ QVariant import_hostname = QVariant(QVariant::String); ++ ++ if ( hostname.isEmpty()) ++ hostname_clause = "hostname IS NULL"; ++ else ++ { ++ hostname_clause ="hostname = :HOSTNAME"; ++ import_hostname = hostname; ++ } ++ ++ QString query_string=QString("SELECT value, data, hostname " ++ "FROM %1 " ++ "WHERE %2 AND value = :VALUE " ++ "ORDER BY value") ++ .arg(table) ++ .arg(hostname_clause); ++ ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME", hostname); ++ query.bindValue(":VALUE", value); ++ ++ // if already exisiting records then update, otherwise insert ++ if (query.exec() && query.isActive()) ++ { ++ MSqlQuery sub_query(MSqlQuery::InitCon()); ++ if ( query.size() > 0 ) ++ { ++ query_string = QString("UPDATE " ++ "%1 " ++ "set data = :DATA " ++ "WHERE %2 AND " ++ "value = :VALUE ") ++ .arg(table) ++ .arg(hostname_clause); ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", import_hostname); ++ sub_query.bindValue(":VALUE", value); ++ sub_query.bindValue(":DATA", data); ++ sub_query.exec(); ++ } ++ else ++ { ++ query_string = QString("INSERT INTO " ++ " %1 " ++ "(value,data,hostname) " ++ "VALUES ( :VALUE , :DATA , :HOSTNAME)").arg(table); ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", import_hostname); ++ sub_query.bindValue(":VALUE", value); ++ sub_query.bindValue(":DATA", data); ++ sub_query.exec(); ++ } ++ } ++ } ++ //KEYBINDINGS TABLE ++ else if (table.startsWith("keybindings")) ++ { ++ if ( table != "keybindings" ) ++ create_new_table(table,"keybindings"); ++ QString hostname = vp_map.value("hostname"); ++ QString context = vp_map.value("context"); ++ QString action = vp_map.value("action"); ++ QString description = vp_map.value("description"); ++ QString keylist = vp_map.value("keylist"); ++ ++ QString query_string=QString("SELECT context,action,hostname " ++ "FROM %1 " ++ "WHERE hostname = :HOSTNAME AND " ++ "context = :CONTEXT " ++ "AND action = :ACTION ").arg(table); ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME", hostname); ++ query.bindValue(":CONTEXT", context); ++ query.bindValue(":ACTION", action); ++ ++ if (query.exec() && query.isActive()) ++ { ++ MSqlQuery sub_query(MSqlQuery::InitCon()); ++ if ( query.size() > 0 ) ++ { ++ query_string = QString("UPDATE " ++ " %1 " ++ "set keylist = :KEYLIST " ++ "WHERE hostname = :HOSTNAME AND " ++ "context = :CONTEXT " ++ "AND action = :ACTION ").arg(table); ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", hostname); ++ sub_query.bindValue(":KEYLIST", keylist); ++ sub_query.bindValue(":CONTEXT", context); ++ sub_query.bindValue(":ACTION", action); ++ sub_query.exec(); ++ } ++ else ++ { ++ query_string = QString("INSERT INTO " ++ " %1 " ++ " (context , action , description , keylist , hostname) " ++ " VALUES( " ++ " :CONTEXT ," ++ " :ACTION , " ++ " :DESCRIPTION , " ++ " :KEYLIST , " ++ " :HOSTNAME)").arg(table) ; ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", hostname); ++ sub_query.bindValue(":KEYLIST", keylist); ++ sub_query.bindValue(":CONTEXT", context); ++ sub_query.bindValue(":ACTION", action); ++ sub_query.bindValue(":DESCRIPTION", description); ++ sub_query.exec(); ++ } ++ } ++ } ++ //JUMP POINTS ++ else if (table.startsWith("jumppoints")) ++ { ++ if ( table != "jumppoints" ) ++ create_new_table(table,"jumppoints"); ++ QString hostname = vp_map.value("hostname"); ++ QString description = vp_map.value("description"); ++ QString destination = vp_map.value("destination"); ++ QString keylist = vp_map.value("keylist"); ++ ++ QString query_string=QString("SELECT destination, keylist " ++ "FROM %1 " ++ "WHERE hostname = :HOSTNAME AND " ++ "destination = :DESTINATION " ++ "AND keylist = :KEYLIST ").arg(table); ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME", hostname); ++ query.bindValue(":DESTINATION", destination); ++ query.bindValue(":KEYLIST", keylist); ++ ++ if (query.exec() && query.isActive()) ++ { ++ MSqlQuery sub_query(MSqlQuery::InitCon()); ++ if ( query.size() > 0 ) ++ { ++ query_string = QString("UPDATE " ++ " %1 " ++ "set keylist = :KEYLIST " ++ "WHERE hostname = :HOSTNAME AND " ++ "destination = :DESTINATION ").arg(table); ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", hostname); ++ sub_query.bindValue(":KEYLIST", keylist); ++ sub_query.bindValue(":DESTINATION", destination); ++ sub_query.exec(); ++ } ++ else ++ { ++ query_string = QString("INSERT INTO " ++ " %1 " ++ " (description , destination, keylist , hostname) " ++ " VALUES( " ++ " :DESCRIPTION ," ++ " :DESTINATION , " ++ " :KEYLIST , " ++ " :HOSTNAME)").arg(table) ; ++ ++ sub_query.prepare(query_string); ++ sub_query.bindValue(":HOSTNAME", hostname); ++ sub_query.bindValue(":KEYLIST", keylist); ++ sub_query.bindValue(":DESTINATION", destination); ++ sub_query.bindValue(":DESCRIPTION", description); ++ sub_query.exec(); ++ } ++ } ++ } ++}; //end import_settings ++ ++QMap<QString, QMap<QString,QString> > ++ MythDB::export_settings(QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, bool skip_host ) ++{ ++ QMap<QString, QMap<QString,QString> > result_set; ++ QStringList::Iterator it; ++ QString current_table; ++ int record_count = 0; ++ ++ if ( table_list.isEmpty() ) ++ { ++ table_list.append("settings"); ++ table_list.append("keybindings"); ++ table_list.append("jumppoints"); ++ } ++ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ QString query_string; ++ ++ //loop over tablelist ++ for ( it = table_list.begin(); it != table_list.end(); ++it ) ++ { ++ current_table = *it ; ++ QString sub_sql; ++ QStringList fields; ++ QString field_query; ++ ++ QString table_name = find_group_table_name(current_table, ++ saved_settingsgroupname); ++ ++ QString hostname_clause; ++ if ( src_hostname == "GLOBAL" ) ++ hostname_clause = "hostname IS NULL"; ++ else ++ hostname_clause ="hostname = :HOSTNAME"; ++ ++ // find field names ++ query_string = QString("SHOW COLUMNS from %1").arg(table_name); ++ query.prepare(query_string); ++ ++ //build up field name vars ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ if (! field_query.isEmpty()) ++ field_query +=','; ++ QString tempItem = query.value(0).toString(); ++ fields.append(tempItem); ++ field_query += tempItem; ++ } ++ } ++ // when working with settings table skip HOST if skip_host is true ++ if ( current_table == "settings" && skip_host == TRUE ) ++ { ++ QString skip_host_clause; ++ skip_host_clause = " VALUE not like 'HOST%' AND DATA not like 'HardwareProfile%UUID'" ; ++ query_string = QString("SELECT %1 FROM %2 WHERE %3 AND %4") ++ .arg(field_query) ++ .arg(table_name) ++ .arg(hostname_clause) ++ .arg(skip_host_clause); ++ ++ } ++ else ++ { ++ query_string = QString("SELECT %1 FROM %2 WHERE %3") ++ .arg(field_query) ++ .arg(table_name) ++ .arg(hostname_clause); ++ } ++ query.prepare(query_string); ++ query.bindValue(":HOSTNAME" , src_hostname); ++ ++ //looping over each record in the table query ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ //construct qmap of elements ++ //add table name ++ QMap<QString,QString> value_pair; ++ value_pair["table"]=table_name; ++ ++ for ( int i=0 ; i < fields.size();i++ ) ++ { ++ QString tempvalue = fields[i]; ++ QString tempItem = query.value(i).toString(); ++ value_pair[tempvalue]=tempItem; ++ } ++ result_set[QString(record_count)] = value_pair; ++ record_count++; ++ } ++ } ++ ++ } // end table loop ++ return result_set; ++}; //end export_settings ++ ++ ++void MythDB::create_new_table (QString create_table_name,QString like_name) ++{ ++ if ( ! does_table_exist(create_table_name)) ++ { ++ MSqlQuery query(MSqlQuery::InitCon()); ++ QString query_string = QString("CREATE TABLE %1 like %2") ++ .arg(create_table_name) ++ .arg(like_name); ++ ++ query.prepare(query_string); ++ query.exec(); ++ } ++ else ++ LOG(VB_GENERAL, LOG_NOTICE, QString("Table is already present," ++ "will not create it: %1") ++ .arg(create_table_name)); ++}; ++ ++ ++void MythDB::drop_temp_table (QString table_name) ++{ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ if (table_name == "settings" | table_name == "keybindings" | table_name == "jumppoints") ++ return; ++ QString query_string = QString("DROP TABLE %1").arg(table_name); ++ query.prepare(query_string); ++ query.exec(); ++ return; ++} ++ ++void MythDB::create_temp_table (QString create_table_name,QString like_name) ++{ ++ MSqlQuery query(MSqlQuery::InitCon()); ++ create_new_table(create_table_name,like_name); ++ QString query_string; ++ if ( like_name == "settings") ++ { ++ query_string = QString ("ALTER TABLE %1 ADD UNIQUE( value)") ++ .arg(create_table_name); ++ query.prepare(query_string); ++ query.exec(); ++ } ++ ++ query_string = QString("TRUNCATE %1").arg(create_table_name); ++ query.prepare(query_string); ++ query.exec(); ++ return; ++} ++ ++bool MythDB::does_table_exist(QString table_name) ++{ ++ bool table_exist = FALSE; ++ QString full_table_name; ++ MSqlQuery query(MSqlQuery::InitCon()); ++ ++ query.prepare( "SHOW TABLES" ); ++ if (query.exec() && query.isActive() && query.size() > 0) ++ { ++ while (query.next()) ++ { ++ full_table_name = query.value(0).toString(); ++ if (table_name == full_table_name) ++ { ++ table_exist = TRUE; ++ break; ++ } ++ } ++ } ++ return table_exist; ++}; ++ ++ ++QString MythDB::find_group_table_name(QString current_table, ++ QString saved_settingsgroupname) ++{ ++ QString table_name; ++ if ( saved_settingsgroupname.toLower() == "current" ) ++ table_name = current_table ; ++ else ++ table_name = current_table + "_" + saved_settingsgroupname ; ++ ++ return table_name; ++}; ++//END JM ADDED ++ + /** + * \brief Set a flag indicating we have successfully connected to the database + */ +diff --git a/mythtv/libs/libmythbase/mythdb.h b/mythtv/libs/libmythbase/mythdb.h +index ac2a8ec..f3689a5 100644 +--- a/mythtv/libs/libmythbase/mythdb.h ++++ b/mythtv/libs/libmythbase/mythdb.h +@@ -74,6 +74,49 @@ class MBASE_PUBLIC MythDB + + void WriteDelayedSettings(void); + ++ //JM ADDED ++ void savesettings_togroup(QString src_hostname, ++ QString saved_settingsgroupname ); ++ void deletesettings(QString delete_hostname, ++ QString saved_settingsgroupname); ++ ++ QMap<QString,QStringList> list_settingsgroupname(); ++ ++ QMap<QString,QStringList> diff_settingsgroupname(QString diff_hostname1, ++ QString diff_hostname2, ++ QStringList table_list); ++ ++ void clonesettings(QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool is_full_clone=TRUE, ++ QString dest_hostname=""); ++ ++ void restoresettings (QString dest_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list); ++ ++ void change_hostname (QString old_hostname, QString new_hostname); ++ bool settings_check (QString src_hostname, QString saved_settingsgroupname); ++ void import_settings(QMap<QString,QString> vp_map, QString table); ++ ++ ++ QMap<QString,QMap <QString,QString> > export_settings( ++ QString src_hostname, ++ QString saved_settingsgroupname, ++ QStringList table_list, ++ bool skip_host = FALSE); ++ ++ void create_new_table (QString create_table_name,QString like_name); ++ void drop_temp_table (QString table_name); ++ void create_temp_table (QString create_table_name,QString like_name); ++ bool does_table_exist(QString table_name); ++ QString find_group_table_name(QString current_table, ++ QString saved_settingsgroupname); ++ //END JM ADDED ++ ++ ++ + void SetHaveDBConnection(bool connected); + void SetHaveSchema(bool schema); + bool HaveSchema(void) const; +diff --git a/mythtv/programs/mythutil/commandlineparser.cpp b/mythtv/programs/mythutil/commandlineparser.cpp +index 902314d..d86b548 100644 +--- a/mythtv/programs/mythutil/commandlineparser.cpp ++++ b/mythtv/programs/mythutil/commandlineparser.cpp +@@ -144,6 +144,37 @@ void MythUtilCommandLineParser::LoadArguments(void) + << add("--print-notification-template", "printntemplate", false, + "Print the template to be sent to the frontend", "") + ->SetGroup("Messaging") ++ ++ //settingsutil.cpp ++ << add("--save-settings", "savesettings", false, ++ "Save current settings", "") ++ ->SetGroup("Settings") ++ << add("--delete-settings", "deletesettings", false, ++ "Delete current settings", "") ++ ->SetGroup("Settings") ++ << add("--restore-settings", "restoresettings", false, ++ "Restore settings from previous backup", "") ++ ->SetGroup("Settings") ++ << add("--list-groups", "listgroups", false, ++ "List hosts and groups of settings", "") ++ ->SetGroup("Settings") ++ << add("--copy-settings", "copysettings", false, ++ "Copy or Clone settings from one host to another", "") ++ ->SetGroup("Settings") ++ << add("--diff-settings", "diffsettings", false, ++ "Show settings that are different between two hosts", "") ++ ->SetGroup("Settings") ++ << add("--change-hostname", "changehostname", false, ++ "Change the hostname", "") ++ ->SetGroup("Settings") ++ << add("--import-settings", "importsettings", false, ++ "import settings", "") ++ ->SetRequiredChild("infile") ++ ++ << add("--export-settings", "exportsettings", false, ++ "export settings", "") ++ ->SetRequiredChild("outfile") ++ + ); + + // mpegutils.cpp +@@ -194,6 +225,59 @@ void MythUtilCommandLineParser::LoadArguments(void) + add("--type", "type", "type", "(optional) type of notification (normal, error, warning, check, busy", "") + ->SetChildOf("notification"); + ++ //settingsutils.cpp ++ add("--groupname", "groupname", "", "Group of settings name", "") ++ ->SetRequiredChildOf("savesettings") ++ ->SetRequiredChildOf("restoresettings") ++ ->SetRequiredChildOf("deletesettings") ++ ->SetChildOf("copysettings"); ++ ++ add("--hostname", "hostname", "", "System name to save/restore settings", "") ++ ->SetChildOf("savesettings") ++ ->SetChildOf("restoresettings") ++ ->SetChildOf("copysettings") ++ ->SetChildOf("deletesettings") ++ ->SetChildOf("exportsettings") ++ ->SetChildOf("importsettings"); ++ ++ add("--host_1", "host_1", "", "First host in compare list", "") ++ ->SetRequiredChildOf("diffsettings"); ++ ++ add("--host_2", "host_2", "", "Second host in compare list", "") ++ ->SetRequiredChildOf("diffsettings"); ++ ++ ++ add("--tablelist", "table_list", "", "List of tables to operate on " ++ "[keybindings,settings]", "") ++ ->SetChildOf("diffsettings") ++ ->SetChildOf("restoresettings") ++ ->SetChildOf("copysettings") ++ ->SetChildOf("exportsettings"); ++ ++ add("--clone", "fullclone", false, "Enable copy of all settings, " ++ "including those that are unique to each system.", "") ++ ->SetChildOf("copysettings"); ++ ++ ++ add("--old-host", "oldhost", "", "Hostname to change", "") ++ ->SetRequiredChildOf("changehostname"); ++ ++ add("--new-host", "newhost", "", "New hostname", "") ++ ->SetRequiredChildOf("changehostname") ++ ->SetRequiredChildOf("copysettings"); ++ ++ add("--format", "format", false, "Format output of differences", "") ++ ->SetChildOf("diffsettings"); ++ add("--distro-default", "distro-default", false, "Export settings for" ++ "import into the default table", "") ++ ->SetChildOf("exportsettings"); ++ add("--generic", "generic", false, "export settings without saving " ++ "the hostname", "") ++ ->SetChildOf("exportsettings"); ++ ++ ++ ++ + // Generic Options used by more than one utility + addRecording(); + addInFile(true); +diff --git a/mythtv/programs/mythutil/main.cpp b/mythtv/programs/mythutil/main.cpp +index 0bc49f2..faada3d 100644 +--- a/mythtv/programs/mythutil/main.cpp ++++ b/mythtv/programs/mythutil/main.cpp +@@ -22,6 +22,7 @@ + #include "markuputils.h" + #include "messageutils.h" + #include "signalhandling.h" ++#include "settingsutils.h" + + + int main(int argc, char *argv[]) +@@ -105,6 +106,7 @@ int main(int argc, char *argv[]) + registerJobUtils(utilMap); + registerMarkupUtils(utilMap); + registerMessageUtils(utilMap); ++ registerSettingsUtils(utilMap); + + bool cmdFound = false; + int cmdResult = GENERIC_EXIT_OK; +diff --git a/mythtv/programs/mythutil/mythutil.pro b/mythtv/programs/mythutil/mythutil.pro +index f0ecbf5..f9472fc 100644 +--- a/mythtv/programs/mythutil/mythutil.pro ++++ b/mythtv/programs/mythutil/mythutil.pro +@@ -13,7 +13,7 @@ TARGET = mythutil + target.path = $${PREFIX}/bin + INSTALLS = target + +-LIBS += $$EXTRA_LIBS ++LIBS += $$EXTRA_LIBS + INCLUDEPATH += ../../libs/libmythbase + + QMAKE_CLEAN += $(TARGET) +@@ -22,8 +22,10 @@ QMAKE_CLEAN += $(TARGET) + HEADERS += mythutil.h commandlineparser.h + HEADERS += backendutils.h fileutils.h jobutils.h markuputils.h + HEADERS += messageutils.h mpegutils.h ++HEADERS += settingsutils.h + SOURCES += main.cpp mythutil.cpp commandlineparser.cpp + SOURCES += backendutils.cpp fileutils.cpp jobutils.cpp markuputils.cpp + SOURCES += messageutils.cpp mpegutils.cpp ++SOURCES += settingsutils.cpp + + mingw|win32-msvc*: LIBS += -lwinmm -lws2_32 +diff --git a/mythtv/programs/mythutil/settingsutils.cpp b/mythtv/programs/mythutil/settingsutils.cpp +new file mode 100644 +index 0000000..8fc7b0e +--- /dev/null ++++ b/mythtv/programs/mythutil/settingsutils.cpp +@@ -0,0 +1,586 @@ ++// C++ includes ++#include <iostream> ++ ++//QT includes ++#include <qdom.h> ++#include <QFile> ++#include <QDomElement> ++ ++// libmyth* includes ++#include "compat.h" ++#include "exitcodes.h" ++#include "mythlogging.h" ++#include "mythcontext.h" ++ ++ ++#include "settingsutils.h" ++ ++ ++static int SaveSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ QString src_hostname; ++ QString groupname; ++ ++ if (cmdline.toBool("groupname")) ++ groupname = cmdline.toString("groupname"); ++ ++ if (cmdline.toBool("hostname")) ++ src_hostname = cmdline.toString("hostname"); ++ else ++ src_hostname = gCoreContext->GetHostName(); ++ ++ gCoreContext->savesettings_togroup(src_hostname,groupname); ++ return GENERIC_EXIT_OK; ++} ++ ++static int DeleteSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ ++ QString delete_hostname; ++ QString groupname; ++ ++ if (cmdline.toBool("groupname")) ++ groupname = cmdline.toString("groupname"); ++ ++ if (cmdline.toBool("hostname")) ++ delete_hostname = cmdline.toString("hostname"); ++ else ++ delete_hostname = gCoreContext->GetHostName(); ++ ++ ++ gCoreContext->deletesettings(delete_hostname,groupname); ++ ++ return GENERIC_EXIT_OK; ++} ++ ++ ++static int RestoreSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ QString dest_hostname; ++ QString groupname; ++ QString tablestring; ++ QStringList table_list; ++ ++ if (cmdline.toBool("groupname")) ++ groupname = cmdline.toString("groupname"); ++ ++ ++ if (cmdline.toBool("hostname")) ++ dest_hostname = cmdline.toString("hostname"); ++ else ++ dest_hostname = gCoreContext->GetHostName(); ++ ++ if (cmdline.toBool("table_list")) ++ { ++ tablestring = QString(cmdline.toString("table_list")); ++ table_list = tablestring.split(",", QString::SkipEmptyParts); ++ } ++ ++ gCoreContext->restoresettings(dest_hostname, ++ groupname, ++ table_list); ++ ++ return GENERIC_EXIT_OK; ++} ++ ++ ++static int CopySettings(const MythUtilCommandLineParser &cmdline) ++{ ++ QString src_hostname; ++ QString groupname; ++ QString tablestring; ++ QStringList table_list; ++ bool is_full_clone; ++ QString dest_hostname; ++ ++ if (cmdline.toBool("groupname")) ++ groupname = cmdline.toString("groupname"); ++ else ++ groupname = "Current"; ++ ++ if (cmdline.toBool("hostname")) ++ src_hostname = cmdline.toString("hostname"); ++ else ++ src_hostname = gCoreContext->GetHostName(); ++ ++ if (cmdline.toBool("newhost")) ++ dest_hostname = cmdline.toString("newhost"); ++ ++ if (cmdline.toBool("table_list")) ++ { ++ tablestring = QString(cmdline.toString("table_list")); ++ table_list = tablestring.split(",", QString::SkipEmptyParts); ++ } ++ ++ if (cmdline.toBool("fullclone")) ++ is_full_clone = TRUE; ++ else ++ is_full_clone = FALSE; ++ ++ gCoreContext->clonesettings(src_hostname, ++ groupname, ++ table_list, ++ is_full_clone, ++ dest_hostname); ++ ++ return GENERIC_EXIT_OK; ++} ++ ++void print_out_diff_formated(QMap<QString, QStringList> resultset) ++{ ++ QString settings_header; ++ QString keybindings_header; ++ QString tempString; ++ QString tempItem; ++ QString dashline_settings; ++ QString dashline_key; ++ QStringList tempList; ++ ++ QString host_1; ++ QString host_2; ++ QString data_1; ++ QString data_2; ++ QString value; ++ QString context; ++ QString action; ++ ++ int value_width = 35; ++ int data_width = 40; ++ ++ int context_width = 22; ++ int action_width = 22; ++ int key_width = 35; ++ ++ dashline_key = (tempString.fill('-', 133)); ++ dashline_settings = (tempString.fill('-', 130)); ++ ++ QMap<QString, QStringList>::iterator i; ++ ++ ++ for (i = resultset.begin(); i != resultset.end(); ++i) ++ { ++ cout << endl<<i.key().toLocal8Bit().constData() << ": \t" << endl;; ++ //construct the headers ++ if (i.key() == "Settings") ++ { ++ //settings header ++ tempList = (i.value().at(0)).split("|", QString::SkipEmptyParts); ++ host_1 = tempList.at(1); ++ host_2 = tempList.at(3); ++ tempString="|"; ++ tempItem = "Value"; ++ tempString.append(tempItem.leftJustified(value_width)); ++ tempString.append("|"); ++ tempItem = host_1; //hostname 1 ++ tempString.append(tempItem.leftJustified(data_width)); ++ tempString.append("|"); ++ tempItem = host_2; //hostname 2 ++ tempString.append(tempItem.leftJustified(data_width)); ++ tempString.append("|"); ++ settings_header = tempString; ++ ++ cout << settings_header.toLocal8Bit().constData() << endl;; ++ cout << dashline_settings.toLocal8Bit().constData() << endl; ++ } ++ ++ if (i.key() == "Keybindings") ++ { ++ //keybindings_header ++ tempList = (i.value().at(0)).split("|", QString::SkipEmptyParts); ++ host_1 = tempList.at(2); ++ host_2 = tempList.at(4); ++ tempString="|"; ++ tempItem = "Context"; ++ tempString.append(tempItem.leftJustified(context_width)); ++ tempString.append("|"); ++ tempItem = "Action"; ++ tempString.append(tempItem.leftJustified(action_width)); ++ tempString.append("|"); ++ tempItem = host_1; ++ tempString.append(tempItem.leftJustified(key_width)); ++ tempString.append("|"); ++ tempItem = host_2; ++ tempString.append(tempItem.leftJustified(key_width)); ++ tempString.append("|"); ++ keybindings_header = tempString; ++ ++ cout << keybindings_header.toLocal8Bit().constData() << endl;; ++ cout << dashline_key.toLocal8Bit().constData() << endl; ++ ++ } ++ // format each line ++ for (int y = 0; y < i.value().size(); ++y) ++ { ++ if (i.key() == "Settings") ++ { ++ tempList = (i.value().at(y)).split("|", ++ QString::SkipEmptyParts); ++ data_1 = tempList.at(2); ++ data_2 = tempList.at(4); ++ value = tempList.at(0); ++ tempString="|"; ++ tempItem = value; ++ tempString.append(tempItem.leftJustified(value_width)); ++ tempString.append("|"); ++ tempItem = data_1; ++ tempString.append(tempItem.leftJustified(data_width)); ++ tempString.append("|"); ++ tempItem = data_2; ++ tempString.append(tempItem.leftJustified(data_width)); ++ tempString.append("|"); ++ } ++ if (i.key() == "Keybindings") ++ { ++ tempList = (i.value().at(y)).split("|", ++ QString::SkipEmptyParts); ++ data_1 = tempList.at(3); ++ data_2 = tempList.at(5); ++ context = tempList.at(0); ++ action = tempList.at(1); ++ ++ tempString="|"; ++ tempItem = context; ++ tempString.append(tempItem.leftJustified(context_width)); ++ tempString.append("|"); ++ tempItem = action; ++ tempString.append(tempItem.leftJustified(action_width)); ++ tempString.append("|"); ++ tempItem = data_1; ++ tempString.append(tempItem.leftJustified(key_width)); ++ tempString.append("|"); ++ tempItem = data_2; ++ tempString.append(tempItem.leftJustified(key_width)); ++ tempString.append("|"); ++ } ++ ++ cout << tempString.toLocal8Bit().constData()<<endl; ++ } ++ } ++}; ++ ++static int DiffSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ QMap<QString, QStringList> resultset; ++ QString diff_hostname1; ++ QString diff_hostname2; ++ QStringList table_list; ++ bool format_results = FALSE; ++ QMap<QString, QStringList>::iterator i; ++ ++ if (cmdline.toBool("host_1")) ++ diff_hostname1 = cmdline.toString("host_1"); ++ if (cmdline.toBool("host_2")) ++ diff_hostname2 = cmdline.toString("host_2"); ++ ++ if (cmdline.toBool("table_list")) ++ { ++ QString tablestring = QString(cmdline.toString("table_list")); ++ table_list = tablestring.split(",", QString::SkipEmptyParts); ++ } ++ ++ if (cmdline.toBool("format")) ++ format_results = TRUE; ++ ++ resultset = gCoreContext->diff_settingsgroupname(diff_hostname1, ++ diff_hostname2, ++ table_list); ++ if (resultset.isEmpty()) ++ cout << "No differences found" << endl; ++ else ++ { ++ if (format_results) ++ print_out_diff_formated(resultset); ++ else ++ { ++ for (i = resultset.begin(); i != resultset.end(); ++i) ++ { ++ cout << i.key().toLocal8Bit().constData() << " : \t" << endl;; ++ for (int y = 0; y < i.value().size(); ++y) ++ cout << i.value().at(y).toLocal8Bit().constData()<<endl; ++ cout << endl; ++ } ++ } ++ } ++ return GENERIC_EXIT_OK; ++};// DiffSettings ++ ++static int ListGroups(const MythUtilCommandLineParser &cmdline) ++{ ++ QMap<QString, QStringList> resultset; ++ resultset = gCoreContext->list_settingsgroupname(); ++ QMap<QString, QStringList>::iterator i; ++ cout << endl; ++ for (i = resultset.begin(); i != resultset.end(); ++i) ++ { ++ cout << i.key().toLocal8Bit().constData() << " : \t"; ++ for (int y = 0; y < i.value().size(); ++y) ++ cout << i.value().at(y).toLocal8Bit().constData()<<" " ; ++ cout << endl; ++ } ++ return GENERIC_EXIT_OK; ++}; ++ ++static int ImportSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ ++ if (cmdline.toString("infile").isEmpty()) ++ { ++ LOG(VB_STDIO|VB_FLUSH, LOG_ERR, "Missing --infile option\n"); ++ return GENERIC_EXIT_INVALID_CMDLINE; ++ } ++ QString import_hostname; ++ bool change_name = FALSE; ++ if (cmdline.toBool("hostname")) ++ { ++ change_name = TRUE; ++ import_hostname = cmdline.toString("hostname"); ++ } ++ QString import_filename = cmdline.toString("infile"); ++ QFile myFile(import_filename); ++ ++ QDomDocument doc( "exported_xml" ); ++ doc.setContent( &myFile ); ++ ++ QDomElement docElement = doc.documentElement(); ++ QDomElement record_element; ++ ++ if ( docElement.nodeName() != "exported_xml" ) ++ { ++ cout << "not a valid exported xml file" << endl; ++ return 1; ++ } ++ ++ QString out_string = "Importing records, please be patient"; ++ cout << out_string.toLocal8Bit().constData() << endl; ++ //Gives list of records in the file + count ++ QDomNodeList nodeList = docElement.childNodes(); ++ int total_records = nodeList.count(); ++ out_string = QString("\nFound %1 records \n").arg(total_records); ++ cout << out_string.toLocal8Bit().constData() << endl; ++ LOG(VB_STDIO|VB_FLUSH, LOG_ERR, out_string); ++ ++ for(QDomNode n = docElement.firstChild(); !n.isNull(); n = n.nextSibling()) ++ { ++ QString table_name=QString(); ++ QMap<QString,QString> value_pair_map ; ++ ++ //find table name for this record ++ QDomNode tablenode=n.namedItem("table"); ++ record_element = tablenode.toElement(); ++ table_name = record_element.text(); ++ ++ //loop over childern of n and convert to element ++ for(QDomNode subn = n.firstChild(); ++ !subn.isNull(); ++ subn = subn.nextSibling()) ++ { ++ record_element = subn.toElement(); ++ if ( record_element.nodeName() == "table" ) ++ continue; ++ if ( change_name && record_element.nodeName() == "hostname" ) ++ value_pair_map[record_element.nodeName()] = import_hostname; ++ else ++ value_pair_map[record_element.nodeName()] = record_element.text(); ++ } ++ if (import_filename.endsWith("syssettings.xml")) ++ { ++ if ( value_pair_map["value"] == "BackendServerIP") ++ { ++ out_string = "sysettings, ignoring backendserver ip record"; ++ cout << out_string.toLocal8Bit().constData() << endl; ++ } ++ else ++ gCoreContext->import_settings(value_pair_map,table_name); ++ } ++ else ++ //perform insert ++ gCoreContext->import_settings(value_pair_map,table_name); ++ } ++ return GENERIC_EXIT_OK; ++}; //end ImportSettings ++ ++ ++static int ExportSettings(const MythUtilCommandLineParser &cmdline) ++{ ++ QMap<QString, QMap<QString,QString> > records; ++ QString src_hostname; ++ QString groupname; ++ QStringList table_list; ++ QString tablestring; ++ bool distro_default = FALSE; ++ bool generic = FALSE; ++ bool skip_host = FALSE; ++ ++ ++ ++ QDomDocument doc("mythutils_exported_settings"); ++ ++ if (cmdline.toBool("groupname")) ++ groupname = cmdline.toString("groupname"); ++ else ++ groupname = "current"; ++ ++ if (cmdline.toBool("hostname")) ++ src_hostname = cmdline.toString("hostname"); ++ else ++ src_hostname = gCoreContext->GetHostName(); ++ ++ if (cmdline.toBool("distro-default")) ++ { ++ distro_default = TRUE; ++ skip_host = TRUE; ++ } ++ if (cmdline.toBool("generic")) ++ { ++ generic = TRUE; ++ //skip_host = TRUE; ++ } ++ if (cmdline.toBool("table_list")) ++ { ++ tablestring = QString(cmdline.toString("table_list")); ++ table_list = tablestring.split(",", QString::SkipEmptyParts); ++ } ++ else ++ table_list << "settings" <<"keybindings" <<"jumppoints" ; ++ ++ if (cmdline.toString("outfile").isEmpty()) ++ { ++ LOG(VB_STDIO|VB_FLUSH, LOG_ERR, "Missing --outfile option\n"); ++ return GENERIC_EXIT_INVALID_CMDLINE; ++ } ++ ++ QString export_filename = cmdline.toString("outfile"); ++ ++ records = gCoreContext->export_settings(src_hostname,groupname, ++ table_list, skip_host); ++ ++ QDomElement exported_xml = doc.createElement("exported_xml"); ++ doc.appendChild(exported_xml); ++ ++ QMap<QString,int> record_count; ++ QMap<QString,QMap<QString,QString> >::iterator i; ++ for (i = records.begin(); i != records.end(); ++i ) ++ { ++ QDomElement record = doc.createElement("record"); ++ exported_xml.appendChild(record); ++ ++ //loop over all values in the record ++ QMap<QString,QString> value_pair = i.value(); ++ QMap<QString, QString>::iterator y; ++ //because we don't know the name of the key, we loop over it ++ for (y = value_pair.begin(); y != value_pair.end(); ++y) ++ { ++ //add key/pair to xml document ++ QDomElement tag = doc.createElement(y.key()); ++ record.appendChild(tag); ++ QDomText t; ++ if ( distro_default == TRUE ) ++ { // If exporting distro_default then change hostname + table ++ if ( y.key() == "hostname" ) ++ { //check for global values here, empty value means global ++ if ( y.value().isEmpty() ) ++ t = doc.createTextNode(y.value()); ++ else ++ t = doc.createTextNode("distro_default"); ++ } ++ else if ( y.key() == "table") ++ t = doc.createTextNode(y.value()+"_distro_default"); ++ else ++ t = doc.createTextNode(y.value()); ++ } ++ ++ else if ( generic == TRUE ) ++ { // If exporting generic then change hostname ++ if ( y.key() == "hostname" ) ++ { //check for global values here, empty value means global ++ if ( y.value().isEmpty() ) ++ t = doc.createTextNode(y.value()); ++ else ++ t = doc.createTextNode("REPLACE_ME"); ++ } ++ else ++ t = doc.createTextNode(y.value()); ++ } ++ else ++ t = doc.createTextNode(y.value()); ++ ++ tag.appendChild(t); ++ //create record counts ++ if ( y.key() == "table" ) ++ { ++ if ( record_count.contains( y.value()) ) ++ { ++ int record_num = record_count[y.value()]; ++ record_count[y.value()] = ++record_num; ++ } ++ else ++ record_count[y.value()] = 1; ++ } ++ } ++ } ++ QFile file( export_filename ); ++ ++ if( !file.open(QIODevice::WriteOnly) ) ++ return -1; ++ ++ QTextStream ts( &file ); ++ ts << doc.toString(); ++ file.close(); ++ QMap<QString, int >::iterator rc_it; ++ for ( rc_it = record_count.begin(); rc_it != record_count.end(); ++rc_it) ++ { ++ QString table = rc_it.key(); ++ int rc_count = rc_it.value(); ++ QString out_string = QString ("Exported table %1: %2 records") ++ .arg(table) ++ .arg(rc_count); ++ cout << out_string.toLocal8Bit().constData() << endl; ++ } ++ return GENERIC_EXIT_OK; ++}; // end export_settings ++ ++ ++static int ChangeHostname(const MythUtilCommandLineParser &cmdline) ++{ ++ ++ QString old_hostname; ++ QString new_hostname; ++ ++ ++ if (cmdline.toBool("oldhost")) ++ old_hostname = cmdline.toString("oldhost"); ++ ++ if (cmdline.toBool("newhost")) ++ new_hostname = cmdline.toString("newhost"); ++ ++ if (old_hostname.isEmpty()) ++ { ++ LOG(VB_STDIO|VB_FLUSH, LOG_ERR, "Missing or empty --old-host option\n"); ++ return GENERIC_EXIT_INVALID_CMDLINE; ++ } ++ ++ if (new_hostname.isEmpty()) ++ { ++ LOG(VB_STDIO|VB_FLUSH, LOG_ERR, "Missing or empty --new-host option\n"); ++ return GENERIC_EXIT_INVALID_CMDLINE; ++ } ++ ++ gCoreContext->change_hostname(old_hostname, new_hostname); ++ ++ return GENERIC_EXIT_OK; ++}; //end ChangeHostname ++ ++void registerSettingsUtils(UtilMap &utilMap) ++{ ++ utilMap["savesettings"] = &SaveSettings; ++ utilMap["deletesettings"] = &DeleteSettings; ++ utilMap["restoresettings"] = &RestoreSettings; ++ utilMap["copysettings"] = &CopySettings; ++ utilMap["diffsettings"] = &DiffSettings; ++ utilMap["listgroups"] = &ListGroups; ++ utilMap["importsettings"] = &ImportSettings; ++ utilMap["exportsettings"] = &ExportSettings; ++ utilMap["changehostname"] = &ChangeHostname; ++} ++ ++/* vim: set expandtab tabstop=4 shiftwidth=4: */ +\ No newline at end of file +diff --git a/mythtv/programs/mythutil/settingsutils.h b/mythtv/programs/mythutil/settingsutils.h +new file mode 100644 +index 0000000..413496c +--- /dev/null ++++ b/mythtv/programs/mythutil/settingsutils.h +@@ -0,0 +1,3 @@ ++#include "mythutil.h" ++ ++void registerSettingsUtils(UtilMap &utilMap); diff --git a/abs/core/mythtv/stable-0.27/mythtv/mythtv.install b/abs/core/mythtv/stable-0.27/mythtv/mythtv.install new file mode 100644 index 0000000..4ca5ebc --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/mythtv.install @@ -0,0 +1,25 @@ +# arg 1: the new package version +post_install() { + gen_is_xml.py + gen_lib_xml.py + systemconfig.py -m config_xml +} + +pre_upgrade() { + /bin/true +} + +post_upgrade() { + post_install +} + + +# arg 1: the old package version +post_remove() { + /bin/true + +} + +op=$1 +shift +$op $* diff --git a/abs/core/mythtv/stable-0.27/mythtv/recordings b/abs/core/mythtv/stable-0.27/mythtv/recordings new file mode 100644 index 0000000..7fdde51 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/recordings @@ -0,0 +1,5 @@ +#!/bin/bash +if [ -f /usr/share/mythtv/contrib/user_jobs/mythlink.pl ] +then + su - mythtv -c "perl /usr/share/mythtv/contrib/user_jobs/mythlink.pl --link /data/storage/disk0/media/recordings" +fi diff --git a/abs/core/mythtv/stable-0.27/mythtv/suggestedstarttime.patch.v1 b/abs/core/mythtv/stable-0.27/mythtv/suggestedstarttime.patch.v1 new file mode 100644 index 0000000..26d4c36 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythtv/suggestedstarttime.patch.v1 @@ -0,0 +1,32 @@ +diff --git a/mythtv/programs/mythbackend/httpstatus.cpp b/mythtv/programs/mythbackend/httpstatus.cpp +index 8571a58..be0272f 100644 +--- a/mythtv/programs/mythbackend/httpstatus.cpp ++++ b/mythtv/programs/mythbackend/httpstatus.cpp +@@ -1392,13 +1392,17 @@ int HttpStatus::PrintMachineInfo( QTextStream &os, QDomElement info ) + QString sStatus = e.attribute( "status" , "" ); + QDateTime next = MythDate::fromString( e.attribute( "next" , "" )); + QString sNext = next.isNull() ? "" : +- MythDate::toString(next, MythDate::kDatabase); ++ MythDate::toString(next, MythDate::kDateTimeFull); + QString sMsg = ""; + + QDateTime thru = MythDate::fromString( e.attribute( "guideThru", "" )); + + QDomText text = e.firstChild().toText(); + ++ QString mfdblrs = ++ gCoreContext->GetSetting("mythfilldatabaseLastRunStart"); ++ QDateTime lastrunstart = MythDate::fromString(mfdblrs); ++ + if (!text.isNull()) + sMsg = text.nodeValue(); + +@@ -1412,7 +1416,7 @@ int HttpStatus::PrintMachineInfo( QTextStream &os, QDomElement info ) + + os << sStatus << "<br />\r\n"; + +- if (!next.isNull() && sNext >= sStart) ++ if (!next.isNull() && next >= lastrunstart) + { + os << " Suggested next mythfilldatabase run: " + << sNext << ".<br />\r\n"; diff --git a/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD b/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD new file mode 100644 index 0000000..75e8d47 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythweb/PKGBUILD @@ -0,0 +1,58 @@ +pkgname=mythweb +pkgver=0.27 +pkgrel=2 +commit_hash=`cat ../git_src/git_hash_web` +pkgdesc="Web interface for MythTV's backend, $commit_hash" +arch=('i686' 'x86_64') +url="http://www.mythtv.org" +license=('GPL') +depends=('lighttpd' "mythtv>=${pkgver}" 'php' 'supplemental-web') +groups=('mythtv-extras') +install=mythweb.install + +patches=() +source=(`echo ${patches[@]:0}` + 'mythweb.include' + 'mythweb_gen_light.conf') + +build() { + if [ -e ${srcdir}/mythweb ] + then + msg "Removing old mythweb src" + rm -rf ${srcdir}/mythweb + fi + + cd ${startdir} + msg "Copying in mythweb git_src" + cp -rp ../git_src/mythweb $srcdir + cd ${srcdir}/$pkgname + + msg "--------------------------applying patches------------------------------" + for i in `echo ${patches[@]:0} ` + do + echo applying $i + echo "-----------------------------" + patch -Np0 -i ${srcdir}/$i || return 1 + done + msg "--------------------------done applying patches-------------------------" + + [ "$CARCH" = "i686" ] && ARCH="i686" + [ "$CARCH" = "x86_64" ] && ARCH="x86-64" +} + +package() { + DOCROOT=/data/srv/httpd/mythweb + mkdir -p $pkgdir/$DOCROOT/{image_cache,php_sessions,data} + rsync -arp --exclude .git* --delete-excluded $srcdir/mythweb/* $pkgdir/$DOCROOT + rm $pkgdir/$DOCROOT/README + chown -R http:http $pkgdir/$DOCROOT + chmod -R 775 $pkgdir/$DOCROOT/{image_cache,php_sessions,data} + + #install conf files for lighttpd + mkdir -p $pkgdir/etc/lighttpd + install -D -m 644 $srcdir/mythweb.include $pkgdir/etc/lighttpd/ + #gen_light_conf + install -D -m0744 ${srcdir}/mythweb_gen_light.conf ${pkgdir}/etc/gen_light_conf.d/mythweb.conf +} +md5sums=('7645a6399434cbba35639713ac5d88e0' + 'df190116b3aba35720fb6631885f973f') diff --git a/abs/core/mythtv/stable-0.27/mythweb/mythweb.include b/abs/core/mythtv/stable-0.27/mythweb/mythweb.include new file mode 100644 index 0000000..18e9be1 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythweb/mythweb.include @@ -0,0 +1,8 @@ +alias.url += ( "/mythweb" => "/data/srv/httpd/mythweb/") + +url.rewrite-once = ( +"^/{1,2}mythweb/(css|data|images|js|themes|skins|[a-z_]+\.(php|pl)).*" => "$0", +"^/{1,2}mythweb/(pl(/.*)?)$" => "/mythweb/mythweb.pl/$1", +"^/{1,2}mythweb/(.+)$" => "/mythweb/mythweb.php/$1", +"^/{1,2}mythweb/(.*)$" => "/mythweb/mythweb.php" +)
\ No newline at end of file diff --git a/abs/core/mythtv/stable-0.27/mythweb/mythweb.install b/abs/core/mythtv/stable-0.27/mythweb/mythweb.install new file mode 100644 index 0000000..b8e31a8 --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythweb/mythweb.install @@ -0,0 +1,22 @@ +post_install() { + echo "==> Setting mythweb permissions." + chmod -R 755 /data/srv/httpd/mythweb/ + chown mythtv:http /data/srv/httpd/mythweb/data/tv_icons + chmod -R 775 /data/srv/httpd/mythweb/{image_cache,php_sessions,data} + echo "==> Reading lighttpd's configuration file." + gen_light_include.py + echo "==> Restarting lighttpd." + /sbin/sv hup /service/lighttpd +} + +post_upgrade() { + post_install +} + +post_remove() { + gen_light_include.py + echo + echo "==> Forcing a re-read of lighttpd's configuration file." + echo "" + /sbin/sv hup /service/lighttpd +} diff --git a/abs/core/mythtv/stable-0.27/mythweb/mythweb_gen_light.conf b/abs/core/mythtv/stable-0.27/mythweb/mythweb_gen_light.conf new file mode 100644 index 0000000..ddf0d2f --- /dev/null +++ b/abs/core/mythtv/stable-0.27/mythweb/mythweb_gen_light.conf @@ -0,0 +1 @@ +include "/etc/lighttpd/mythweb.include" diff --git a/abs/core/plymouth-theme-linhes/PKGBUILD b/abs/core/plymouth-theme-linhes/PKGBUILD index 45d41be..8b7c345 100644 --- a/abs/core/plymouth-theme-linhes/PKGBUILD +++ b/abs/core/plymouth-theme-linhes/PKGBUILD @@ -1,17 +1,25 @@ # pkgname="plymouth-theme-linhes-logo" pkgver=1 -pkgrel=1 -pkgdesc="linhes logo theme for plymouth" +pkgrel=4 +pkgdesc="LinHES theme for plymouth" arch=('any') license=('GPL') depends=('plymouth') options=('') -source=("linhes-logo.tar.gz") +groups=('base') +source=('lh-logo.png' 'linhes-logo.plymouth' 'linhes-logo.script' 'password_field.png' + 'progress_dot_off.png' 'progress_dot_on.png') install=plymouth-linhes.install + package() { - cd $srcdir/linhes-logo + cd $srcdir mkdir -p $pkgdir/usr/share/plymouth/themes/linhes-logo install -Dm644 * $pkgdir/usr/share/plymouth/themes/linhes-logo } -md5sums=('ec26e16177210f616765e3848b1bf5e4') +md5sums=('1f8d343587e12f36df5d995034e278a1' + 'ce896cdeb403f5d0f3df5886e88b4ac5' + 'c13aad1b1d821160dfafeaeb827a925c' + '1ebfd289a00fcd6ed973eb4576ef22ab' + '28321edbf593e7d9c7ad1edc70e00224' + 'f3d3f9c4eb33cdbeec16c2d6745e9f73') diff --git a/abs/core/plymouth-theme-linhes/linhes-logo.tar.gz b/abs/core/plymouth-theme-linhes/lh-logo.orig.png Binary files differindex 1c79f28..c3696e4 100644..100755 --- a/abs/core/plymouth-theme-linhes/linhes-logo.tar.gz +++ b/abs/core/plymouth-theme-linhes/lh-logo.orig.png diff --git a/abs/core/plymouth-theme-linhes/lh-logo.png b/abs/core/plymouth-theme-linhes/lh-logo.png Binary files differnew file mode 100755 index 0000000..dbd0b25 --- /dev/null +++ b/abs/core/plymouth-theme-linhes/lh-logo.png diff --git a/abs/core/plymouth-theme-linhes/linhes-logo.plymouth b/abs/core/plymouth-theme-linhes/linhes-logo.plymouth new file mode 100644 index 0000000..08d0707 --- /dev/null +++ b/abs/core/plymouth-theme-linhes/linhes-logo.plymouth @@ -0,0 +1,8 @@ +[Plymouth Theme] +Name=linhes-logo +Description=A theme that features a blank background with a logo. +ModuleName=script + +[script] +ImageDir=/usr/share/plymouth/themes/linhes-logo +ScriptFile=/usr/share/plymouth/themes/linhes-logo/linhes-logo.script diff --git a/abs/core/plymouth-theme-linhes/linhes-logo.script b/abs/core/plymouth-theme-linhes/linhes-logo.script new file mode 100644 index 0000000..6e6853e --- /dev/null +++ b/abs/core/plymouth-theme-linhes/linhes-logo.script @@ -0,0 +1,1051 @@ +# arch-logo.script - boot splash plugin +# +# Copyright (C) 2009 Canonical Ltd. +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License as published by +# the Free Software Foundation; either version 2, or (at your option) +# any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# You should have received a copy of the GNU General Public License +# along with this program; if not, write to the Free Software +# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA +# 02111-1307, USA. +# +# Re-written by Rafael Laguna <rafaellaguna@gmail.com> based from +# original by Alberto Milone <alberto.milone@canonical.com> +# +# Based on the example provided with the "script plugin" written by: +# Charlie Brej <cbrej@cs.man.ac.uk> +# + +# Set the text colour in (rgb / 256) +text_colour.red = 1.0; +text_colour.green = 1.0; +text_colour.blue = 1.0; + +# Tinted text #988592 +tinted_text_colour.red = 0.59; +tinted_text_colour.green = 0.52; +tinted_text_colour.blue = 0.57; + +# Action Text - #ffffff - RGB 255 255 255 +action_text_colour.red = 1.0; +action_text_colour.green = 1.0; +action_text_colour.blue = 1.0; + +# Orange - #ff4012 - RGB 255 64 18 +debugsprite = Sprite(); +debugsprite_bottom = Sprite(); +debugsprite_medium = Sprite(); + +# are we currently prompting for a password? +prompt_active = 0; + +# General purpose function to create text +fun WriteText (text, colour) { + image = Image.Text (text, colour.red, colour.green, colour.blue); + return image; +} + +fun ImageToText (text) { + image = WriteText (text, text_colour); + return image; +} + +fun ImageToTintedText (text) { + image = WriteText (text, tinted_text_colour); + return image; +} + +fun ImageToActionText (text) { + image = WriteText (text, action_text_colour); + return image; +} + +fun Debug(text) { + debugsprite.SetImage(ImageToText (text)); +} + +fun DebugBottom(text) { + debugsprite_bottom.SetImage(ImageToText (text)); + debugsprite_bottom.SetPosition(0, (Window.GetHeight (0) - 20), 1); +} + +fun DebugMedium(text) { + debugsprite_medium.SetImage(ImageToText (text)); + debugsprite_medium.SetPosition(0, (Window.GetHeight (0) - 60), 1); +} + +fun TextYOffset() { + local.y; + local.text_height; + local.min_height; + + # Put the 1st line below the logo + some spacing + y = logo.y + logo.height + (progress_indicator.bullet_height * 7 ); # + logo_spacing; + + text_height = first_line_height * 7.5; + + min_height = Window.GetHeight(); + if (y + text_height > min_height) + y = min_height - text_height; + + if (y < progress_indicator.y + progress_indicator.height) + return progress_indicator.y + progress_indicator.height; + return y; +} + +#------------------------------String functions------------------------------- + +# This is the equivalent for strstr() +fun StringString(string, substring) { + start = 0; + while (String(string).CharAt (start)) { + walk = 0; + while (String(substring).CharAt (walk) == String(string).CharAt (start + walk) ) { + walk++; + if (!String(substring).CharAt (walk)) return start; + } + start++; + } + + return NULL; +} + +fun StringLength (string) { + index = 0; + while (String(string).CharAt(index)) index++; + return index; +} + +fun StringCopy (source, beginning, end) { + local.destination = ""; + for (index = beginning; ( ( (end == NULL) || (index <= end) ) && (String(source).CharAt(index)) ); index++) { + local.destination += String(source).CharAt(index); + } + + return local.destination; +} + +fun StringReplace (source, pattern, replacement) { + local.found = StringString(source, pattern); + if (local.found == NULL) + return source; + + local.new_string = StringCopy (source, 0, local.found - 1) + + replacement + + StringCopy (source, local.found + StringLength(pattern), NULL); + + return local.new_string; +} + +# it makes sense to use it only for +# numbers up to 100 +fun StringToInteger (str) { + int = -1; + for (i=0; i<=100; i++) { + if (i+"" == str) { + int = i; + break; + } + } + return int; +} + +#----------------------------------------------------------------------------- +# Previous background colour +# #300a24 --> 0.19, 0.04, 0.14 +# New background colour +# #2c001e --> 0.16, 0.00, 0.12 +# +# New arch background, it's just black +# 0.00, 0.00, 0.00 + +Window.SetBackgroundTopColor (0.00, 0.00, 0.00); # Nice colour on top of the screen fading to +Window.SetBackgroundBottomColor (0.00, 0.00, 0.00); # an equally nice colour on the bottom + +logo.image = Image ("lh-logo.png"); # "special://logo" is a special keyword which finds the logo image +#logo.image = Image ("arch_logo.png"); # "special://logo" is a special keyword which finds the logo image +logo.sprite = Sprite (); +logo.sprite.SetImage (logo.image); +logo.width = logo.image.GetWidth (); +logo.height = logo.image.GetHeight (); +logo.x = Window.GetX () + Window.GetWidth () / 2 - logo.width /2 ; +logo.y = Window.GetY () + Window.GetHeight () / 2 - logo.height /2; +logo.z = 1000; +logo.sprite.SetX (logo.x); +logo.sprite.SetY (logo.y); +logo.sprite.SetZ (logo.z); +logo.sprite.SetOpacity (1); + +# Spacing below the logo - in pixels +logo_spacing = logo.height * 4; + +message_notification[0].image = ImageToTintedText (""); +message_notification[1].image = ImageToTintedText (""); +fsck_notification.image = ImageToActionText (""); + +status = "normal"; + +progress_indicator.bullet_off = Image ("progress_dot_off.png"); +progress_indicator.bullet_on = Image ("progress_dot_on.png"); +progress_indicator.bullet_width = progress_indicator.bullet_off.GetWidth (); +progress_indicator.bullet_height = progress_indicator.bullet_off.GetHeight (); +progress_indicator.bullet_hspacing = progress_indicator.bullet_width * 1.1; +progress_indicator.width = progress_indicator.bullet_width * 5; +progress_indicator.height = progress_indicator.bullet_height; +#progress_indicator.y = logo.y + logo.height + (logo.height / 4); +progress_indicator.y = logo.y + logo.height + 4; +progress_indicator.x = Window.GetX () + Window.GetWidth () / 2 - progress_indicator.width / 2; # logo.x + 26; + +# use a fixed string with ascending and descending stems to calibrate the +# bounding box for the first message, so the messages below don't move up +# and down according to *their* height. +first_line_height = ImageToTintedText ("AfpqtM").GetHeight(); + +# if the user has a 640x480 or 800x600 display, we can't quite fit everything +# (including passphrase prompts) with the target spacing, so scoot the text up +# a bit if needed. +top_of_the_text = TextYOffset(); + +#-----------------------------------------Logo functions------------------------------ + +# Call this when updating the screen +fun draw_logo () { + logo.sprite.SetX (logo.x); + logo.sprite.SetY (logo.y); + logo.sprite.SetZ (logo.z); + logo.sprite.SetOpacity (1); +} + + +#-----------------------------------------Progress Indicator-------------------------- +fun set_progress_indicator () { + + + # Here we assume that we can store half bullets on each half of the screen + # together with some spacing + local.x = progress_indicator.x; + + for (index = 0; index <= 4; index++) { + # Set the "off" bullets + progress_indicator.bullets_off[index].sprite = Sprite (progress_indicator.bullet_off); + progress_indicator.bullets_off[index].sprite.SetPosition (local.x, progress_indicator.y, 1000); + progress_indicator.bullets_off[index].x = local.x; + progress_indicator.bullets_off[index].y = progress_indicator.y; + progress_indicator.bullets_off[index].sprite.SetOpacity (1); + + #local.debug_medium_string = "Progress indicator " + index + ": x = " + progress_indicator.bullets_off[index].x + + # ", y = " + progress_indicator.bullets_off[index].y + ", logo width = " + logo.width + + # ", logo height = " + logo.height + " " + screen_width + " " + screen_height; + # + #(index % 2) && DebugMedium (local.debug_medium_string) || DebugBottom (local.debug_medium_string); + + # Set the "on" bullets on top of the "off" bullets and make them transparent + progress_indicator.bullets_on[index].sprite = Sprite (progress_indicator.bullet_on); + progress_indicator.bullets_on[index].x = progress_indicator.bullets_off[index].x; + progress_indicator.bullets_on[index].y = progress_indicator.bullets_off[index].y; + progress_indicator.bullets_on[index].sprite.SetPosition (progress_indicator.bullets_on[index].x, progress_indicator.bullets_on[index].y, 10000); + + progress_indicator.bullets_on[index].sprite.SetOpacity (0); + + local.x += progress_indicator.bullet_hspacing; + } + #local.debug_string = "Progress indicator: x1 = " + progress_indicator.x + ", x2 = " + local.x + ", y = " + progress_indicator.y + + # ", x logo = " + logo.x + ", y logo = " + logo.y + ", indicator width = " + progress_indicator.width; + #Debug(progress_indicator.bullets_off[0].x); +} + + +# We have 2 bullets, one on top of the other: +# The white one is on top of the red one and the former should +# slowly fade so as to get a nice transition effect. +fun switch_on_bullet (bullets_off, bullets_on, bullet_number, opacity) { + local.x = bullets_on[bullet_number].x; + local.y = bullets_on[bullet_number].y; + local.z = bullets_on[bullet_number].z; + + # Hide the bullets which are off + bullets_off[bullet_number].sprite.SetOpacity (0); + + # Show the bullets which are on + bullets_on[bullet_number].sprite.SetPosition (local.x, local.y, local.z); + bullets_on[bullet_number].sprite.SetOpacity (opacity); + + # Bump the number of times we have switched on bullets + global.times_bullets_switched++; +} + +fun switch_off_bullets () { + # Debug("Switching off progress indicator"); + + set_progress_indicator (); + global.times_bullets_switched = 0; + global.on_off = 1; +} + +# This is something that we can call when we exit +fun switch_on_bullets () { + # Debug("Switching off progress indicator"); + if (!global.progress_indicator.bullets_on) set_progress_indicator (); + local = global.progress_indicator; + + for (index = 0; bullets_on[index]; index++) { + switch_on_bullet (bullets_off, bullets_on, index, 1.0); + } +} + + +# Implement in boot progress callback +fun animate_progress_indicator (progress, time) { + if (global.progress_time == NULL) { + global.progress_time = progress; #time; + switch_off_bullets (); + } + +# Debug ("progress = " + progress + ", time = " + time + " times switched = " + global.times_bullets_switched + " on_off " + global.on_off); + +# if (global.times_bullets_switched == NULL) +# global.times_bullets_switched = 5; + +# if (global.on_off == NULL) +# global.on_off = 0; + + if ((progress - global.progress_time) >= 1.0) { + global.progress_time = progress; + + if (global.times_bullets_switched == 5) { + # Change which bullets are switched on + # and which ones are switched off + global.on_off = !global.on_off; + global.times_bullets_switched = 0; + } + + if (global.on_off) { + switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, + global.times_bullets_switched, 1.0); + } + else { + switch_on_bullet (progress_indicator.bullets_on, progress_indicator.bullets_off, + global.times_bullets_switched, 1.0); + } + } + + + # Start setting bullets to "on" with translucency +# for (index = 0; index <= 5; index++) { +# opacity = 0.0; +# while (opacity <= 1.0) { +# switch_on_bullet (progress_indicator.bullets_off, progress_indicator.bullets_on, +# index, opacity); +# opacity += 0.1; +# } +# } +} + + +#-----------------------------------------Label utility functions--------------------- + +# label should be either a string or NULL +# Images for n lines will be created and returned as items of the +# message_label array +# +fun get_message_label (label, is_fake, is_action_line) { + # Debug("Get Label position"); + local.message_label; + + if (is_fake) + # Create a fake label so as to get the y coordinate of + # a standard-length label. + local.message_image = ImageToTintedText ("This is a fake message"); + else + local.message_image = (is_action_line) && ImageToActionText (label) || ImageToTintedText (label); + + message_label.width = message_image.GetWidth (); + message_label.height = message_image.GetHeight (); + + # Center the line horizontally + message_label.x = Window.GetX () + Window.GetWidth () / 2 - message_label.width / 2; + + message_label.y = top_of_the_text; + + # Put the 2nd line below the fsck line + if (is_action_line) { + local.fsck_label.y = message_label.y + (first_line_height + first_line_height / 2); + message_label.y = local.fsck_label.y + (first_line_height * 2); + } + + # Debug("action label x = " + message_label.x + " y = " + message_label.y ); + +# message_debug = "msg_x = " + message_label.x + " msg_y = " + message_label.y + +# "msg_width = " + message_label.width + " msg_height = " + +# message_label.height + " message = " + label; +# Debug(message_debug); + + return message_label; + +} + +# Create an fsck label and/or get its position +fun get_fsck_label (label, is_fake) { + # Debug("Get Label position"); + local.fsck_label = global.progress_label; + + if (is_fake) + fsck_label.image = ImageToTintedText ("This is a fake message"); + else + fsck_label.image = ImageToTintedText (label); + + fsck_label.width = fsck_label.image.GetWidth (); + fsck_label.height = fsck_label.image.GetHeight (); + + # Centre the label horizontally + fsck_label.x = Window.GetX () + Window.GetWidth () / 2 - fsck_label.width / 2; + + local.first_label = get_message_label (label, 1, 0); + + # Place the label below the 1st message line + fsck_label.y = local.first_label.y + local.first_label.height + (local.first_label.height / 2); + +# message_debug = "msg_x = " + fsck_label.x + " msg_y = " + fsck_label.y + +# "msg_width = " + fsck_label.width + " msg_height = " + +# fsck_label.height + " message = " + label; +# Debug(message_debug); + + return fsck_label; +} + +#-----------------------------------------Message stuff -------------------------------- +# + +# Set up a message label +# +# NOTE: this is called when doing something like 'plymouth message "hello world"' +# +fun setup_message (message_text, x, y, z, index) { + # Debug("Message setup"); + global.message_notification[index].image = (index) && ImageToActionText (message_text) || ImageToTintedText (message_text); + + # Set up the text message, if any + message_notification[index].x = x; + message_notification[index].y = y; + message_notification[index].z = z; + + message_notification[index].sprite = Sprite (); + message_notification[index].sprite.SetImage (message_notification[index].image); + message_notification[index].sprite.SetX (message_notification[index].x); + message_notification[index].sprite.SetY (message_notification[index].y); + message_notification[index].sprite.SetZ (message_notification[index].z); + +} + +fun show_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(1); +} + +fun hide_message (index) { + if (global.message_notification[index].sprite) global.message_notification[index].sprite.SetOpacity(0); +} + + + + +# the callback function is called when new message should be displayed. +# First arg is message to display. +fun message_callback (message) +{ + # Debug("Message callback"); + is_fake = 0; + if (!message || (message == "")) is_fake = 1; + + local.substring = "keys:"; + + # Look for the "keys:" prefix + local.keys = StringString(message, local.substring); + + local.is_action_line = (keys != NULL); + #Debug("keys " + local.keys + " substring length = " + StringLength(local.substring)); + + # Get the message without the "keys:" prefix + if (keys != NULL) + message = StringCopy (message, keys + StringLength(local.substring), NULL); + + local.label.is_fake = is_fake; + label = get_message_label(message, is_fake, is_action_line); + label.z = 10000; + + setup_message (message, label.x, label.y, label.z, is_action_line); + if (prompt_active && local.is_action_line) + hide_message (is_action_line); + else + show_message (is_action_line); + +} + + +#-----------------------------------------Display Password stuff ----------------------- +# + +fun password_dialogue_setup (message_label) { + # Debug("Password dialog setup"); + + local.entry; + local.bullet_image; + + bullet_image = Image ("progress_dot_off.png"); + entry.image = Image ("password_field.png"); + + # Hide the normal labels + prompt_active = 1; + if (message_notification[1].sprite) hide_message (1); + + # Set the prompt label + label = get_message_label(message_label, 0, 1); + label.z = 10000; + + setup_message (message_label, label.x, label.y, label.z, 2); + show_message (2); + + # Set up the text entry which contains the bullets + entry.sprite = Sprite (); + entry.sprite.SetImage (entry.image); + + # Centre the box horizontally + entry.x = Window.GetX () + Window.GetWidth () / 2 - entry.image.GetWidth () / 2; + + # Put the entry below the second label. + entry.y = message_notification[2].y + label.height; + + #Debug ("entry x = " + entry.x + ", y = " + entry.y); + entry.z = 10000; + entry.sprite.SetX (entry.x); + entry.sprite.SetY (entry.y); + entry.sprite.SetZ (entry.z); + + global.password_dialogue = local; +} + +fun password_dialogue_opacity (opacity) { + # Debug("Password dialog opacity"); + global.password_dialogue.opacity = opacity; + local = global.password_dialogue; + + # You can make the box translucent with a float + # entry.sprite.SetOpacity (0.3); + entry.sprite.SetOpacity (opacity); + label.sprite.SetOpacity (opacity); + + if (bullets) { + for (index = 0; bullets[index]; index++) { + bullets[index].sprite.SetOpacity (opacity); + } + } +} + + +# The callback function is called when the display should display a password dialogue. +# First arg is prompt string, the second is the number of bullets. +fun display_password_callback (prompt, bullets) { + # Debug("Password dialog setup"); + + global.status = "password"; + if (!global.password_dialogue) password_dialogue_setup(prompt); + password_dialogue_opacity (1); + bullet_width = password_dialogue.bullet_image.GetWidth(); + bullet_y = password_dialogue.entry.y + + password_dialogue.entry.image.GetHeight () / 2 - + password_dialogue.bullet_image.GetHeight () / 2; + margin = bullet_width; + spaces = Math.Int( (password_dialogue.entry.image.GetWidth () - (margin * 2)) / (bullet_width / 2 ) ); + #Debug ("spaces = " + spaces + ", bullets = " + bullets); + bullets_area.width = margin + spaces * (bullet_width / 2); + bullets_area.x = Window.GetX () + Window.GetWidth () / 2 - bullets_area.width / 2; + #DebugBottom ("pwd_entry x = " + password_dialogue.entry.x + ", bullets_area.x = " + bullets_area.x + ", bullets_area.width = " + bullets_area.width); + if (bullets > spaces) + bullets = spaces; + for (index = 0; password_dialogue.bullets[index] || index < bullets; index++){ + if (!password_dialogue.bullets[index]) { + password_dialogue.bullets[index].sprite = Sprite (); + password_dialogue.bullets[index].sprite.SetImage (password_dialogue.bullet_image); + password_dialogue.bullets[index].x = bullets_area.x + # password_dialogue.entry.x + margin + + index * bullet_width / 2; + password_dialogue.bullets[index].sprite.SetX (password_dialogue.bullets[index].x); + password_dialogue.bullets[index].y = bullet_y; + password_dialogue.bullets[index].sprite.SetY (password_dialogue.bullets[index].y); + password_dialogue.bullets[index].z = password_dialogue.entry.z + 1; + password_dialogue.bullets[index].sprite.SetZ (password_dialogue.bullets[index].z); + } + + password_dialogue.bullets[index].sprite.SetOpacity (0); + + if (index < bullets) { + password_dialogue.bullets[index].sprite.SetOpacity (1); + } + } +} + +Plymouth.SetDisplayPasswordFunction (display_password_callback); + +Plymouth.SetMessageFunction (message_callback); + +Plymouth.SetBootProgressFunction (animate_progress_indicator); + +# Plymouth.SetBootProgressFunction: the callback function is called with two numbers, the progress (between 0 and 1) and the time spent booting so far +# Plymouth.SetRootMountedFunction: the callback function is called when a new root is mounted +# Plymouth.SetKeyboardInputFunction: the callback function is called with a string containing a new character entered on the keyboard + +#----------------------------------------- FSCK Counter -------------------------------- + +# Initialise the counter +fun init_fsck_count () { + # The number of fsck checks in this cycle + global.counter.total = 0; + # The number of fsck checks already performed + the current one + global.counter.current = 1; + # The previous fsck + global.counter.last = 0; +} + +# Increase the total counter +fun increase_fsck_count () { + global.counter.total++; +} + +fun increase_current_fsck_count () { + global.counter.last = global.counter.current++; +} + +# Clear the counter +fun clear_fsck_count () { + global.counter = NULL; + init_fsck_count (); +} + +#----------------------------------------- Progress Label ------------------------------ + + +# Change the opacity level of a progress label +# +# opacity = 1 -> show +# opacity = 0 -> hide +# opacity = 0.3 (or any other float) -> translucent +# +fun set_progress_label_opacity (opacity) { + # the label + progress_label.sprite.SetOpacity (opacity); + + # Make the slot available again when hiding the bar + # So that another bar can take its place + if (opacity == 0) { + progress_label.is_available = 1; + progress_label.device = ""; + } +} + +# Set up a new Progress Bar +# +# TODO: Make it possible to reuse (rather than recreate) a bar +# if .is_available = 1. Ideally this would just reset the +# label, the associated +# device and the image size of the sprite. + +fun init_progress_label (device, status_string) { + # Make the slot unavailable + global.progress_label.is_available = 0; + progress_label.progress = 0; + progress_label.device = device; + progress_label.status_string = status_string; +} + +# See if the progress label is keeping track of the fsck +# of "device" +# +fun device_has_progress_label (device) { + #DebugBottom ("label device = " + progress_label.device + " checking device " + device); + return (progress_label.device == device); +} + +# Update the Progress bar which corresponds to index +# +fun update_progress_label (progress) { + # If progress is NULL then we just refresh the label. + # This happens when only counter.total has changed. + if (progress != NULL) { + progress_label.progress = progress; + + #Debug("device " + progress_label.device + " progress " + progress); + + # If progress >= 100% hide the label and make it available again + if (progress >= 100) { + set_progress_label_opacity (0); + + # See if we any other fsck check is complete + # and, if so, hide the progress bars and the labels + on_fsck_completed (); + + return 0; + } + } + # Update progress label here + # + # FIXME: the queue logic from this theme should really be moved into mountall + # instead of using string replacement to deal with localised strings. + label = StringReplace (progress_label.status_string[0], "%1$d", global.counter.current); + label = StringReplace (label, "%2$d", global.counter.total); + label = StringReplace (label, "%3$d", progress_label.progress); + label = StringReplace (label, "%%", "%"); + + progress_label = get_fsck_label (label, 0); + #progress_label.progress = progress; + + progress_label.sprite = Sprite (progress_label.image); + + # Set up the bar + progress_label.sprite.SetPosition(progress_label.x, progress_label.y, 1); + + set_progress_label_opacity (1); + +} + +# Refresh the label so as to update counters +fun refresh_progress_label () { + update_progress_label (NULL); +} + +#----------------------------------------- FSCK Queue ---------------------------------- + +# Initialise the fsck queue +fun init_queue () { + global.fsck_queue[0].device; + global.fsck_queue[0].progress; + global.fsck_queue.counter = 0; + global.fsck_queue.biggest_item = 0; +} + +fun clear_queue () { + global.fsck_queue = NULL; + init_queue (); +} + +# Return either the device index in the queue or -1 +fun queue_look_up_by_device (device) { + for (i=0; i <= fsck_queue.biggest_item; i++) { + if ((fsck_queue[i]) && (fsck_queue[i].device == device)) + return i; + } + return -1; +} + +# Keep track of an fsck process in the queue +fun add_fsck_to_queue (device, progress) { + # Look for an empty slot in the queue + for (i=0; global.fsck_queue[i].device; i++) { + continue; + } + local.index = i; + + # Set device and progress + global.fsck_queue[local.index].device = device; + global.fsck_queue[local.index].progress = progress; + + # Increase the queue counter + global.fsck_queue.counter++; + + # Update the max index of the array for iterations + if (local.index > global.fsck_queue.biggest_item) + global.fsck_queue.biggest_item = local.index; + + #DebugMedium ("Adding " + device + " at " + local.index); +} + +fun is_queue_empty () { + return (fsck_queue.counter == 0); +} + +fun is_progress_label_available () { + return (progress_label.is_available == 1); +} + + +# This should cover the case in which the fsck checks in +# the queue are completed before the ones showed in the +# progress label +fun on_queued_fsck_completed () { + if (!is_queue_empty ()) + return; + + # Hide the extra label, if any + #if (progress_bar.extra_label.sprite) + # progress_bar.extra_label.sprite.SetOpacity(0); +} + +fun remove_fsck_from_queue (index) { + # Free memory which was previously allocated for + # device and progress + global.fsck_queue[index].device = NULL; + global.fsck_queue[index].progress = NULL; + + # Decrease the queue counter + global.fsck_queue.counter--; + + # See if there are other processes in the queue + # if not, clear the extra_label + on_queued_fsck_completed (); +} + +fun on_fsck_completed () { + # We have moved on to tracking the next fsck + increase_current_fsck_count (); + + if (!is_progress_label_available ()) + return; + + if (!is_queue_empty ()) + return; + + # Hide the progress label + if (progress_label.sprite) + progress_label.sprite.SetOpacity (0); + + # Clear the queue + clear_queue (); + + # Clear the fsck counter + clear_fsck_count (); +} + +# Update an fsck process that we keep track of in the queue +fun update_progress_in_queue (index, device, progress) { + # If the fsck is complete, remove it from the queue + if (progress >= 100) { + remove_fsck_from_queue (index); + on_queued_fsck_completed (); + return; + } + + global.fsck_queue[index].device = device; + global.fsck_queue[index].progress = progress; + +} + +# TODO: Move it to some function +# Create an empty queue +#init_queue (); + + +#----------------------------------------- FSCK Functions ------------------------------ + + +# Either add a new bar for fsck checks or update an existing bar +# +# NOTE: no more than "progress_bar.max_number" bars are allowed +# +fun fsck_check (device, progress, status_string) { + + # The 1st time this will take place + if (!global.progress_label) { + # Increase the fsck counter + increase_fsck_count (); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + return; + } + + + if (device_has_progress_label (device)) { + # Update the progress of the existing label + update_progress_label (progress); + } + else { + # See if there's already a slot in the queue for the device + local.queue_device_index = queue_look_up_by_device(device); + + # See if the progress_label is available + if (progress_label.is_available) { + +# local.my_string = "available index " + local.available_index + " progress_bar counter is " + progress_bar.counter; +# Debug(local.my_string); + + + # If the fsck check for the device was in the queue, then + # remove it from the queue + if (local.queue_device_index >= 0) { + remove_fsck_from_queue (index); + } + else { + # Increase the fsck counter + increase_fsck_count (); + } + +# local.my_string += local.message; + #Debug("setting new label for device " + device + " progress " + progress); + + # Set up a new label for the check + init_progress_label (device, status_string); + update_progress_label (progress); + + } + # If the progress_label is not available + else { + + # If the fsck check for the device is already in the queue + # just update its progress in the queue + if (local.queue_device_index >= 0) { + #DebugMedium("Updating queue at " + local.queue_device_index + " for device " + device); + update_progress_in_queue (local.queue_device_index, device, progress); + } + # Otherwise add the check to the queue + else { + #DebugMedium("Adding device " + device + " to queue at " + local.queue_device_index); + add_fsck_to_queue (device, progress); + + # Increase the fsck counter + increase_fsck_count (); + + refresh_progress_label (); + } + + } + } + +# if (!is_queue_empty ()) { +# DebugBottom("Extra label for "+ device); + #} +# else { +# DebugBottom("No extra label for " + device + ". 1st Device in the queue "+ fsck_queue[0].device + " counter = " + global.fsck_queue.counter); +# } +} + + +#-----------------------------------------Update Status stuff -------------------------- +# +# The update_status_callback is what we can use to pass plymouth whatever we want so +# as to make use of features which are available only in this program (as opposed to +# being available for any theme for the script plugin). +# +# Example: +# +# Thanks to the current implementation, some scripts can call "plymouth --update=fsck:sda1:40" +# and this program will know that 1) we're performing and fsck check, 2) we're checking sda1, +# 3) the program should set the label progress to 40% +# +# Other features can be easily added by parsing the string that we pass plymouth with "--update" +# +fun update_status_callback (status) { +# Debug(status); + if (!status) return; + + string_it = 0; + update_strings[string_it] = ""; + + for (i=0; (String(status).CharAt(i) != ""); i++) { + local.temp_char = String(status).CharAt(i); + if (temp_char != ":") + update_strings[string_it] += temp_char; + else + update_strings[++string_it] = ""; + } + +# my_string = update_strings[0] + " " + update_strings[1] + " " + update_strings[2]; +# Debug(my_string); + # Let's assume that we're dealing with these strings fsck:sda1:40 + if ((string_it >= 2) && (update_strings[0] == "fsck")) { + + device = update_strings[1]; + progress = update_strings[2]; + status_string[0] = update_strings[3]; # "Checking disk %1$d of %2$d (%3$d %% complete)" + if (!status_string[0]) + status_string[0] = "Checking disk %1$d of %2$d (%3$d %% complete)"; + + if ((device != "") && (progress != "")) { + progress = StringToInteger (progress); + + # Make sure that the fsck_queue is initialised + if (!global.fsck_queue) + init_queue (); + + # Make sure that the fsck counter is initialised + if (!global.counter) + init_fsck_count (); + +# if (!global.progress_bar.extra_label.sprite) +# create_extra_fsck_label (); + + # Keep track of the fsck check + fsck_check (device, progress, status_string); + } + + } + +} +Plymouth.SetUpdateStatusFunction (update_status_callback); + +#-----------------------------------------Display Question stuff ----------------------- +# +# TODO: Implement this if needed +# +# The callback function is called when the display should display a question dialogue. +# First arg is prompt string, the second is the entry contents. +#fun display_question_callback (prompt_string, entry_contents) +#{ +# time++; +#} +# +#Plymouth.SetDisplayQuestionFunction (display_question_callback); + +#-----------------------------------------Refresh stuff -------------------------------- +# +# Calling Plymouth.SetRefreshFunction with a function will set that function to be +# called up to 50 times every second, e.g. +# +# NOTE: if a refresh function is not set, Plymouth doesn't seem to be able to update +# the screen correctly +# +fun refresh_callback () +{ + draw_logo (); +} +Plymouth.SetRefreshFunction (refresh_callback); + + +#-----------------------------------------Display Normal stuff ----------------------- +# +# The callback function is called when the display should return to normal +fun display_normal_callback () +{ + global.status = "normal"; + if (global.password_dialogue) { + password_dialogue_opacity (0); + global.password_dialogue = NULL; + if (message_notification[2].sprite) hide_message(2); + prompt_active = 0; + } + + if (message_notification[1].sprite) show_message (1); + + +} + +Plymouth.SetDisplayNormalFunction (display_normal_callback); + + +#----------------------------------------- Quit -------------------------------- + +# TODO: Maybe we should also hide any other dialog +# Show the logo and make the progress indicator look full when on exit +fun quit_callback () +{ + logo.sprite.SetOpacity (1); + switch_on_bullets (); +} + +Plymouth.SetQuitFunction(quit_callback); diff --git a/abs/core/plymouth-theme-linhes/password_field.png b/abs/core/plymouth-theme-linhes/password_field.png Binary files differnew file mode 100644 index 0000000..5d2287b --- /dev/null +++ b/abs/core/plymouth-theme-linhes/password_field.png diff --git a/abs/core/plymouth-theme-linhes/plymouth-linhes.install b/abs/core/plymouth-theme-linhes/plymouth-linhes.install index 1b43e42..7347d87 100644 --- a/abs/core/plymouth-theme-linhes/plymouth-linhes.install +++ b/abs/core/plymouth-theme-linhes/plymouth-linhes.install @@ -1,5 +1,10 @@ post_install(){ - /usr/sbin/plymouth-set-default-theme linhes-logo + /usr/bin/plymouth-set-default-theme linhes-logo + mkinitcpio -p linux +} + +post_upgrade(){ + post_install } op=$1 shift diff --git a/abs/core/plymouth-theme-linhes/progress_dot_off.png b/abs/core/plymouth-theme-linhes/progress_dot_off.png Binary files differnew file mode 100644 index 0000000..615a301 --- /dev/null +++ b/abs/core/plymouth-theme-linhes/progress_dot_off.png diff --git a/abs/core/plymouth-theme-linhes/progress_dot_on.png b/abs/core/plymouth-theme-linhes/progress_dot_on.png Binary files differnew file mode 100644 index 0000000..76d757f --- /dev/null +++ b/abs/core/plymouth-theme-linhes/progress_dot_on.png diff --git a/abs/core/plymouth/PKGBUILD b/abs/core/plymouth/PKGBUILD index 34c40c5..6126d4f 100644 --- a/abs/core/plymouth/PKGBUILD +++ b/abs/core/plymouth/PKGBUILD @@ -1,130 +1,118 @@ -# Maintainer: M0Rf30 <morfeo89@hotmail.it> -# Contributor: PirateJonno <j@skurvy.no-ip.org> -# Contributor: Det <nimetonmaili at gmail dot com> -# Contributor: Biginoz <biginoz _at_ free _point_ fr> -# Based on plymouth-git: http://aur.archlinux.org/packages.php?ID=26117 - pkgname=plymouth -pkgver=0.8.8 -pkgrel=3 -pkgdesc="A graphical boot splash screen with kernel mode-setting support" +pkgver=0.8.8.52.g37d2e40 +pkgrel=4 +pkgdesc="A graphical boot splash screen with kernel mode-setting support (Git version)" +url="http://cgit.freedesktop.org/cgit/plymouth/" arch=('i686' 'x86_64') -url="http://freedesktop.org/wiki/Software/Plymouth" license=('GPL') -depends=('libdrm' 'pango' 'gtk2') +depends=('libdrm' 'pango' 'v86d') +makedepends=('git' 'docbook-xsl') +optdepends=('ttf-dejavu') options=('!libtool' '!emptydirs') -install=${pkgname}.install -backup=('etc/plymouth/plymouthd.conf') +install=$pkgname.install +groups=('base') provides=('plymouth') -conflicts=('plymouth-git') -source=("http://www.freedesktop.org/software/$pkgname/releases/$pkgname-$pkgver.tar.bz2" - 'arch-logo.png' - "http://projects.archlinux.org/svntogit/packages.git/plain/cryptsetup/repos/core-i686/encrypt_hook" - 'encrypt_hook.patch' - "http://projects.archlinux.org/svntogit/packages.git/plain/cryptsetup/repos/core-i686/encrypt_install" - 'encrypt_install.patch' +conflicts=('plymouth') +backup=('etc/plymouth/plymouthd.conf') + +source=('git://anongit.freedesktop.org/plymouth' + 'arch-logo.png' + 'encrypt_hook' + 'encrypt_install' 'gdm-plymouth.service' 'kdm-plymouth.service' 'kdm-unpatched-plymouth.service' - 'lightdm-plymouth.service' 'lxdm-plymouth.service' + 'lightdm-plymouth.service' + 'slim-plymouth.service' 'plymouth.functions' + "$pkgname.install" 'plymouth.initcpio_hook' 'plymouth.initcpio_install' - 'plymouth-pid.patch' 'plymouth-quit.service' 'plymouth-set-default-theme.in.patch' 'plymouth-update-initrd.patch' 'plymouthd.conf' - 'system-release' - 'systemd-unit-dir.patch' - 'udevadm.patch' -) + 'system-release') + +pkgver() { + cd "$srcdir"/${pkgname%%-*} + git describe --always | sed 's/-/./g' +} +prepare() { + cd "$srcdir"/${pkgname%%-*} + + patch -Np0 -i ../plymouth-set-default-theme.in.patch + patch -Np0 -i ../plymouth-update-initrd.patch + + sed -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \ + -i src/libply-splash-graphics/ply-image.c + + test -f Makefile && make distclean + + return 0 +} build() { - - cd $srcdir - msg "Applying Patches..." - - msg2 "Fixing encrypt HOOK" - #patch -p0 -i encrypt_hook.patch --follow-symlinks - #patch -p0 -i encrypt_install.patch --follow-symlinks - - - cd $srcdir/$pkgname-$pkgver - msg2 "Setting a human-readable error for '# plymouth-set-default-theme -R'" - patch -p0 -i ../plymouth-set-default-theme.in.patch - - msg2 "Fixing updating initrd" - patch -p0 -i ../plymouth-update-initrd.patch - - msg2 "Changing PID file to /run/plymouth.pid" - patch -p1 -i ../plymouth-pid.patch - - msg2 "Changing udevadm path" - patch -p1 -i ../udevadm.patch - - msg2 "Changing SYSTEMD_UNIT_DIR to /usr/lib/systemd/system/" - patch -p0 -i ../systemd-unit-dir.patch - - sed -e 's:png_set_gray_1_2_4_to_8:png_set_expand_gray_1_2_4_to_8:g' \ - -i src/libply-splash-graphics/ply-image.c - - msg "Starting make..." - - ./configure --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib --libexecdir=/usr/lib \ - --enable-tracing \ - --without-rhgb-compat-link \ - --with-gdm-autostart-file=yes \ - --with-logo=/usr/share/plymouth/arch-logo.png \ - --with-background-start-color-stop=0x000000 \ - --with-background-end-color-stop=0x4D4D4D \ - --enable-systemd-integration \ - --without-system-root-install - - make + cd "$srcdir"/${pkgname%%-*} + + ./autogen.sh --prefix=/usr \ + --exec-prefix=/usr \ + --sysconfdir=/etc \ + --localstatedir=/var \ + --libdir=/usr/lib \ + --libexecdir=/usr/lib \ + --sbindir=/usr/bin \ + --enable-drm-renderer \ + --enable-tracing \ + --enable-pango \ + --with-gdm-autostart-file=yes \ + --with-logo=/usr/share/plymouth/arch-logo.png \ + --with-background-start-color-stop=0x000000 \ + --with-background-end-color-stop=0x4D4D4D \ + --without-rhgb-compat-link \ + --without-system-root-install + + make } package() { - cd $srcdir/$pkgname-$pkgver + cd "$srcdir"/${pkgname%%-*} make DESTDIR="$pkgdir" install - install -Dm644 "$srcdir/arch-logo.png" "$pkgdir/usr/share/plymouth/arch-logo.png" - install -Dm644 ../../encrypt_hook "$pkgdir/usr/lib/initcpio/hooks/plymouth-encrypt" - install -Dm644 ../../encrypt_install "$pkgdir/usr/lib/initcpio/install/plymouth-encrypt" - install -Dm644 "$srcdir/plymouth.functions" "$pkgdir/etc/rc.d/functions.d/plymouth.functions" - install -Dm644 "$srcdir/plymouth.initcpio_hook" "$pkgdir/usr/lib/initcpio/hooks/plymouth" + install -Dm644 "$srcdir/arch-logo.png" "$pkgdir/usr/share/plymouth/arch-logo.png" + install -Dm644 "$srcdir/encrypt_hook" "$pkgdir/usr/lib/initcpio/hooks/plymouth-encrypt" + install -Dm644 "$srcdir/encrypt_install" "$pkgdir/usr/lib/initcpio/install/plymouth-encrypt" + install -Dm644 "$srcdir/plymouth.functions" "$pkgdir/etc/rc.d/functions.d/plymouth.functions" + install -Dm644 "$srcdir/plymouth.initcpio_hook" "$pkgdir/usr/lib/initcpio/hooks/plymouth" install -Dm644 "$srcdir/plymouth.initcpio_install" "$pkgdir/usr/lib/initcpio/install/plymouth" - install -Dm644 "$srcdir/plymouthd.conf" "$pkgdir/etc/plymouth/plymouthd.conf" - install -Dm644 "$srcdir/system-release" "$pkgdir/etc/system-release" + install -Dm644 "$srcdir/plymouthd.conf" "$pkgdir/etc/plymouth/plymouthd.conf" + install -Dm644 "$srcdir/system-release" "$pkgdir/etc/system-release" # Plymouth<->systemd integration, including units for DMs - for i in {{gdm,kdm{,-unpatched},lightdm,lxdm}-plymouth,plymouth-quit}.service; do + for i in {{gdm,kdm{,-unpatched},lxdm,slim,lightdm}-plymouth,plymouth-quit}.service; do install -Dm644 "$srcdir/$i" "$pkgdir/usr/lib/systemd/system/$i" done + } - -md5sums=('38f5e613e5ab17806b950cee2d0d0d4e' +md5sums=('SKIP' '65fa2763d5c9bb9f80973ea5e6e3db3e' - 'c970831d733ca42e20415005967e7843' - '59f703eafd1aee4ca5782a523d412a46' - '21c45f9cab3e0b5165f68358884fbd0f' - 'cdee5ae4c4087181e80fe14061b7d604' + '79613b70a0a0be4c33978ef37c30f00a' + '65eb269910f1b81e3f0970af456394ca' '34d0ed7bbcb3d0ea498de24bc17b2ee9' '75ec0ac73eb9a1e3f6104df64520d431' 'ceec65ce58accdb270f3eaa23d794b4a' - 'e6d573b1913f3aa020cbde3863ee80f0' '62c3b4e894330a2ca4c2b8fbcaba083c' - 'a1763999bc3282771e712765c9427d77' + 'e6d573b1913f3aa020cbde3863ee80f0' + '225b953976e1c824f62ba406a63c18c7' + 'f0110fba1e77cd22c32d1727399d0b8a' + '95e987cfbc2d30a2cea215394eb9ac20' '4f3be343eea9956bbc94d615d5f41def' - 'e606ce14ceace727c2f13758e371a4ed' - '761f5090dc999e50b4572138347c775b' + '7f21ba9a85733ff945c23012cff55a89' '3bb0b8008edfad9e23703674341766a0' '42fddd683720dbacbe6e30b4b7892f3c' - 'c2a0cf5a499d6c14723461166a24ede7' + '412a1a89ca960370071746b0af8c0ac5' '37479b134827dc307b3c55bfb2711e99' - 'ab8a557d10f74bec5c94ed6cae34729c' - '30acbfc7722fb62ee464b8fec32b5cfd' - '89014b04513d61e0085e7a0c9924c183') + 'ab8a557d10f74bec5c94ed6cae34729c') diff --git a/abs/core/plymouth/__changelog b/abs/core/plymouth/__changelog index 21edf18..6b8e8c1 100644 --- a/abs/core/plymouth/__changelog +++ b/abs/core/plymouth/__changelog @@ -1,2 +1,4 @@ +pulled from AUR plymouth-git 12/3/13 removed systemd as a dep - +removed --enable-systemd configure option +add v86d as dep diff --git a/abs/core/plymouth/encrypt_hook b/abs/core/plymouth/encrypt_hook index 11db344..a3dcda1 100644 --- a/abs/core/plymouth/encrypt_hook +++ b/abs/core/plymouth/encrypt_hook @@ -1,4 +1,4 @@ -#!/usr/bin/ash +#!/bin/bash run_hook() { modprobe -a -q dm-crypt >/dev/null 2>&1 @@ -74,13 +74,10 @@ EOF fi # Ask for a passphrase if [ ${dopassphrase} -gt 0 ]; then - echo "" + echo echo "A password is required to access the ${cryptname} volume:" - - #loop until we get a real password - while ! eval cryptsetup luksOpen ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do - sleep 2; - done + plymouth ask-for-password --prompt="Password for ${cryptname} volume" --dont-pause-progress --number-of-tries=5 --command="/sbin/cryptsetup luksOpen --key-file=- ${cryptdev} ${cryptname} ${CSQUIET}" + sleep 2 fi if [ -e "/dev/mapper/${cryptname}" ]; then if [ ${DEPRECATED_CRYPT} -eq 1 ]; then @@ -135,5 +132,3 @@ EOF fi rm -f ${ckeyfile} } - -# vim: set ft=sh ts=4 sw=4 et: diff --git a/abs/core/plymouth/encrypt_hook.patch b/abs/core/plymouth/encrypt_hook.patch deleted file mode 100644 index a00a160..0000000 --- a/abs/core/plymouth/encrypt_hook.patch +++ /dev/null @@ -1,19 +0,0 @@ ---- encrypt_hooka 2012-07-15 11:17:04.000000000 +0300 -+++ encrypt_hook 2012-07-15 11:32:59.258648852 +0300 -@@ -73,13 +73,10 @@ - fi - # Ask for a passphrase - if [ ${dopassphrase} -gt 0 ]; then -- echo "" -+ echo - echo "A password is required to access the ${cryptname} volume:" -- -- #loop until we get a real password -- while ! eval cryptsetup luksOpen ${resolved} ${cryptname} ${cryptargs} ${CSQUIET}; do -- sleep 2; -- done -+ plymouth ask-for-password --prompt="Password for ${cryptname} volume" --dont-pause-progress --number-of-tries=5 --command="/sbin/cryptsetup luksOpen --key-file=- ${cryptdev} ${cryptname} ${CSQUIET}" -+ sleep 2 - fi - if [ -e "/dev/mapper/${cryptname}" ]; then - if [ ${DEPRECATED_CRYPT} -eq 1 ]; then diff --git a/abs/core/plymouth/encrypt_install b/abs/core/plymouth/encrypt_install index 38e5ddc..5258a0b 100644 --- a/abs/core/plymouth/encrypt_install +++ b/abs/core/plymouth/encrypt_install @@ -18,6 +18,11 @@ build() { add_file "/usr/lib/udev/rules.d/13-dm-disk.rules" add_file "/usr/lib/udev/rules.d/95-dm-notify.rules" add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules" + add_binary "/usr/lib/plymouth/label.so" + add_binary "/usr/lib/plymouth/text.so" + add_file "/usr/share/fonts/TTF/DejaVuSans.ttf" + add_file "/etc/fonts/fonts.conf" + add_file "/etc/fonts/conf.d/60-latin.conf" add_runscript } diff --git a/abs/core/plymouth/encrypt_install.patch b/abs/core/plymouth/encrypt_install.patch deleted file mode 100644 index d3a42b9..0000000 --- a/abs/core/plymouth/encrypt_install.patch +++ /dev/null @@ -1,15 +0,0 @@ ---- encrypt_install 2012-07-15 11:45:14.644764564 +0300 -+++ encrypt_installnew 2012-07-15 11:46:29.239269291 +0300 -@@ -18,6 +18,12 @@ - add_file "/usr/lib/udev/rules.d/13-dm-disk.rules" - add_file "/usr/lib/udev/rules.d/95-dm-notify.rules" - add_file "/usr/lib/initcpio/udev/11-dm-initramfs.rules" "/usr/lib/udev/rules.d/11-dm-initramfs.rules" -+ add_binary "/usr/lib/plymouth/label.so" -+ add_binary "/usr/lib/plymouth/text.so" -+ add_file "/usr/share/fonts/TTF/DejaVuSans.ttf" -+ add_file "/etc/fonts/fonts.conf" -+ add_file "/etc/fonts/conf.d/60-latin.conf" -+ add_file "/usr/lib/pango/1.6.0/modules/pango-basic-x.so" - - add_runscript - } diff --git a/abs/core/plymouth/plymouth-0.8.8.tar.bz2 b/abs/core/plymouth/plymouth-0.8.8.tar.bz2 Binary files differdeleted file mode 100644 index bf8c051..0000000 --- a/abs/core/plymouth/plymouth-0.8.8.tar.bz2 +++ /dev/null diff --git a/abs/core/plymouth/plymouth-pid.patch b/abs/core/plymouth/plymouth-pid.patch deleted file mode 100644 index 3f141b0..0000000 --- a/abs/core/plymouth/plymouth-pid.patch +++ /dev/null @@ -1,33 +0,0 @@ ---- a/systemd-units/systemd-ask-password-plymouth.service.in 2012-09-26 18:50:53.000000000 +0200 -+++ b/systemd-units/systemd-ask-password-plymouth.service.in 2012-10-28 23:12:04.295327564 +0100 -@@ -6,7 +6,7 @@ - After=plymouth-start.service - Before=shutdown.target - ConditionKernelCommandLine=!plymouth.enable=0 --ConditionPathExists=/run/plymouth/pid -+ConditionPathExists=/run/plymouth.pid - - [Service] - ExecStart=/bin/systemd-tty-ask-password-agent --watch --plymouth ---- a/systemd-units/systemd-ask-password-plymouth.path.in 2012-09-26 18:50:53.000000000 +0200 -+++ b/systemd-units/systemd-ask-password-plymouth.path.in 2012-10-28 23:11:54.348555717 +0100 -@@ -6,7 +6,7 @@ - After=plymouth-start.service - Before=basic.target shutdown.target - ConditionKernelCommandLine=!plymouth.enable=0 --ConditionPathExists=/run/plymouth/pid -+ConditionPathExists=/run/plymouth.pid - - [Path] - DirectoryNotEmpty=/run/systemd/ask-password ---- a/systemd-units/plymouth-start.service.in 2012-09-26 18:50:53.000000000 +0200 -+++ b/systemd-units/plymouth-start.service.in 2012-10-28 23:11:35.731982414 +0100 -@@ -7,7 +7,7 @@ - ConditionKernelCommandLine=!plymouth.enable=0 - - [Service] --ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=@plymouthruntimedir@/pid --attach-to-session -+ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=/run/plymouth.pid --attach-to-session - ExecStartPost=-/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; /bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash - Type=forking - KillMode=none diff --git a/abs/core/plymouth/plymouth-update-initrd.patch b/abs/core/plymouth/plymouth-update-initrd.patch index 648c874..c307199 100644 --- a/abs/core/plymouth/plymouth-update-initrd.patch +++ b/abs/core/plymouth/plymouth-update-initrd.patch @@ -1,8 +1,8 @@ ---- scripts/plymouth-update-initrd.old -+++ scripts/plymouth-update-initrd +--- scripts/plymouth-update-initrd.old 2013-10-27 17:02:15.200368142 +0900 ++++ scripts/plymouth-update-initrd 2013-10-27 17:02:57.686768138 +0900 @@ -1,2 +1,4 @@ - #!/bin/bash --mkinitrd -f /boot/initrd-$(uname -r).img $(uname -r) -+find /etc/mkinitcpio.d/ -name \*.preset -a \! -name example.preset | while read p; do -+ mkinitcpio -p $p +#!/bin/bash +-dracut -f /boot/initramfs-$(uname -r).img $(uname -r) ++find /etc/mkinitcpio.d/ -name \*.preset -a \! -name example.preset | while read p; do ++ mkinitcpio -p $p +done diff --git a/abs/core/plymouth/plymouth.functions b/abs/core/plymouth/plymouth.functions index cfaa19b..b866643 100644 --- a/abs/core/plymouth/plymouth.functions +++ b/abs/core/plymouth/plymouth.functions @@ -1,4 +1,3 @@ -#!/bin/bash if [[ -x /usr/bin/plymouth && -x /usr/sbin/plymouthd ]]; then ply_client() { /usr/bin/plymouth --ping && /usr/bin/plymouth "$@"; } @@ -21,8 +20,7 @@ if [[ -x /usr/bin/plymouth && -x /usr/sbin/plymouthd ]]; then } stat_fail() { - #JM remove client quitting - #ply_client --quit + ply_client --quit std_stat_fail "$@" } @@ -41,7 +39,7 @@ if [[ -x /usr/bin/plymouth && -x /usr/sbin/plymouthd ]]; then ply_quit_boot [[ $(ps h $(cat /tmp/plymouthd)) ]] && kill -9 $(cat /tmp/plymouthd) } -# JM add_hook shutdown_poweroff ply_quit_shutdown + add_hook shutdown_poweroff ply_quit_shutdown # start plymouth at the beginning of rc.shutdown ply_shutdown_start(){ @@ -61,8 +59,7 @@ if [[ -x /usr/bin/plymouth && -x /usr/sbin/plymouthd ]]; then # don't get killed by kill_all add_omit_pids `cat /tmp/plymouthd` } -#remove shutdown hook so plymouth doesn't start -#JM add_hook shutdown_start ply_shutdown_start + add_hook shutdown_start ply_shutdown_start fi # vim: set ts=2 sw=2 ft=sh noet: diff --git a/abs/core/plymouth/plymouth.initcpio_install b/abs/core/plymouth/plymouth.initcpio_install index 16048f1..22cc298 100644 --- a/abs/core/plymouth/plymouth.initcpio_install +++ b/abs/core/plymouth/plymouth.initcpio_install @@ -4,11 +4,11 @@ build() { DATADIR="/usr/share" PLYMOUTH_LOGO_FILE="${DATADIR}/plymouth/arch-logo.png" - PLYMOUTH_THEME_NAME="$(/usr/sbin/plymouth-set-default-theme)" + PLYMOUTH_THEME_NAME="$(/usr/bin/plymouth-set-default-theme)" PLYMOUTH_MODULE_NAME="$(grep "ModuleName *= *" ${DATADIR}/plymouth/themes/${PLYMOUTH_THEME_NAME}/${PLYMOUTH_THEME_NAME}.plymouth | sed 's/ModuleName *= *//')" PLYMOUTH_PLUGIN_PATH="$(plymouth --get-splash-plugin-path)" - add_binary /usr/sbin/plymouthd + add_binary /usr/bin/plymouthd add_binary /usr/bin/plymouth add_file ${DATADIR}/plymouth/themes/text/text.plymouth @@ -47,7 +47,7 @@ build() { add_binary "$(readlink -e /lib/libnss_files.so.2)" add_file /lib/libnss_files.so.2 - SCRIPT='plymouth' + add_runscript } help() { diff --git a/abs/core/plymouth/plymouth.install b/abs/core/plymouth/plymouth.install index aafcca8..99aa7ee 100644 --- a/abs/core/plymouth/plymouth.install +++ b/abs/core/plymouth/plymouth.install @@ -1,43 +1,50 @@ post_install() { -cat <<EOT +cat <<EOF + +=========== -================================================================================== 1. To make Plymouth work: - 1.1. Add "plymouth" to HOOKS after "base" and "udev" in /etc/mkinitcpio.conf - 1.2. Add 'quiet splash' to the grub command line - 1.3. Rebuild your initrd image (# mkinitcpio -p [kernel preset name]). + 1.1. Add "plymouth" to HOOKS after "base" and "udev" in /etc/mkinitcpio.conf + 1.2. Add 'quiet splash' to the grub command line + 1.3. Rebuild your initrd image (# mkinitcpio -p [kernel preset name]). E.g.: sudo mkinitcpio -p linux + +=========== 2. To enable encryption, replace "encrypt" with "plymouth-encrypt" in mkinitcpio.conf and rebuild your initrd image. + +=========== -3. You will also need to rebuild your initrd image every time you change your theme - (the default is set as 'spinfinity'). +3. You will also need to rebuild your initrd image every time you change your + theme (the default is set as 'spinfinity'). To list all plymouth themes: plymouth-set-default-theme -l - To change theme: - # plymouth-set-default-theme <theme> - - To rebuild initrd image: - # mkinitcpio -p linux + To change theme and rebuild initrd image: + # plymouth-set-default-theme -R <theme> + +=========== 4. For Smooth Transition to Display Manager you have to: - 4.1. See the Wiki Page (link in 5) to prepare your Display Manager - 4.2. Disable your Display Manager Unit - E.g. : systemctl disable kdm.service - 4.3. Enable the respective DM-plymouth Unit (GDM,KDM,Lightdm,LXDM units provided) - E.g. : systemctl enable kdm-plymouth.service + 4.1. See the Wiki Page (link in 5) to prepare your Display Manager + 4.2. Disable your Display Manager Unit + E.g. : # systemctl disable kdm.service + 4.3. Enable the respective DM-plymouth Unit (GDM, KDM, LXDM units provided) + E.g. : # systemctl enable kdm-plymouth.service + +=========== 5. For more information please visit the Wiki page: https://wiki.archlinux.org/index.php/Plymouth + +=========== -OBS. If you have any leftover "kill Plymouth" lines in /etc/rc.local or ~/.xinitrc - they are no longer required. -================================================================================== +OBS. If you have any leftover "kill Plymouth" lines in /etc/rc.local or +~/.xinitrc they are no longer required. -EOT +EOF } post_upgrade() { diff --git a/abs/core/plymouth/slim-plymouth.service b/abs/core/plymouth/slim-plymouth.service new file mode 100644 index 0000000..8806c7d --- /dev/null +++ b/abs/core/plymouth/slim-plymouth.service @@ -0,0 +1,13 @@ +[Unit] +Description=SLiM Simple Login Manager +After=systemd-user-sessions.service + +Conflicts=plymouth-quit.service +After=plymouth-quit.service + +[Service] +ExecStart=/usr/bin/slim -nodaemon +StandardOutput=syslog + +[Install] +Alias=display-manager.service diff --git a/abs/core/plymouth/systemd-unit-dir.patch b/abs/core/plymouth/systemd-unit-dir.patch deleted file mode 100644 index 7058c8f..0000000 --- a/abs/core/plymouth/systemd-unit-dir.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- configure.ac.orig 2012-06-12 17:19:48.903409717 +0300 -+++ configure.ac 2012-06-12 17:20:01.916743217 +0300 -@@ -254,7 +254,7 @@ - - if test x$enable_systemd_integration = xyes; then - AC_DEFINE(PLY_ENABLE_SYSTEMD_INTEGRATION, 1, [Coordinate boot up with systemd]) -- SYSTEMD_UNIT_DIR=/lib/systemd/system -+ SYSTEMD_UNIT_DIR=/usr/lib/systemd/system - AC_SUBST(SYSTEMD_UNIT_DIR) - fi - diff --git a/abs/core/plymouth/udevadm.patch b/abs/core/plymouth/udevadm.patch deleted file mode 100644 index aa01e00..0000000 --- a/abs/core/plymouth/udevadm.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- a/systemd-units/plymouth-start.service.in 2012-09-26 18:50:53.000000000 +0200 -+++ b/systemd-units/plymouth-start.service.in 2012-11-01 00:12:35.186732840 +0100 -@@ -8,7 +8,7 @@ - - [Service] - ExecStart=@PLYMOUTH_DAEMON_DIR@/plymouthd --mode=boot --pid-file=/run/plymouth.pid --attach-to-session --ExecStartPost=-/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; /bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash -+ExecStartPost=-/usr/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/drm/card0/dev ; /usr/bin/udevadm settle --timeout=30 --exit-if-exists=/sys/class/graphics/fb0/dev ; @PLYMOUTH_CLIENT_DIR@/plymouth show-splash - Type=forking - KillMode=none - SendSIGKILL=no diff --git a/abs/core/rsyslog/PKGBUILD b/abs/core/rsyslog/PKGBUILD index e8084ea..61e61f0 100644 --- a/abs/core/rsyslog/PKGBUILD +++ b/abs/core/rsyslog/PKGBUILD @@ -3,7 +3,7 @@ pkgname=rsyslog pkgver=5.8.6 -pkgrel=9 +pkgrel=11 pkgdesc="An enhanced multi-threaded syslogd with a focus on security and reliability" url="http://www.rsyslog.com/" arch=('i686' 'x86_64') @@ -21,8 +21,8 @@ groups=('base') options=('strip' 'zipman' '!libtool') #install=('rsyslog.install') source=("http://www.rsyslog.com/files/download/rsyslog/rsyslog-$pkgver.tar.gz" - 'rsyslog' - 'rsyslog.conf.d' 'rsyslog.conf.linhes' log_care.sh) + 'rsyslog' 'rsyslog.conf.d' 'rsyslog.conf.linhes' 'mythtv.conf' + 'log_care.sh') build() { cd ${srcdir}/${pkgname}-${pkgver} @@ -41,14 +41,14 @@ package() { make install DESTDIR=${pkgdir} # Install Daemons and Configuration Files install -D -m755 ${srcdir}/${pkgname} ${pkgdir}/etc/rc.d/${pkgname}d - install -D -m644 $srcdir/${pkgname}.conf.linhes ${pkgdir}/etc/${pkgname}.conf - mkdir -p ${pkgdir}/etc/rsyslog.d/ - touch ${pkgdir}/etc/rsyslog.d/empty.conf + install -D -m644 ${srcdir}/${pkgname}.conf.linhes ${pkgdir}/etc/${pkgname}.conf + install -D -m644 ${srcdir}/mythtv.conf ${pkgdir}/etc/rsyslog.d/mythtv.conf install -D -m644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/${pkgname} install -D -m755 ${srcdir}/log_care.sh ${pkgdir}/etc/cron.daily/log_care } md5sums=('c46db0496066b82faf735bd4222208d7' 'a18bbcbb6ebdaa13a6ec6d9f3d9eb2da' '1a0cd4530dd5d1439456d5ae230574d9' - 'df5cb090691db8640c489981ba3d0798' - 'f20c660ec9444613df0ad078944b31ec') + 'a4dd3846116b02f35d48c8987b30394b' + 'c71fa75857ff7b9e24e41457e89c76ca' + 'cd39e6edc1fcbbae2093c40c880e0079') diff --git a/abs/core/rsyslog/log_care.sh b/abs/core/rsyslog/log_care.sh index b0a774b..ced0f06 100644 --- a/abs/core/rsyslog/log_care.sh +++ b/abs/core/rsyslog/log_care.sh @@ -1,14 +1,16 @@ #!/bin/bash MYTH_RUN_STATUS=1 . /etc/profile -YEAR=`date +%Y` -LASTYEAR=$(($YEAR - 1)) -for DATE in $YEAR $LASTYEAR -do - echo "Compressing log files" - find /var/log/$DATE* -mtime +1 -exec gzip -9 {} \; + +BackupDir="/var/log/20*-*-*" +KeepBackups=14 +NumBackups=`ls -d $BackupDir | wc -l` + +if [[ $NumBackups > $KeepBackups ]]; then echo "Deleting old log files" - find /var/log/$DATE* -mtime +12 -exec rm -rf {} \; - echo "Deleting empty directories" - find /var/log/$DATE* -depth -type d -empty -exec rm -rf {} \; -done + numdel=$(($NumBackups-$KeepBackups)) + rm -rf `ls -d $BackupDir | head -$numdel` +fi + +echo "Compressing log files" +find $BackupDir -type f -mtime +2 \( ! -iname "*.gz" \) -exec gzip -9 {} \; diff --git a/abs/core/rsyslog/mythtv.conf b/abs/core/rsyslog/mythtv.conf new file mode 100644 index 0000000..1878b74 --- /dev/null +++ b/abs/core/rsyslog/mythtv.conf @@ -0,0 +1,63 @@ +# MythTV 0.26 and later rsyslog.d conf + +# Control-code conversion. The default is on. +#$EscapeControlCharactersOnReceive off + +$template DynMythFormat,"%TIMESTAMP:::date-rfc3339%%msg%\n" +$template DynMythBackend,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythbackend.log" +$template DynMythFrontend,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythfrontend.log" +$template DynMythJobQueue,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythjobqueue.log" +$template DynMythMediaServer,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythmediaserver.log" +$template DynMythSetup,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythtv_setup.log" +$template DynMythFillDatabase,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythfilldatabase.log" +$template DynMythCommflag,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythcommflag.log" +$template DynMythPreviewGen,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythpreviewgen.log" +$template DynMythTranscode,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythtranscode.log" +$template DynMythMetadataLookup,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythmetadatalookup.log" +$template DynMythUtil,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythutil.log" +$template DynMythWelcome,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythwelcome.log" +$template DynMythShutdown,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythshutdown.log" +$template DynMythLCDServer,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythlcdserver.log" +$template DynMythccExtractor,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythccextractor.log" +$template DynMythAVTest,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythavtest.log" +$template DynMythLogServer,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_mythlogserver.log" +$template DynMythNoLogServer,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_%programname%.log" + + + +if $syslogfacility-text == 'local6' and $msg startswith ' mythbackend' then ?DynMythBackend;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythfrontend' then ?DynMythFrontend;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythjobqueue' then ?DynMythJobQueue;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythmediaserver' then ?DynMythMediaServer;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythtv-setup' then ?DynMythSetup;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythfilldatabase' then ?DynMythFillDatabase;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythcommflag' then ?DynMythCommflag;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythpreviewgen' then ?DynMythPreviewGen;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythtranscode' then ?DynMythTranscode;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythmetadatalookup' then ?DynMythMetadataLookup;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythutil' then ?DynMythUtil;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythwelcome' then ?DynMythWelcome;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythshutdown' then ?DynMythShutdown;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythlcdserver' then ?DynMythLCDServer;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythccextractor' then ?DynMythccExtractor;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythavtest' then ?DynMythAVTest;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $msg startswith ' mythlogserver' then ?DynMythLogServer;DynMythFormat +& ~ +if $syslogfacility-text == 'local6' and $programname startswith 'myth' then ?DynMythNoLogServer +& ~ diff --git a/abs/core/rsyslog/rsyslog.conf.linhes b/abs/core/rsyslog/rsyslog.conf.linhes index 24bf3f5..ecdc1f4 100644 --- a/abs/core/rsyslog/rsyslog.conf.linhes +++ b/abs/core/rsyslog/rsyslog.conf.linhes @@ -14,20 +14,18 @@ $DirCreateMode 0755 # Log all kernel messages to the console. # Logging much else clutters up the screen. #kern.* /dev/console -$template DailyPerHostLogs,"/var/log//%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_messages.log" +$template DailyPerHostLogs,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_messages.log" $template DynFile,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_%programname%.log" -$template DynMail,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_maillog" -$template DynCron,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_cron" +$template DynMail,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_maillog.log" +$template DynCron,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_cron.log" $template DynBoot,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_boot.log" -$template DynSpooler,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_spooler" -$template DynLighttpd,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_lighttpd" -$template DynMyth,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_%programname%.%syslogtag:R,ERE,1,ZERO:\[([[:digit:]]{1,})\]--end%.log" +$template DynSpooler,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_spooler.log" +$template DynLighttpd,"/var/log/%$YEAR%-%$MONTH%-%$DAY%/%HOSTNAME%_lighttpd.log" + if $programname contains 'lighttpd' then ?DynLighttpd & ~ -local6.* ?DynMyth -#& ~ # Log anything (except mail) of level info or higher. # Don't log private authentication messages! #*.info;mail.none;authpriv.none;cron.none -/var/log/messages @@ -42,7 +40,6 @@ authpriv.* ?DynFile #mail.* -/var/log/maillog mail.* ?DynMail - # Log cron stuff #cron.* -/var/log/cron cron.* ?DynCron diff --git a/abs/core/runit-scripts/PKGBUILD b/abs/core/runit-scripts/PKGBUILD index b652cba..9857b4a 100755 --- a/abs/core/runit-scripts/PKGBUILD +++ b/abs/core/runit-scripts/PKGBUILD @@ -1,6 +1,6 @@ pkgname=runit-scripts -pkgver=8.0 -pkgrel=6 +pkgver=8.1 +pkgrel=5 pkgdesc="collection of startup scripts for runit" url="http://smarden.org/runit/" license="BSD" @@ -10,7 +10,7 @@ conflicts=() replaces=() backup=('etc/runit/1.local' 'etc/runit/3.local') install=runit.install -source=(fbsplash-runit.sh) +source=('fbsplash-runit.sh') arch=('i686' 'x86_64') build() { @@ -24,12 +24,14 @@ package() { install -d $pkgdir/etc/sv install -d $pkgdir/sbin install -d $pkgdir/etc/rc.d/functions.d - - install -m0700 1 2 3 1.local 3.local ctrlaltdel $pkgdir/etc/runit + + #this file contains the function runit-stat which is needed by the runit service scripts install -m755 $srcdir/fbsplash-runit.sh $pkgdir/etc/rc.d/functions.d/fbsplash-runit.sh + + install -m0700 1 2 3 1.local 3.local ctrlaltdel $pkgdir/etc/runit install -m0755 reboot-runit halt-runit logger $pkgdir/sbin rsync -a --exclude=.svn services/* $pkgdir/etc/sv chmod -R 755 $pkgdir/etc/sv chown -R root:root $pkgdir/etc/sv } -md5sums=('c79246677d5ffe687bcf6df1b9c2abc2') +md5sums=('30b944b91aa1f57c5469c8bd210cb497') diff --git a/abs/core/runit-scripts/fbsplash-runit.sh b/abs/core/runit-scripts/fbsplash-runit.sh index 87435ee..9fb9591 100755..100644 --- a/abs/core/runit-scripts/fbsplash-runit.sh +++ b/abs/core/runit-scripts/fbsplash-runit.sh @@ -5,33 +5,33 @@ printhlr() { } stat_runit(){ - printf "" - printhlr "${C_MAIN}${1}${C_CLEAR} " + printf "" + printhlr "${C_MAIN}${1}${C_CLEAR} " } # splash stuff # if [ -e /etc/conf.d/fbcondecor ] then - . /etc/conf.d/fbcondecor - . /sbin/splash-functions.sh - - case $0 in /etc/runit/1 ) - # Prevent splash destruction - CONSOLEFONT="" - # Continue to use a splash daemon started in initcpio - if /bin/mountpoint -q /run/.splash-cache; then - /bin/mount --move /run/.splash-cache $spl_cachedir || return - # Mount a tmpfs - else - ( splash_cache_prep ) || return - fi - - splash_comm_send set message "$SPLASH_BOOT_MESSAGE" - - ;; /etc/runit/3 ) - ( splash_cache_prep ) || return - - splash_comm_send set message "$SPLASH_SHUTDOWN_MESSAGE" - esac + . /etc/conf.d/fbcondecor + . /sbin/splash-functions.sh + + case $0 in /etc/runit/1 ) + # Prevent splash destruction + CONSOLEFONT="" + # Continue to use a splash daemon started in initcpio + if /bin/mountpoint -q /run/.splash-cache; then + /bin/mount --move /run/.splash-cache $spl_cachedir || return + # Mount a tmpfs + else + ( splash_cache_prep ) || return + fi + + splash_comm_send set message "$SPLASH_BOOT_MESSAGE" + + ;; /etc/runit/3 ) + ( splash_cache_prep ) || return + + splash_comm_send set message "$SPLASH_SHUTDOWN_MESSAGE" + esac fi diff --git a/abs/core/runit-scripts/runitscripts/services/apcupsd/run b/abs/core/runit-scripts/runitscripts/services/apcupsd/run new file mode 100755 index 0000000..70bd9e0 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/apcupsd/run @@ -0,0 +1,8 @@ +#!/bin/sh +exec 2>&1 + +. /etc/rc.conf +. /etc/rc.d/functions + +stat_runit "Starting APC UPS Daemon" +exec /usr/bin/apcupsd -b -f /etc/apcupsd/apcupsd.conf diff --git a/abs/core/runit-scripts/runitscripts/services/cron/log/run b/abs/core/runit-scripts/runitscripts/services/cron/log/run index 9dd37e3..785d6c7 100755 --- a/abs/core/runit-scripts/runitscripts/services/cron/log/run +++ b/abs/core/runit-scripts/runitscripts/services/cron/log/run @@ -1,5 +1,5 @@ #!/bin/sh exec 2>&1 . /etc/systemconfig - /usr/bin/logger -p local6.info -t cron + /usr/bin/logger -t cron diff --git a/abs/core/runit-scripts/runitscripts/services/frontend/log/run b/abs/core/runit-scripts/runitscripts/services/frontend/log/run index 801eaf2..bd431b2 100755 --- a/abs/core/runit-scripts/runitscripts/services/frontend/log/run +++ b/abs/core/runit-scripts/runitscripts/services/frontend/log/run @@ -1,5 +1,5 @@ #!/bin/sh exec 2>&1 . /etc/systemconfig - /usr/bin/logger -p local6.info -t frontend + /usr/bin/logger -t frontend diff --git a/abs/core/runit-scripts/runitscripts/services/mpd/log/run b/abs/core/runit-scripts/runitscripts/services/mpd/log/run new file mode 100755 index 0000000..bc856fe --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mpd/log/run @@ -0,0 +1,5 @@ +#!/bin/sh +exec 2>&1 +. /etc/systemconfig + /usr/bin/logger -t mpd + diff --git a/abs/core/runit-scripts/runitscripts/services/mpd/run b/abs/core/runit-scripts/runitscripts/services/mpd/run new file mode 100755 index 0000000..c4bd347 --- /dev/null +++ b/abs/core/runit-scripts/runitscripts/services/mpd/run @@ -0,0 +1,9 @@ +#!/bin/sh +export TERM=linux +. /etc/rc.conf +. /etc/rc.d/functions +stat_runit "Starting mpd" + + +exec 2>&1 +exec /usr/bin/mpd --no-daemon --stdout 2>&1 diff --git a/abs/core/runit-scripts/runitscripts/services/msg_daemon/run b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run index 76bb702..6f1b4b7 100755 --- a/abs/core/runit-scripts/runitscripts/services/msg_daemon/run +++ b/abs/core/runit-scripts/runitscripts/services/msg_daemon/run @@ -5,4 +5,5 @@ export TERM=linux . /etc/rc.d/functions . /etc/profile stat_runit "Starting osd message daemon" -DISPLAY=127.0.0.1:0 /usr/LH/bin/msg_daemon.py +exec env DISPLAY=127.0.0.1:0 /usr/LH/bin/msg_daemon.py + diff --git a/abs/core/runit-scripts/runitscripts/services/mythbackend/run b/abs/core/runit-scripts/runitscripts/services/mythbackend/run index 903979c..e24fc3d 100755 --- a/abs/core/runit-scripts/runitscripts/services/mythbackend/run +++ b/abs/core/runit-scripts/runitscripts/services/mythbackend/run @@ -79,12 +79,5 @@ export HOME=/root stat_runit "Starting Primary MythBackend" fi - - - if pacman -Q mythtv | grep -q 0.24 - then - exec su mythtv -c "/usr/bin/mythbackend --logfile /var/log/mythtv/mythbackend.log" - else - exec su mythtv -c "/usr/bin/mythbackend -q --syslog local6" - fi + exec su mythtv -c "/usr/bin/mythbackend -q --syslog local6" # fi diff --git a/abs/core/runit-scripts/runitscripts/services/udevil/run b/abs/core/runit-scripts/runitscripts/services/udevil/run index 46f922c..35fc273 100644..100755 --- a/abs/core/runit-scripts/runitscripts/services/udevil/run +++ b/abs/core/runit-scripts/runitscripts/services/udevil/run @@ -1,5 +1,6 @@ #!/bin/sh export TERM=linux +2>&1 . /etc/rc.conf . /etc/rc.d/functions stat_runit "starting udevil" diff --git a/abs/core/supplemental-web/PKGBUILD b/abs/core/supplemental-web/PKGBUILD index 3fddaf6..dd73d51 100644 --- a/abs/core/supplemental-web/PKGBUILD +++ b/abs/core/supplemental-web/PKGBUILD @@ -1,16 +1,18 @@ pkgbase=supplemental-web pkgname=('supplemental-web' 'supplemental-web-slave') pkgver=8.0 -pkgrel=9 +pkgrel=15 arch=('i686' 'x86_64') - -backup=('extra.cfg.txt') +license=('GPL') +backup=('data/srv/httpd/cgi/extra.cfg.txt') source=(lighttpd-supplement.conf extra.cfg.txt wakeonlan.sh slaveserve.py supplemental_slave.rules supplemental_web.rules ) package_supplemental-web() { pkgdesc="supplemental-web package for master backend" - depends=('wol' 'etherwake' 'lighttpd' 'php' 'fcgi' 'python2' 'xymonserver' 'certmaster' 'func' 'python_aosd' 'LinHES-system>=2-50' 'shellinabox') + depends=('wol' 'etherwake' 'lighttpd' 'php' 'fcgi' 'python2' 'xymonserver' 'certmaster' 'func' 'python_aosd' 'shellinabox') install=supplemental-web.install + replaces='local-website' + conflicts='local-website' MVDIR=$pkgdir/usr/MythVantage install -m755 -D lighttpd-supplement.conf $pkgdir/etc/gen_light_conf.d/lighttpd-supplement.conf @@ -30,7 +32,7 @@ package_supplemental-web() { package_supplemental-web-slave() { pkgdesc="supplemental-web package for slave backend" depends=('python2' 'func' 'python_aosd' 'LinHES-system>=2-50') - conflicts="supplemental-web" + conflicts=("supplemental-web" "local-website") mkdir -p $pkgdir/data/srv/httpd/ cp -rp $startdir/cgi $pkgdir/data/srv/httpd/ chown -R root:root $pkgdir/data/srv/httpd/ diff --git a/abs/core/supplemental-web/cgi/beclear.cgi b/abs/core/supplemental-web/cgi/beclear.cgi index 489466d..941c958 100644 --- a/abs/core/supplemental-web/cgi/beclear.cgi +++ b/abs/core/supplemental-web/cgi/beclear.cgi @@ -1,4 +1,4 @@ #!/bin/bash /usr/bin/mythbackend --clearcache -MESSAGE="settings cache is cleared " +MESSAGE="MythBackend Settings Cache Cleared" #/usr/bin/notify.py SYS "$MESSAGE" 2>/dev/null diff --git a/abs/core/supplemental-web/cgi/bestart.cgi b/abs/core/supplemental-web/cgi/bestart.cgi index e09e42b..a7a49b2 100644 --- a/abs/core/supplemental-web/cgi/bestart.cgi +++ b/abs/core/supplemental-web/cgi/bestart.cgi @@ -1,10 +1,13 @@ #!/bin/bash -# MESSAGE="Trying to start `hostname` B.E." -# /usr/bin/func "*" call msg display "$MESSAGE" & +#MESSAGE="Starting `hostname` MythBackend" +#/usr/bin/func "*" call msg display "$MESSAGE" & -sudo /sbin/sv start mythbackend - -MESSAGE="`hostname` B.E. started" -/usr/bin/func "*" call msg display "$MESSAGE" & +svresult=`sudo /sbin/sv start mythbackend` +if [[ $svresult == *"run: "* ]]; then + MESSAGE="`hostname` MythBackend Started" +else + MESSAGE="`hostname` MythBackend didn't Start\nCheck MythBackend Log" +fi +/usr/bin/func "*" call msg display "$MESSAGE" & diff --git a/abs/core/supplemental-web/cgi/bestop.cgi b/abs/core/supplemental-web/cgi/bestop.cgi index c9d7fad..2d31904 100644 --- a/abs/core/supplemental-web/cgi/bestop.cgi +++ b/abs/core/supplemental-web/cgi/bestop.cgi @@ -1,12 +1,13 @@ #!/bin/bash -MESSAGE="Trying to stop `hostname` B.E." -/usr/bin/func "*" call msg display "$MESSAGE" & - -sudo /sbin/sv stop mythbackend - -MESSAGE="`hostname` B.E. stopped" +MESSAGE="Stopping `hostname` MythBackend..." /usr/bin/func "*" call msg display "$MESSAGE" & +svresult=`sudo /sbin/sv stop mythbackend` +if [[ $svresult == *"down: "* ]]; then + MESSAGE="`hostname` MythBackend Stopped" +else + MESSAGE="`hostname` MythBackend didn't Stop" +fi - +/usr/bin/func "*" call msg display "$MESSAGE" & diff --git a/abs/core/supplemental-web/contents/header.html b/abs/core/supplemental-web/contents/header.html index d972bfa..032acd1 100644 --- a/abs/core/supplemental-web/contents/header.html +++ b/abs/core/supplemental-web/contents/header.html @@ -43,9 +43,11 @@ function beStatus() <li><a id="modify-me">MythBackend Status</a></li>
-<li><a href="xymon" >System »</a>
+<li><a href="xymon/">Health & Maintenance</a></li>
+
+<li><a href="/logs/" >System »</a>
<ul>
- <li><a href="/xymon" >Health</a></li>
+ <!-- <li><a href="/xymon" >Health</a></li>-->
<li><a href="/logs/" >Logs</a></li>
<li><a href="/exports.shtml" >File Shares</a></li>
<li><a href="/cardmap.shtml" >Tuners</a></li>
diff --git a/abs/core/supplemental-web/contents/alt_index.html b/abs/core/supplemental-web/contents/index.html index 1168c4a..1168c4a 100644 --- a/abs/core/supplemental-web/contents/alt_index.html +++ b/abs/core/supplemental-web/contents/index.html diff --git a/abs/core/supplemental-web/supplemental-web.install b/abs/core/supplemental-web/supplemental-web.install index 55101ba..6e67c67 100644 --- a/abs/core/supplemental-web/supplemental-web.install +++ b/abs/core/supplemental-web/supplemental-web.install @@ -14,7 +14,6 @@ post_install() { echo "==> Forcing a re-read of lighttpd's configuration file." echo "" /sbin/sv hup /service/lighttpd - /usr/LH/bin/switch_web.sh supplemental } # arg 1: the new package version @@ -43,7 +42,6 @@ post_remove() { echo "==> Forcing a re-read of lighttpd's configuration file." echo "" /sbin/sv hup /service/lighttpd - /usr/LH/bin/switch_web.sh local } op=$1 diff --git a/abs/core/xymon/PKGBUILD b/abs/core/xymon/PKGBUILD index 0c797ee..8163f32 100755 --- a/abs/core/xymon/PKGBUILD +++ b/abs/core/xymon/PKGBUILD @@ -1,14 +1,14 @@ pkgbase=xymon pkgname=(xymonserver xymonclient) pkgver=4.3.5 -pkgrel=49 +pkgrel=55 pkgdesc="Hobbit is a system for monitoring servers and networks. " license="GPL" arch=('i686' 'x86_64') url="http://www.xymon.com/" -source=(http://hivelocity.dl.sourceforge.net/project/xymon/Xymon/4.3.5/xymon-4.3.5.tar.gz hobbitadd.py xymon_ghost_check graph.cfg.diff xymonserver.cfg.diff tasks.d.mv clientlaunch.cfg.patch hobbitstorage.py hbnotes.py hobbit-myth-orphan.sh analysis.cfg hbfunc.py be.png tuner.png tv.png hobbit-mem-myth.sh hobbit_notify.sh alerts.cfg hobbit_myth_data.py logrotate-server.xymon logrotate-client.xymon log_list.sh client-local.cfg.patch led_themes.tar.gz xymon-server.rules hosts.cfg.patch) +source=(http://hivelocity.dl.sourceforge.net/project/xymon/Xymon/4.3.5/xymon-4.3.5.tar.gz hobbitadd.py xymon_ghost_check graph.cfg.diff xymonserver.cfg.diff tasks.d.mv clientlaunch.cfg.patch hobbitstorage.py hbnotes.py hobbit-myth-orphan.sh analysis.cfg hbfunc.py be.png tuner.png tv.png hobbit-mem-myth.sh hobbit_notify.sh login_notify.sh alerts.cfg hobbit_myth_data.py logrotate-server.xymon logrotate-client.xymon log_list.sh client-local.cfg.patch led_themes.tar.gz xymon-server.rules hosts.cfg.patch) depends=('rrdtool' 'fping' 'pcre' 'python2' 'graphviz' 'LinHES-system>=8.0-5') @@ -67,13 +67,14 @@ package_xymonserver(){ cat alerts.cfg >> $startdir/pkg/xymonserver/home/xymon/etc/alerts.cfg install -m755 hobbit_notify.sh $startdir/pkg/xymonserver/home/xymon/server/bin/hobbit_notify.sh + install -m755 login_notify.sh $startdir/pkg/xymonserver/home/xymon/server/bin/login_notify.sh install -m755 $startdir/src/tv.png $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/gifs/tv.png install -m755 $startdir/src/tuner.png $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/gifs/tuner.png install -m755 $startdir/src/be.png $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/gifs/be.png install -D -m644 $startdir/src/logrotate-server.xymon $startdir/pkg/xymonserver/etc/logrotate.d/xymon-server -# fix env for mythtb bindingds + # fix env for mythtb bindingds echo "MYTHCONFDIR=/usr/share/mythtv" >> $startdir/pkg/xymonserver/home/xymon/etc/xymonserver.cfg @@ -91,6 +92,14 @@ package_xymonserver(){ patch -p3 < $startdir/src/client-local.cfg.patch || return 1 patch -p3 < $startdir/src/hosts.cfg.patch || return 1 + #make dir for login alerts + mkdir $startdir/pkg/xymonserver/home/xymon/var/login_alerts + + #add custom module descriptions + COLDOC=$pkgdir/home/xymon/etc/columndoc.csv + echo "myth_mtc;The <b>myth_mtc</b> column shows the status of the MythTV maintenance script.;" >> $COLDOC + echo "orphan;The <b>orphan</b> column shows the status of the find_orphans.py script.;" >> $COLDOC + #fix permissions chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/ chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/ @@ -99,6 +108,8 @@ package_xymonserver(){ chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/snap/ chmod 775 $startdir/pkg/xymonserver/data/srv/httpd/htdocs/xymon/rep/ chmod 750 $startdir/pkg/xymonserver/etc/sudoers.d + chmod 775 $startdir/pkg/xymonserver/home/xymon/var/login_alerts + } @@ -128,17 +139,18 @@ md5sums=('31923ec126fe1c264fceb459d2175161' '758cdd9f1ba5ae3e1b42e811172806f3' 'ee608dcafc050d790e28647a670f6b60' 'b2f98ac0df013332deedc1efae0a270d' - 'c31bcb503a227ed5ff7b218581793bfc' + '1141fc6f846e91f380bbcdb212b44f7d' '0f70e76a164f648f0a4a01110137cb20' - 'f6921f0413215ae174e81306be80d37f' + '166279c006c3ef7bf0c21537cf89fc83' '80d9cfac86c6d96836e6f406e35e7cf5' 'd210c43fb9ee9ad6cd7648e0c2e0efea' '0c808fa12672289f86b0651545381308' '0469d775db9fdd18ea95dd41937ada82' '0757294eec13771f8e63da23cf066796' - '622f400fd098cbc43c203e3210a6694e' - '84442377c6e914b65519076bda4e17a4' - 'd7116dc59319b893e90a26e6beb83994' + '270e13da6cbc9d49079d994edaa71e64' + '4bc37b700146e4f4206a729c835903b0' + '9af2ad60ac4c3cb653754618f603e311' + 'b8eb10070f2ad6a245d3da15091694ba' 'b4e8641e97e6b689dbc634af785e6799' 'e2844513e2c92e8b5084818f3b2a478d' '98e9242ae346f729b14cb195786571f2' diff --git a/abs/core/xymon/alerts.cfg b/abs/core/xymon/alerts.cfg index e458655..a5e5bc2 100644..100755 --- a/abs/core/xymon/alerts.cfg +++ b/abs/core/xymon/alerts.cfg @@ -1,6 +1,128 @@ +# +# The alerts.cfg file controls who receives alerts +# when a status in the XYmon system goes into a critical +# state (usually: red, yellow or purple). +# +# This file is made up from RULES and RECIPIENTS. +# +# A RULE is a filter made from the PAGE where a host +# is located in XYmon; the HOST name, the SERVICE name, +# the COLOR of the status, the TIME of day, and the +# DURATION of the event. +# +# A RECIPIENT can be a MAIL address, or a SCRIPT. +# +# Recipients can also have rules associated with them, +# that modify the rules for a single recipient, e.g. +# you can define a rule for alerting, then add an +# extra criteria e.g. so a single recipient does not get +# alerted until after 20 minutes. +# +# A sample rule: +# +# HOST=www.foo.com SERVICE=http +# MAIL webadmin@foo.com REPEAT=20 RECOVERED +# MAIL cio@foo.com DURATION>60 COLOR=red +# SCRIPT /usr/local/bin/sendsms 1234567890 FORMAT=SMS +# +# The first line sets up a rule that catches alerts +# for the host "www.foo.com" and the "http" service. +# There are three recipients for these alerts: The first +# one is the "webadmin@foo.com" - they get alerted +# immediately when the status goes into an alert state, +# and the alert is repeated every 20 minutes until it +# recovers. When it recovers, a message is sent about +# the recovery. +# +# The second recipient is "cio@foo.com". He gets alerted +# only when the service goes "red" for more than 60 minutes. +# +# The third recipient is a script, "/usr/local/bin/sendsms". +# The real recipient is "1234567890", but it is handled +# by the script - the script receives a set of environment +# variables with the details about the alert, including the +# real recipient. The alert message is preformatted for +# an SMS recipient. +# +# You can use Perl-compatible "regular expressions" for +# the PAGE, HOST and SERVICE definitions, by putting a "%" +# in front of the regex. E.g. +# +# HOST=%^www.* +# MAIL webadmin@foo.com EXHOST=www.testsite.foo.com +# +# This sets up a rule so that alerts from any hostname +# beginning with "www" goes to "webadmin@foo.com", EXCEPT +# alerts from "www.testsite.foo.com" +# +# The following keywords are recognized: +# PAGE - rule matching an alert by the name of the +# page in XYmon. This is the name following +# the "page", "subpage" or "subparent" keyword +# in the hosts.cfg file. +# EXPAGE - rule excluding an alert if the pagename matches. +# HOST - rule matching an alert by the hostname. +# EXHOST - rule excluding an alert by matching the hostname. +# SERVICE - rule matching an alert by the service name. +# EXSERVICE - rule excluding an alert by matching the hostname. +# GROUP - rule matching an alert by the group ID. +# (Group ID's are associated with a status through the +# analysis.cfg configuration). +# EXGROUP - rule excluding an alert by matching the group ID. +# COLOR - rule matching an alert by color. Can be "red", +# "yellow", or "purple". +# TIME - rule matching an alert by the time-of-day. This +# is specified as the DOWNTIME timespecification +# in the hosts.cfg file (see hosts.cfg(5)). +# DURATION - Rule matcing an alert if the event has lasted +# longer/shorter than the given duration. E.g. +# DURATION>10 (lasted longer than 10 minutes) or +# DURARION<30 (only sends alerts the first 30 minutes). +# RECOVERED - Rule matches if the alert has recovered from an +# alert state. +# NOTICE - Rule matches if the message is a "notify" message +# (typically sent when a status is enabled or disabled). +# MAIL - Recipient who receives an e-mail alert. This takes +# one parameter, the e-mail address. +# SCRIPT - Recipient that invokes a script. This takes two +# parameters: The script filename, and the recipient +# that gets passed to the script. +# FORMAT - format of the text message with the alert. Default +# is "TEXT" (suitable for e-mail alerts). "SMS" is +# a short message with no subject for SMS alerts. +# "SCRIPT" is a brief message template for scripts. +# REPEAT - How often an alert gets repeated, in minutes. +# STOP - Valid for a recipient: If this recipient gets an +# alert, recipients further down in alerts.cfg +# are ignored. +# UNMATCHED - Matches if no alerts have been sent so far. +# +# +# Script get the following environment variables pre-defined so +# that they can send a meaningful alert: +# +# BBCOLORLEVEL - The color of the alert: "red", "yellow" or "purple" +# BBALPHAMSG - The full text of the status log triggering the alert +# ACKCODE - The "cookie" that can be used to acknowledge the alert +# RCPT - The recipient, from the SCRIPT entry +# BBHOSTNAME - The name of the host that the alert is about +# MACHIP - The IP-address of the host that has a problem +# BBSVCNAME - The name of the service that the alert is about +# BBSVCNUM - The numeric code for the service. From SVCCODES definition. +# BBHOSTSVC - HOSTNAME.SERVICE that the alert is about. +# BBHOSTSVCCOMMAS - As BBHOSTSVC, but dots in the hostname replaced with commas +# BBNUMERIC - A 22-digit number made by BBSVCNUM, MACHIP and ACKCODE. +# RECOVERED - Is "1" if the service has recovered. +# DOWNSECS - Number of seconds the service has been down. +# DOWNSECSMSG - When recovered, holds the text "Event duration : N" where +# N is the DOWNSECS value. -HOST=* SERVICE=disk - SCRIPT /home/xymon/server/bin/hobbit_notify.sh 1234567890 FORMAT=SMS REPEAT=10h COLOR=yellow - SCRIPT /home/xymon/server/bin/hobbit_notify.sh 1234567890 FORMAT=SMS REPEAT=1h COLOR=red +HOST=* SERVICE=func + SCRIPT /home/xymon/server/bin/hobbit_notify.sh dummy_notice FORMAT=plain DURATION>4h REPEAT=48h COLOR=red + +HOST=* SERVICE=* EXSERVICE=conn + SCRIPT /home/xymon/server/bin/hobbit_notify.sh dummy_notice FORMAT=plain DURATION>4h REPEAT=12h COLOR=red + SCRIPT /home/xymon/server/bin/login_notify.sh dummy_notice FORMAT=plain DURATION>5m REPEAT=5m COLOR=!purple RECOVERED + diff --git a/abs/core/xymon/analysis.cfg b/abs/core/xymon/analysis.cfg index 0de317b..460d157 100644 --- a/abs/core/xymon/analysis.cfg +++ b/abs/core/xymon/analysis.cfg @@ -317,7 +317,7 @@ # the alert module, which can then use it to control who gets an alert when # a failure occurs. E.g. the following associates the "httpd" process check # with the "web" group, and the "sshd" check with the "admins" group: -# PROC httpd 5 GROUP=web +# PROC httpd ?5 GROUP=web # PROC sshd 1 GROUP=admins # In the alerts.cfg file, you could then have rules like # GROUP=web @@ -348,81 +348,98 @@ HOST=_MASTERBACKEND_ - PROC sshd 1 - PROC lighttpd - PROC hobbitd - PROC crond - PROC mysql - PROC mythbackend - DISK * 95 99 - PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http - PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh + PROC sshd 1 + PROC lighttpd + PROC xymond + PROC crond + PROC mysql + PROC mythbackend + PROC msg_daemon.py + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 95 99 + PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http + PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh HOST=_MASTERFRONTEND_ - PROC mythfrontend - PROC sshd 1 - PROC lighttpd - PROC hobbitd - PROC crond - PROC mysql - PROC mythbackend - DISK * 95 99 - PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http - PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh - PORT "LOCAL=%([.:]5000)$" state=LISTEN TEXT=ghosd - PORT "LOCAL=%([.:]5001)$" state=LISTEN TEXT=ghosd + PROC mythfrontend 1 5 yellow + PROC sshd 1 + PROC lighttpd + PROC xymond + PROC crond + PROC mysql + PROC mythbackend + PROC msg_daemon.py + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 95 99 + PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http + PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh + HOST=_FRONTEND_ - PROC sshd 1 - PROC crond - PROC mythfrontend - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh - PORT "LOCAL=%([.:]5000)$" state=LISTEN TEXT=ghosd - PORT "LOCAL=%([.:]5001)$" state=LISTEN TEXT=ghosd + PROC sshd 1 + PROC crond + PROC mythfrontend 1 5 yellow + PROC msg_daemon.py + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh HOST=_SLAVEBACKEND_ - PROC sshd 1 - PROC crond - PROC mythbackend - DISK * 95 99 - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh + PROC sshd 1 + PROC crond + PROC mythbackend + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 95 99 + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh HOST=_SLAVEFRONTEND_ - PROC sshd 1 - PROC lighttpd - PROC hobbitd - PROC crond - PROC mythbackend - PROC mythfrontend - DISK * 95 99 - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh - PORT "LOCAL=%([.:]5000)$" state=LISTEN TEXT=ghosd - PORT "LOCAL=%([.:]5001)$" state=LISTEN TEXT=ghosd + PROC sshd 1 + PROC lighttpd + PROC hobbitd + PROC crond + PROC mythbackend + PROC mythfrontend 1 5 yellow + PROC msg_daemon.py + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 95 99 + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh + HOST=_STANDALONE_ - PROC sshd 1 - PROC lighttpd - PROC hobbitd - PROC crond - PROC mysql - PROC mythbackend - DISK * 95 99 - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh - PORT "LOCAL=%([.:]5000)$" state=LISTEN TEXT=ghosd - PORT "LOCAL=%([.:]5001)$" state=LISTEN TEXT=ghosd - PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http - PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi - PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh + PROC mythfrontend 1 5 yellow + PROC sshd 1 + PROC lighttpd + PROC xymond + PROC crond + PROC mysql + PROC mythbackend + PROC msg_daemon.py + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 95 99 + PORT "LOCAL=%([.:]80)$" state=LISTEN TEXT=http + PORT "LOCAL=%([.:]1337)$" state=LISTEN TEXT=cgi + PORT "LOCAL=%([.:]22)$" state=LISTEN TEXT=ssh DEFAULT - # These are the built-in defaults. - UP 1h - LOAD 5.0 10.0 - DISK * 99 100 - MEMPHYS 100 101 - MEMSWAP 50 80 - MEMACT 90 97 + # These are the built-in defaults. + UP 1h + LOAD 5.0 10.0 + DISK %^/cdrom.* IGNORE + DISK %^/mnt.* IGNORE + DISK %^/media.* IGNORE + DISK * 99 100 + MEMPHYS 100 101 + MEMSWAP 50 80 + MEMACT 90 97 diff --git a/abs/core/xymon/hbnotes.py b/abs/core/xymon/hbnotes.py index d643044..b5ad72a 100644 --- a/abs/core/xymon/hbnotes.py +++ b/abs/core/xymon/hbnotes.py @@ -28,7 +28,7 @@ def create_dot_file(): result = cursor.fetchall() frontonly="_FRONTEND_" masterbackend="_MASTERBACKEND_" - masterbacked_w_fe="_MASTERFE_" + masterbacked_w_fe="_MASTERFRONTEND_" slave_w_fe="_SLAVEFE_" slave="_SLAVEBACKEND_" stand_alone="_STANDALONE_" @@ -166,7 +166,8 @@ def create_dot_file(): # cmd="/usr/bin/circo -Tpng -o/data/srv/httpd/htdocs/xymon/gifs/network.png " + dotfilename results=os.popen(cmd,'r') - + return frontonly,masterbackend,masterbacked_w_fe,slave_w_fe,slave,stand_alone + @@ -458,68 +459,73 @@ function Do_it () file.write(string) -def main(argv): - create_dot_file() - create_notes() - +def create_hobbit_analysis(frontonly, + masterbackend, + masterbacked_w_fe, + slave_w_fe, + slave, + stand_alone): -#------------------------------write client-config------------------------------------------------ - - - #-------------------------------------------------- - #hobbitfile="/home/xymon/server/etc/hobbit-clients.cfg" - - ###WHY WAS THIS HERE?? - #hobbitfile="/home/xymon/server/etc/tasks.cfg" - #hobbitf=open(hobbitfile,'r') - #hobbitconfig=hobbitf.readlines() - #hobbitf.close() - #hobbitf=open(hobbitfile,'w') - #print "FE",frontonly - #print "MBE",masterbackend - #print "MBEwFW",masterbacked_w_fe - #print "SLAVEwFW",slave_w_fe - #print "SLAVE",slave - #print "STD",stand_alone - - #for line in hobbitconfig: - #if line.startswith("HOST"): - #cline=line.split("=") - #if cline[1].startswith("_FRONTEND_"): - #pline="HOST=" - #pline+=frontonly.strip() - #hobbitf.write(pline + "\n") - #elif cline[1].startswith("_MASTERBACKEND_"): - #pline="HOST=" - #pline+=masterbackend.strip() - ##print pline - #hobbitf.write(pline+ "\n") - #elif cline[1].startswith("_MASTERFRONTEND_"): - #pline="HOST=" - #pline+=masterbacked_w_fe.strip() - ##print pline - #hobbitf.write(pline+ "\n") - #elif cline[1].startswith("_SLAVEBACKEND_"): - #pline="HOST=" - #pline+=slave.strip() - ##print pline - #hobbitf.write(pline+ "\n") - #elif cline[1].startswith("_SLAVEFE_"): - #pline="HOST=" - #pline+=slave_w_fe.strip() - ##print pline - #hobbitf.write(pline+ "\n") - #else: - ##print line - #hobbitf.write(line) - #else: - ##print line - #hobbitf.write(line) - -#-----------------------------------------------------------END CLIENT CONFIG - - # execute SQL statement + hobbitfile="/home/xymon/server/etc/analysis.cfg" + hobbitf=open(hobbitfile,'r') + hobbitconfig=hobbitf.readlines() + hobbitf.close() + try: + hobbitf=open(hobbitfile,'w') + print "FE",frontonly + print "MBE",masterbackend + print "MBEwFW",masterbacked_w_fe + print "SLAVEwFW",slave_w_fe + print "SLAVE",slave + print "STD",stand_alone + + for line in hobbitconfig: + if line.startswith("HOST"): + cline=line.split("=") + if cline[1].startswith("_FRONTEND_"): + pline="HOST=" + pline+=frontonly.strip() + hobbitf.write(pline + "\n") + elif cline[1].startswith("_MASTERBACKEND_"): + pline="HOST=" + pline+=masterbackend.strip() + #print pline + hobbitf.write(pline+ "\n") + elif cline[1].startswith("_MASTERFRONTEND_"): + pline="HOST=" + pline+=masterbacked_w_fe.strip() + #print pline + hobbitf.write(pline+ "\n") + elif cline[1].startswith("_SLAVEBACKEND_"): + pline="HOST=" + pline+=slave.strip() + #print pline + hobbitf.write(pline+ "\n") + elif cline[1].startswith("_SLAVEFE_"): + pline="HOST=" + pline+=slave_w_fe.strip() + #print pline + hobbitf.write(pline+ "\n") + else: + #print line + hobbitf.write(line) + else: + #print line + hobbitf.write(line) + hobbitf.close() + except: + print "problem writing analysis.cfg" +def main(argv): + frontonly,masterbackend,masterbacked_w_fe,slave_w_fe,slave,stand_alone = create_dot_file() + create_notes() + create_hobbit_analysis(frontonly, + masterbackend, + masterbacked_w_fe, + slave_w_fe, + slave, + stand_alone) + if __name__ == "__main__": main(sys.argv[1:]) diff --git a/abs/core/xymon/hobbit_myth_data.py b/abs/core/xymon/hobbit_myth_data.py index 8b38fc6..ac56903 100644..100755 --- a/abs/core/xymon/hobbit_myth_data.py +++ b/abs/core/xymon/hobbit_myth_data.py @@ -10,6 +10,12 @@ import sys,os from MythTV import MythBE,MythDB,MythLog +#0=green +#1=yellow +#2=red + + + BBLINE = '' BBCOLOR="green" DATE = time.strftime("%a %b %d %H:%M:%S %Z %Y", time.localtime(time.time())) @@ -25,10 +31,35 @@ if os.environ['MACHINE']: #print os.environ['MACHINE'] MACHINE=os.environ['MACHINE'] +#MACHINE='a' +#BB='b' +#BBDISP='12' + + +def set_color_code (current_color, new_color): + if new_color > current_color: + color = new_color + else: + color = current_color + return color + +def set_color(color_code): + color = "unknown" + if color_code == 0 : + color = "green" + elif color_code == 1 : + color = "yellow" + elif color_code == 2 : + color = "red" + + return color + + def check_mtc(mtc_file): + line='' try: infile = open(mtc_file, 'r') except(IOError), e: @@ -60,56 +91,74 @@ def find_data_left(): results=cursor.fetchall()[0][0] days_left = (results - today).days except: - days_left = "Undetermined " + days_left = "Undetermined" return days_left now = datetime.datetime.now() -date = "%s-%s-%s" %(now.year, now.month, now.day) +#date = "%s-%s-%s" %(now.year, now.month, now.day) +date = (now.strftime('%Y-%m-%d')) +#2013-12-03 mtc_file = "/var/log/%s/myth_mtc.log" %date mtc=check_mtc(mtc_file) num_days=find_data_left() - +current_color=0 if mtc: - BBCOLOR="green" - msg="\n Maintenance script ran ok \n %s \n " %mtc_file + current_color = set_color_code(current_color,0) + msg="\n Maintenance script was successful \n Log file: %s\n " %mtc_file else: - BBCOLOR ="yellow" - msg="\n * Maintenance script didn't run. \n %s \n" %mtc_file + current_color = set_color_code(current_color,2) + msg=''' + ** Maintenance script did not run. ** + BACKUP FILE WAS NOT CREATED + + The system may have been busy + Log file: %s \n''' %mtc_file if num_days == 1 : - BBCOLOR="yellow" - msg+="\n * Only 1 day of guide data left" + current_color = set_color_code(current_color,1) + msg+="\n ** Only 1 day of guide data left **" elif num_days == 0 : - BBCOLOR="red " - msg+="\n * No guide data available" + current_color = set_color_code(current_color,2) + msg+="\n ** No guide data available **" elif num_days == -100 : - BBCOLOR="red" - msg+="\n ** Could not connect to database!" + current_color = set_color_code(current_color,2) + msg+="\n ** Could not connect to database ** " + +elif num_days == "Undetermined" : + current_color = set_color_code(current_color,1) + msg+="\n ** Could not determine how many days of guide data are available ** " + else: data_check = True - BBCOLOR="green" + current_color = set_color_code(current_color,0) msg+="\n %s days of guide data" %(num_days) if os.path.isfile("/data/storage/disk0/backup/system_backups/remote_backup_failed.txt"): - if BBCOLOR == "green": - BBCOLOR="yellow" - msg+="\n\n * Remote backup jobs are queued" + current_color = set_color_code(current_color,1) + msg+="\n\n ** Remote backup jobs are queued **" else: msg+="\n\n No remote backup jobs queued" -BBLINE=msg +BBLINE = msg +BBCOLOR = set_color(current_color) + LINE = "status " + MACHINE + ".myth_mtc" + " " + BBCOLOR + " " + DATE + " " + BBLINE cmd = BB + ' ' + BBDISP + ' "' + LINE + '"' os.system(cmd) +#print cmd +#print BBLINE +#print BBCOLOR + + sys.exit(0) diff --git a/abs/core/xymon/hobbit_notify.sh b/abs/core/xymon/hobbit_notify.sh index 7569e2a..26b789f 100644 --- a/abs/core/xymon/hobbit_notify.sh +++ b/abs/core/xymon/hobbit_notify.sh @@ -1,4 +1,5 @@ #!/bin/bash +. /etc/systemconfig # # BBCOLORLEVEL - The color of the alert: "red", "yellow" or "purple" # BBALPHAMSG - The full text of the status log triggering the alert @@ -14,35 +15,65 @@ # RECOVERED - Is "1" if the service has recovered. # DOWNSECS - Number of seconds the service has been down. # DOWNSECSMSG - When recovered, holds the text "Event duration : N" where -echo $BBCOLORLEVEL > /tmp/hobbitout -echo $BBALPHAMSG >>/tmp/hobbitout -echo $RCPT >>/tmp/hobbitout -echo $BBHOSTNAME >>/tmp/hobbitout -echo $BBSVCNAME >>/tmp/hobbitout -echo $BBHOSTSVC >>/tmp/hobbitout + + +# echo $BBCOLORLEVEL > /tmp/hobbitout +# echo $BBALPHAMSG >>/tmp/hobbitout +# echo $RCPT >>/tmp/hobbitout +# echo $BBHOSTNAME >>/tmp/hobbitout +# echo $BBSVCNAME >>/tmp/hobbitout +# echo $BBHOSTSVC >>/tmp/hobbitout #BBCOLORLEVEL=red #BBCOLORLEVEL=yellow #BBALPHAMSG="vmtest:disk red [751147]" -#BBHOSTNAME="vmtest" +#BBHOSTNAME="testcraa" #BBSVCNAME="disk" +#BBSVCNAME="func" #BBHOSTSVC="vmtest.disk" -if [ x$BBSVCNAME = xdisk ] -then - case $BBCOLORLEVEL in - red ) - /usr/bin/notify.py ALT "$BBHOSTNAME disk is full" - ;; - yellow ) +#/usr/LH/bin/msg_client.py --msg "$BBCOLORLEVEL\n$BBHOSTSVC" +#/usr/bin/func "*" call msg display + +function msg_func_out() { + /usr/bin/func "*" call msg display "${1}" +} + +function msg_local_out() { + + /usr/LH/bin/msg_client.py --msg "${1}" + + } + - /usr/bin/notify.py PHN "$BBHOSTNAME disk almost full " - ;; - esac -fi +case x$BBSVCNAME in + xdisk) + case $BBCOLORLEVEL in + red ) + msg_func_out "$BBHOSTNAME disk is at 95% full or greater|alert" + ;; + yellow ) + msg_func_out "$BBHOSTNAME disk is almost full" + ;; + esac + ;; + + xfunc) + if [ "x$hostname" = "x$BBHOSTNAME" ] + then + msg_local_out "System can not communicate with itself (func) |alert" + else + msg_func_out "$hostname can not communicate with $BBHOSTNAME (func)|alert" + fi + ;; + *) + #catch all for everything else + msg_func_out "Condition $BBCOLORLEVEL $BBSVCNAME on $BBHOSTNAME\nSee the system health webpage.|alert" + ;; +esac diff --git a/abs/core/xymon/login_notify.sh b/abs/core/xymon/login_notify.sh new file mode 100644 index 0000000..8c17342 --- /dev/null +++ b/abs/core/xymon/login_notify.sh @@ -0,0 +1,64 @@ +#!/bin/bash +. /etc/systemconfig +# +# BBCOLORLEVEL - The color of the alert: "red", "yellow" or "purple" +# BBALPHAMSG - The full text of the status log triggering the alert +# ACKCODE - The "cookie" that can be used to acknowledge the alert +# RCPT - The recipient, from the SCRIPT entry +# BBHOSTNAME - The name of the host that the alert is about +# MACHIP - The IP-address of the host that has a problem +# BBSVCNAME - The name of the service that the alert is about +# BBSVCNUM - The numeric code for the service. From SVCCODES definition. +# BBHOSTSVC - HOSTNAME.SERVICE that the alert is about. +# BBHOSTSVCCOMMAS - As BBHOSTSVC, but dots in the hostname replaced with commas +# BBNUMERIC - A 22-digit number made by BBSVCNUM, MACHIP and ACKCODE. +# RECOVERED - Is "1" if the service has recovered. +# DOWNSECS - Number of seconds the service has been down. +# DOWNSECSMSG - When recovered, holds the text "Event duration : N" where + +# LOGIN_OUT=/tmp/login_out +# echo $BBCOLORLEVEL >> $LOGIN_OUT +# echo $BBALPHAMSG >>$LOGIN_OUT +# echo $RCPT >>$LOGIN_OUT +# echo $BBHOSTNAME >>$LOGIN_OUT +# echo $BBSVCNAME >>$LOGIN_OUT +# echo $BBHOSTSVC >>$LOGIN_OUT +# echo $BBHOME >> $LOGIN_OUT +# echo $DOWNSECS >> $LOGIN_OUT +# echo $RECOVERED >> $LOGIN_OUT +# echo "----------" >> $LOGIN_OUT + +#BBCOLORLEVEL=red +#BBCOLORLEVEL=yellow +#BBALPHAMSG="vmtest:disk red [751147]" +#BBHOSTNAME="testcraa" +#BBSVCNAME="disk" +#BBSVCNAME="func" +#BBHOSTSVC="vmtest.disk" + +#bbhome ends up as /home/xymon/server which is why I didn't use it here +NOTICE_DIR="/home/xymon/var/login_alerts" +if [ ! -d $NOTICE_DIR ] +then + mkdir $NOTICE_DIR +fi + +if [ "x$RECOVERED" == "x1" ] +then + if [ -f $NOTICE_DIR/$BBHOSTSVC ] + then + rm -f $NOTICE_DIR/$BBHOSTSVC + else + echo "$NOTICE_DIR/$BBHOSTSVC is not present, didn't remove it" + fi +else + echo "DOWN: $DOWNSECS" > $NOTICE_DIR/$BBHOSTSVC + echo "SERVICE: $BBSVCNAME" >> $NOTICE_DIR/$BBHOSTSVC + echo "HOST: $BBHOSTNAME" >> $NOTICE_DIR/$BBHOSTSVC + echo "ACKCODE: $ACKCODE" >> $NOTICE_DIR/$BBHOSTSVC + echo "COLOR: $BBCOLORLEVEL" >> $NOTICE_DIR/$BBHOSTSVC + echo "MSG $BBALPHAMSG" >> $NOTICE_DIR/$BBHOSTSVC +fi + + + diff --git a/abs/extra/apcupsd/PKGBUILD b/abs/extra/apcupsd/PKGBUILD new file mode 100644 index 0000000..31a3cfa --- /dev/null +++ b/abs/extra/apcupsd/PKGBUILD @@ -0,0 +1,47 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> +# Maintainer: Todd Musall <tmusall@comcast.net> +# Maintainer: Massimiliano Torromeo <massimiliano.torromeo@gmail.com> + +pkgname=apcupsd +pkgver=3.14.10 +pkgrel=7 +pkgdesc="Power mangement and controlling most of APC's UPS models" +arch=(i686 x86_64) +url="http://www.apcupsd.org" +license=('GPL') +install=apcupsd.install +depends=('gcc-libs') +optdepends=('gd: for CGI' + 'gconf: for frontend' + 'gtk2: for frontend') +makedepends=('pkgconfig' 'gd' 'gconf' 'gtk2') +backup=(etc/apcupsd/apcupsd.conf etc/apcupsd/hosts.conf + etc/apcupsd/multimon.conf) +source=(http://downloads.sourceforge.net/apcupsd/$pkgname-$pkgver.tar.gz + apcupsd.service + apcupsd-tmpfiles.conf) +sha256sums=('0707b5ec9916fbde9e44eb8d18037c8d8f75dfd6aeef51aba5487e189eef2032' + '145e88863335f077fc354b4d263b15f64af67b45a10ed37c68ebd468181e23f7' + 'b00cd1a31de70a172698d486583aa79113b99c1bb4b882ab906d0e37504d7f55') + +build() { + cd "$srcdir/$pkgname-$pkgver" + ./configure --prefix=/usr --libexecdir=/usr/lib/$pkgname \ + --sbindir=/usr/bin \ + --enable-cgi --enable-usb --enable-net \ + --with-upstype=usb --with-upscable=usb \ + --with-serial-dev=/dev/usb/hid/hiddev[0-9] \ + --enable-pthreads --enable-gapcmon + make +} + +package() { + cd "$srcdir/$pkgname-$pkgver" + make DESTDIR="$pkgdir" install + install -Dm644 "$srcdir/apcupsd.service" "$pkgdir/usr/lib/systemd/system/apcupsd.service" + install -Dm644 "$srcdir/apcupsd-tmpfiles.conf" "$pkgdir/usr/lib/tmpfiles.d/apcupsd.conf" + chmod 755 "$pkgdir"/usr/bin/* + install -dm755 "$pkgdir/usr/lib/$pkgname/cgi-bin" + mv "$pkgdir"/etc/apcupsd/*.cgi "$pkgdir/usr/lib/$pkgname/cgi-bin" +} diff --git a/abs/extra/apcupsd/__changelog b/abs/extra/apcupsd/__changelog new file mode 100644 index 0000000..3c43f29 --- /dev/null +++ b/abs/extra/apcupsd/__changelog @@ -0,0 +1,3 @@ +remove systemd-sysvcompat as dep +add apcupsd.install to have runit start the service + diff --git a/abs/extra/apcupsd/apcupsd-tmpfiles.conf b/abs/extra/apcupsd/apcupsd-tmpfiles.conf new file mode 100644 index 0000000..0ceb410 --- /dev/null +++ b/abs/extra/apcupsd/apcupsd-tmpfiles.conf @@ -0,0 +1,2 @@ +r /etc/apcupsd/powerfail +r /etc/nologin
\ No newline at end of file diff --git a/abs/core/mplayer-wrapper/mplayer-wrapper.install b/abs/extra/apcupsd/apcupsd.install index 18f1b75..3f1e6b2 100644 --- a/abs/core/mplayer-wrapper/mplayer-wrapper.install +++ b/abs/extra/apcupsd/apcupsd.install @@ -2,35 +2,21 @@ # remove any functions you don't need (and this header). # arg 1: the new package version -pre_install() { -/bin/true -} - -# arg 1: the new package version post_install() { -/bin/true -} - -# arg 1: the new package version -# arg 2: the old package version -pre_upgrade() { - /bin/true + add_service.sh apcupsd + /sbin/sv start apcupsd } # arg 1: the new package version # arg 2: the old package version post_upgrade() { - /bin/true -} - -# arg 1: the old package version -pre_remove() { - /bin/true + post_install } # arg 1: the old package version post_remove() { - /bin/true + /sbin/sv stop apcupsd + remove_service.sh apcupsd } op=$1 diff --git a/abs/extra/apcupsd/apcupsd.service b/abs/extra/apcupsd/apcupsd.service new file mode 100644 index 0000000..b8dfb9b --- /dev/null +++ b/abs/extra/apcupsd/apcupsd.service @@ -0,0 +1,8 @@ +[Unit] +Description=APC UPS Monitor + +[Service] +ExecStart=/usr/bin/apcupsd -b + +[Install] +WantedBy=multi-user.target diff --git a/abs/extra/google-chrome/PKGBUILD b/abs/extra/google-chrome/PKGBUILD index 085418c..9127569 100644 --- a/abs/extra/google-chrome/PKGBUILD +++ b/abs/extra/google-chrome/PKGBUILD @@ -5,13 +5,13 @@ # or use: $ curl -s https://dl.google.com/linux/chrome/rpm/stable/x86_64/repodata/other.xml.gz | gzip -df | awk -F\" '/pkgid/{ sub(".*-","",$4); print $4": "$10 }' pkgname=google-chrome -pkgver=30.0.1599.101 +pkgver=31.0.1650.63 pkgrel=1 pkgdesc="An attempt at creating a safer, faster, and more stable browser (Stable Channel)" arch=('i686' 'x86_64') url="https://www.google.com/chrome" license=('custom:chrome') -depends=('alsa-lib' 'gconf' 'gtk2' 'hicolor-icon-theme' 'libpng' 'libxslt' 'libxss' 'nss' 'ttf-font' 'xdg-utils') +depends=('alsa-lib' 'gconf' 'gtk2' 'hicolor-icon-theme' 'libpng' 'libxslt' 'libxss' 'libxtst' 'nss' 'ttf-font' 'xdg-utils') optdepends=('kdebase-kdialog: needed for file dialogs in KDE' 'ttf-google-fonts-git') provides=("google-chrome=$pkgver") @@ -23,10 +23,8 @@ _channel=stable _arch=i386 [ "$CARCH" = 'x86_64' ] && _arch=amd64 source=("google-chrome-${_channel}_${pkgver}_${_arch}.deb::https://dl.google.com/linux/direct/google-chrome-${_channel}_current_${_arch}.deb" - "$url/intl/en/eula_text.html") -md5sums=('fa5d706a9f7ef0682de6b665c20f302f' - '6d57da7476a4b1b7a81821d9c036425c') -[ "$CARCH" = 'x86_64' ] && md5sums[0]='9abdef7ee0422f7dabb16941453551cc' + 'https://www.google.com/intl/en/chrome/browser/privacy/eula_text.html') +[ "$CARCH" = 'x86_64' ] && md5sums[0]='83c6ddb1c281da8243aba0b5f2e3763f' #PKGEXT='.pkg.tar' @@ -55,4 +53,9 @@ package() { msg2 "Removing the Debian-intended cron job and duplicated images" rm -r "$pkgdir"/etc/cron.daily/ "$pkgdir"/opt/google/chrome/cron/ rm "$pkgdir"/opt/google/chrome/product_logo_*.png + + msg2 "Rename google-chrome-stable to google-chrome" + mv "$pkgdir"/usr/bin/google-chrome-stable "$pkgdir"/usr/bin/google-chrome } +md5sums=('83c6ddb1c281da8243aba0b5f2e3763f' + '6d57da7476a4b1b7a81821d9c036425c') diff --git a/abs/extra/google-chrome/__changelog b/abs/extra/google-chrome/__changelog index 20fbc77..c280aef 100644 --- a/abs/extra/google-chrome/__changelog +++ b/abs/extra/google-chrome/__changelog @@ -3,3 +3,4 @@ Pull from ARU: https://aur.archlinux.org/packages/google-chrome/ - PKGBUILD: comment out PKGEXT so we compress the pkg - PKGBUILD: add replaces chromium - google-chrome.install: add symlink from /usr/bin/chromium to google-chrome so as not to break pkgs that use chromium +- Rename google-chrome-stable to google-chrome" diff --git a/abs/extra/gst-plugins-base/PKGBUILD b/abs/extra/gst-plugins-base/PKGBUILD new file mode 100644 index 0000000..7fa8418 --- /dev/null +++ b/abs/extra/gst-plugins-base/PKGBUILD @@ -0,0 +1,54 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgbase=gst-plugins-base +pkgname=('gst-plugins-base-libs' 'gst-plugins-base') +pkgver=1.2.1 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework Base Plugins" +arch=('i686' 'x86_64') +license=('LGPL') +makedepends=('pkgconfig' 'gstreamer' 'orc' 'libxv' 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango' 'gobject-introspection') +options=(!emptydirs) +url="http://gstreamer.freedesktop.org/" +source=(${url}/src/$pkgbase/$pkgbase-${pkgver}.tar.xz) +sha256sums=('de2444a5c150d4e4b680364d7c0414cd8b015d95b305ff65d65a17683379532f') + +build() { + cd $pkgbase-$pkgver + + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \ + --disable-static --enable-experimental \ + --with-package-name="GStreamer Base Plugins (Arch Linux)" \ + --with-package-origin="http://www.archlinux.org/" + + # https://bugzilla.gnome.org/show_bug.cgi?id=655517 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make + + sed -e 's/^SUBDIRS_EXT =.*/SUBDIRS_EXT =/' -i Makefile +} + +check() { + cd $pkgbase-$pkgver + # Testsuite fails on one test. Some refcount leak + make check +} + +package_gst-plugins-base-libs() { + pkgdesc="GStreamer Multimedia Framework Base Plugin libraries" + depends=('gstreamer' 'orc' 'libxv') + + cd $pkgbase-$pkgver + make DESTDIR="${pkgdir}" install +} + +package_gst-plugins-base() { + depends=("gst-plugins-base-libs=$pkgver" 'alsa-lib' 'cdparanoia' 'libvisual' 'libvorbis' 'libtheora' 'pango') + + cd $pkgbase-$pkgver + make -C gst-libs DESTDIR="${pkgdir}" install + make -C ext DESTDIR="${pkgdir}" install + make -C gst-libs DESTDIR="${pkgdir}" uninstall +} diff --git a/abs/extra/gstreamer/PKGBUILD b/abs/extra/gstreamer/PKGBUILD new file mode 100644 index 0000000..789950b --- /dev/null +++ b/abs/extra/gstreamer/PKGBUILD @@ -0,0 +1,38 @@ +# $Id$ +# Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=gstreamer +pkgver=1.2.1 +pkgrel=1 +pkgdesc="GStreamer Multimedia Framework" +arch=('i686' 'x86_64') +license=('LGPL') +url="http://gstreamer.freedesktop.org/" +depends=('libxml2' 'glib2') +optdepends=('sh: feedback script') +makedepends=('intltool' 'pkgconfig' 'gtk-doc' 'gobject-introspection') +source=(${url}/src/gstreamer/gstreamer-${pkgver}.tar.xz) +sha256sums=('a4523d2471bca6cd0059a32e3b042f50faa4dadc6439852af8b43ca3f17d1fc9') + +build() { + cd "${srcdir}/gstreamer-${pkgver}" + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libexecdir=/usr/lib \ + --with-package-name="GStreamer (Arch Linux)" \ + --with-package-origin="http://www.archlinux.org/" \ + --enable-gtk-doc --disable-static + + # https://bugzilla.gnome.org/show_bug.cgi?id=655517 + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool + + make +} + +check() { + cd "${srcdir}/gstreamer-${pkgver}" + make check +} + +package() { + cd "${srcdir}/gstreamer-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/abs/extra/handbrake/PKGBUILD b/abs/extra/handbrake/PKGBUILD index b70180a..e2b4833 100644 --- a/abs/extra/handbrake/PKGBUILD +++ b/abs/extra/handbrake/PKGBUILD @@ -1,34 +1,65 @@ -# $Id: PKGBUILD 74053 2012-07-18 17:33:26Z foutrelis $ +# $Id$ # Maintainer: Evangelos Foutras <evangelos@foutrelis.com> # Contributor: Giovanni Scafora <giovanni@archlinux.org> # Contributor: Sebastien Piccand <sebcactus gmail com> pkgname=('handbrake' 'handbrake-cli') -pkgver=0.9.8 -pkgrel=1 +pkgver=0.9.9 +pkgrel=5 arch=('i686' 'x86_64') url="http://handbrake.fr/" license=('GPL') makedepends=('intltool' 'python2' 'yasm' 'wget' 'bzip2' 'gcc-libs' 'libnotify' - 'gstreamer0.10-base' 'gtk2' 'dbus-glib' 'fribidi') + 'gst-plugins-base' 'gtk3' 'dbus-glib' 'fribidi' 'libass' + 'fontconfig' 'freetype2' 'libxml2' 'libogg' 'libvorbis' + 'libtheora' 'libsamplerate' 'libbluray' 'x264') source=(http://downloads.sourceforge.net/project/handbrake/$pkgver/HandBrake-$pkgver.tar.bz2) -sha256sums=('dba75a9ff772e419c01d75532c1bf0d7253e73d7ead184eee755cd4c133dc798') +sha256sums=('a71dd774104cda00cfb51a813550351d638253791f2f419d04a66f3158a835b3') -build() { +prepare() { cd "$srcdir/HandBrake-$pkgver" # Use Python 2 sed -i 's/python /python2 /' gtk/src/Makefile.am - ./configure --prefix=/usr --force --disable-gtk-update-checks + # Use more system libs + # We had ffmpeg here as well but it broke PGS subtitle processing + # https://forum.handbrake.fr/viewtopic.php?f=13&t=27581 + sed -i \ + -e '/MODULES += contrib\/libbluray/d' \ + -e '/MODULES += contrib\/x264/d' \ + make/include/main.defs + + # Fix configure.ac to work with automake 1.13 + cd gtk + sed -i \ + -e 's/AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' \ + -e '/AM_PROG_CC_STDC/d' \ + -e 's/$pkg_gudev"/gmodule-2.0 $pkg_gudev"/' \ + configure.ac + + autoreconf -vi +} + +build() { + cd "$srcdir/HandBrake-$pkgver" + + ./configure \ + --prefix=/usr \ + --force \ + --disable-gtk-update-checks cd build make } package_handbrake() { pkgdesc="Multithreaded video transcoder" - depends=('bzip2' 'gcc-libs' 'gstreamer0.10-base' 'libnotify' 'dbus-glib' - 'fribidi' 'gtk2' 'desktop-file-utils' 'hicolor-icon-theme') + depends=('bzip2' 'gcc-libs' 'gst-plugins-base' 'libnotify' 'dbus-glib' + 'fribidi' 'libass' 'gtk3' 'fontconfig' 'freetype2' 'libxml2' + 'libogg' 'libvorbis' 'libtheora' 'libsamplerate' 'libbluray' + 'x264' 'desktop-file-utils' 'hicolor-icon-theme') + optdepends=('gst-plugins-good: for video previews' + 'gst-libav: for video previews') install=$pkgname.install cd "$srcdir/HandBrake-$pkgver/build" @@ -39,7 +70,8 @@ package_handbrake() { package_handbrake-cli() { pkgdesc="Multithreaded video transcoder (CLI)" - depends=('bzip2' 'gcc-libs' 'zlib' 'fribidi') + depends=('bzip2' 'gcc-libs' 'zlib' 'fribidi' 'libass' 'libxml2' 'libtheora' + 'libsamplerate' 'libbluray' 'x264') cd "$srcdir/HandBrake-$pkgver/build" install -D HandBrakeCLI "$pkgdir/usr/bin/HandBrakeCLI" diff --git a/abs/extra/i2c-tools/PKGBUILD b/abs/extra/i2c-tools/PKGBUILD new file mode 100644 index 0000000..448c745 --- /dev/null +++ b/abs/extra/i2c-tools/PKGBUILD @@ -0,0 +1,34 @@ +# $Id: PKGBUILD 92028 2013-05-30 23:36:57Z seblu $ +# Maintainer: Timothy Redaelli <timothy.redaelli@gmail.com> +# Contributor: DonVla <donvla@users.sourceforge.net> + +pkgname=i2c-tools +pkgver=3.1.0 +pkgrel=5 +pkgdesc="Heterogeneous set of I2C tools for Linux that used to be part of lm-sensors" +arch=('i686' 'x86_64') +url="http://www.lm-sensors.org/wiki/I2CTools" +license=('GPL') +depends=('python2') +optdepends=('read-edid: for decode-edid script') +source=(http://dl.lm-sensors.org/${pkgname}/releases/${pkgname}-${pkgver}.tar.bz2) +md5sums=('f15019e559e378c6e9d5d6299a00df21') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + make + make -C eepromer CFLAGS="$CFLAGS -I../include" + cd py-smbus + CPPFLAGS="$CPPFLAGS -I../include" python2 setup.py build +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make prefix="${pkgdir}/usr" sbindir="$pkgdir/usr/bin" install + install -Dm755 eepromer/eeprog eepromer/eeprom eepromer/eepromer "${pkgdir}/usr/bin" + cd py-smbus + python2 setup.py install --prefix "${pkgdir}/usr" + rm -rf "${pkgdir}/usr/include" +} + +# vim:set ts=2 sw=2 et: diff --git a/abs/extra/libmms/PKGBUILD b/abs/extra/libmms/PKGBUILD new file mode 100644 index 0000000..fd9ab3e --- /dev/null +++ b/abs/extra/libmms/PKGBUILD @@ -0,0 +1,25 @@ +#$Id: PKGBUILD 134220 2011-08-02 15:22:22Z jgc $ +#Maintainer: Jan de Groot <jgc@archlinux.org> + +pkgname=libmms +pkgver=0.6.2 +pkgrel=1 +pkgdesc="MMS stream protocol library" +arch=(i686 x86_64) +url="http://sourceforge.net/projects/libmms/" +license=(LGPL) +depends=('glib2') +options=('!libtool') +source=(http://download.sourceforge.net/libmms/${pkgname}-${pkgver}.tar.gz) +md5sums=('9f63aa363deb4874e072a45850161bff') + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure --prefix=/usr --disable-static + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install +} diff --git a/abs/extra/mpd/PKGBUILD b/abs/extra/mpd/PKGBUILD new file mode 100644 index 0000000..4f36986 --- /dev/null +++ b/abs/extra/mpd/PKGBUILD @@ -0,0 +1,51 @@ +# $Id: PKGBUILD 182602 2013-04-10 23:39:58Z bisson $ +# Maintainer: Gaetan Bisson <bisson@archlinux.org> +# Contributor: Angel Velasquez <angvp@archlinux.org> +# Contributor: Andrea Scarpino <andrea@archlinux.org> +# Contributor: Damir Perisa <damir.perisa@bluewin.ch> +# Contributor: Ben <ben@benmazer.net> + +pkgname=mpd +pkgver=0.17.4 +pkgrel=1 +pkgdesc='Flexible, powerful, server-side application for playing music' +url='http://www.musicpd.org/' +license=('GPL') +arch=('i686' 'x86_64') +depends=('libao' 'ffmpeg' 'libmodplug' 'audiofile' 'libshout' 'libmad' 'curl' 'faad2' + 'sqlite' 'libmms' 'wavpack' 'avahi' 'libid3tag' 'yajl' 'libsoup') +makedepends=('doxygen') +source=("http://www.musicpd.org/download/${pkgname}/${pkgver%.*}/${pkgname}-${pkgver}.tar.xz" + 'tmpfiles.d') +sha1sums=('f60b54e368fe74fde2fd4571227b0428fe0ae3cb' + 'f4d5922abb69abb739542d8e93f4dfd748acdad7') + +backup=('etc/mpd.conf') +install=install + +build() { + cd "${srcdir}/${pkgname}-${pkgver}" + ./configure \ + --prefix=/usr \ + --sysconfdir=/etc \ + --enable-lastfm \ + --enable-soundcloud \ + --disable-sidplay \ + --with-systemdsystemunitdir=/usr/lib/systemd/system + make +} + +package() { + cd "${srcdir}/${pkgname}-${pkgver}" + make DESTDIR="${pkgdir}" install + install -d -g 45 -o 45 "${pkgdir}"/var/lib/mpd/playlists + install -Dm644 doc/mpdconf.example "${pkgdir}"/etc/mpd.conf + install -Dm644 ../tmpfiles.d "${pkgdir}"/usr/lib/tmpfiles.d/mpd.conf + sed \ + -e '/^#playlist_directory/c playlist_directory "/var/lib/mpd/playlists"' \ + -e '/^#db_file/c db_file "/var/lib/mpd/mpd.db"' \ + -e '/^#pid_file/c pid_file "/run/mpd/mpd.pid"' \ + -e '/^#state_file/c state_file "/var/lib/mpd/mpdstate"' \ + -e '/^#user/c user "mpd"' \ + -i "${pkgdir}"/etc/mpd.conf +} diff --git a/abs/extra/mpd/install b/abs/extra/mpd/install new file mode 100644 index 0000000..12742b9 --- /dev/null +++ b/abs/extra/mpd/install @@ -0,0 +1,11 @@ +post_install() { + getent group mpd &>/dev/null || groupadd -r -g 45 mpd >/dev/null + getent passwd mpd &>/dev/null || useradd -r -u 45 -g mpd -d /var/lib/mpd -s /bin/false -G audio mpd >/dev/null + usr/bin/systemd-tmpfiles --create mpd.conf || true +} + +post_remove() { + getent passwd mpd &>/dev/null && userdel mpd >/dev/null + getent group mpd &>/dev/null && groupdel mpd >/dev/null + true +} diff --git a/abs/extra/mpd/tmpfiles.d b/abs/extra/mpd/tmpfiles.d new file mode 100644 index 0000000..41c4e74 --- /dev/null +++ b/abs/extra/mpd/tmpfiles.d @@ -0,0 +1 @@ +d /run/mpd 0755 mpd mpd diff --git a/abs/extra/mythexpress/PKGBUILD b/abs/extra/mythexpress/PKGBUILD index 37a9dfb..51e5c32 100755 --- a/abs/extra/mythexpress/PKGBUILD +++ b/abs/extra/mythexpress/PKGBUILD @@ -1,6 +1,6 @@ pkgname=mythexpress -pkgver=20121210 -pkgrel=2 +pkgver=20131218 +pkgrel=1 pkgdesc="MythExpress is a browser-based interface to MythTV HTTP streaming capability" arch=('i686' 'x86_64') url="https://github.com/MythTV-Clients/MythExpress" diff --git a/abs/extra/remyth/PKGBUILD b/abs/extra/remyth/PKGBUILD index 7243a12..bc838fc 100755 --- a/abs/extra/remyth/PKGBUILD +++ b/abs/extra/remyth/PKGBUILD @@ -1,6 +1,6 @@ pkgname=remyth -pkgver=20121210 -pkgrel=3 +pkgver=20131218 +pkgrel=1 pkgdesc="This project is meant to provide a nicer remote for your MythTV Frontends. " arch=('i686' 'x86_64') url="https://github.com/SchraderMJ11/ReMyth" diff --git a/abs/extra/xbmc-pvr-addons/PKGBUILD b/abs/extra/xbmc-pvr-addons/PKGBUILD new file mode 100644 index 0000000..936ef39 --- /dev/null +++ b/abs/extra/xbmc-pvr-addons/PKGBUILD @@ -0,0 +1,30 @@ +# $Id$ +# Maintainer: Sergej Pupykin <pupykin.s+arch@gmail.com> + +pkgname=xbmc-pvr-addons +pkgver=20131106git +pkgrel=1 +pkgdesc="XBMC PVR add-ons for current stable xbmc" +arch=('i686' 'x86_64') +url="https://github.com/opdenkamp/xbmc-pvr-addons" +license=('GPL3') +depends=('xbmc' 'libmysqlclient') +makedepends=('git' 'libmysqlclient' 'boost') +optdepends=('tvheadend-git: tvheadend backend' 'mythtv: mythtv backend') +conflicts=('xbmc-pvr-addons-git') +#source=("$pkgname-$pkgver.tar.gz::https://github.com/opdenkamp/xbmc-pvr-addons/archive/${pkgver/_/-}.tar.gz") +#source=("git://github.com/opdenkamp/xbmc-pvr-addons.git") +source=("git://github.com/fetzerch/xbmc-pvr-addons.git#branch=frodo") +md5sums=('SKIP') + +build() { + cd "$srcdir/$pkgname" + ./bootstrap + ./configure --prefix=/usr --enable-addons-with-dependencies + make +} + +package() { + cd "$srcdir/$pkgname" + make DESTDIR="$pkgdir/" install +} diff --git a/abs/extra/xbmc/PKGBUILD b/abs/extra/xbmc/PKGBUILD index e496886..6134074 100644 --- a/abs/extra/xbmc/PKGBUILD +++ b/abs/extra/xbmc/PKGBUILD @@ -9,7 +9,7 @@ _prefix=/usr pkgname=xbmc pkgver=12.2 -pkgrel=6 +pkgrel=7 pkgdesc="A software media player and entertainment hub for digital media" arch=('i686' 'x86_64') url="http://xbmc.org" @@ -115,4 +115,4 @@ package() { md5sums=('489f3877decae4e265ece54f9eaef0ba' '76fae229ebc3bcfaab7e7f27e4fb51f5' 'e48a3d87984669ef206e902bc8290ff9' - '8c5cd1b5e7660a49ccd2f99967180a82') + '71176cb0e5aaa230d7c9634c37245bfb') diff --git a/abs/extra/xbmc/xbmc_lib.conf b/abs/extra/xbmc/xbmc_lib.conf index 2dbb10f..e3f4243 100644 --- a/abs/extra/xbmc/xbmc_lib.conf +++ b/abs/extra/xbmc/xbmc_lib.conf @@ -2,6 +2,7 @@ <button> <type>MENU_XBMC</type> <text>Launch XBMC</text> + <description>Open XBMC Media Center</description> <action>EXEC /usr/LH/bin/xbmc.sh</action> </button> <!--#XBMC--> |