summaryrefslogtreecommitdiffstats
path: root/abs/core-testing/mythinstall
diff options
context:
space:
mode:
authorBob Igo <bob@stormlogic.com>2009-08-12 13:22:35 (GMT)
committerBob Igo <bob@stormlogic.com>2009-08-12 13:22:35 (GMT)
commit55c4951b5f8376a0131ca96402af82f0b469600d (patch)
tree1587f2d1dc5c172275bb5fd8536dda1315432a99 /abs/core-testing/mythinstall
parent858f0c53e9673a41bd5b3f7014b28b2f0e28cdef (diff)
parent9182c2064790a8247622117138809d38a6c71f40 (diff)
downloadlinhes_pkgbuild-55c4951b5f8376a0131ca96402af82f0b469600d.zip
linhes_pkgbuild-55c4951b5f8376a0131ca96402af82f0b469600d.tar.gz
linhes_pkgbuild-55c4951b5f8376a0131ca96402af82f0b469600d.tar.bz2
merge
Diffstat (limited to 'abs/core-testing/mythinstall')
-rw-r--r--abs/core-testing/mythinstall/PKGBUILD14
-rwxr-xr-xabs/core-testing/mythinstall/xorgsettings.cpp9
-rwxr-xr-xabs/core-testing/mythinstall/xorgsettings.h58
3 files changed, 64 insertions, 17 deletions
diff --git a/abs/core-testing/mythinstall/PKGBUILD b/abs/core-testing/mythinstall/PKGBUILD
index f6fd685..81c6229 100644
--- a/abs/core-testing/mythinstall/PKGBUILD
+++ b/abs/core-testing/mythinstall/PKGBUILD
@@ -1,7 +1,7 @@
# Maintainer: Jams
pkgname=mythinstall
pkgver=1
-pkgrel=1
+pkgrel=3
pkgdesc="LinHES installer/systemconfig GUI."
arch=i686
depends=()
@@ -37,12 +37,12 @@ build() {
# LinHES-PKGBUILD area.
cd ${srcdir}
- qmake mythinstall.pro
- make
- MVDIR=$startdir/pkg/usr/MythVantage
- mkdir -p $MVDIR/bin
- install -m 0755 mythinstall $MVDIR/bin/MythVantage
- cd $MVDIR/bin
+ qmake mythinstall.pro || return 1
+ make || return 1
+ MVBINDIR=$startdir/pkg/usr/MythVantage/bin
+ mkdir -p $MVBINDIR
+ install -m 0755 mythinstall $MVBINDIR/MythVantage
+ cd $MVBINDIR
ln -s MythVantage mythvantage
ln -s MythVantage mythinstall
cd -
diff --git a/abs/core-testing/mythinstall/xorgsettings.cpp b/abs/core-testing/mythinstall/xorgsettings.cpp
index 77fe023..02fa3ce 100755
--- a/abs/core-testing/mythinstall/xorgsettings.cpp
+++ b/abs/core-testing/mythinstall/xorgsettings.cpp
@@ -259,7 +259,7 @@ AdvancedXGeneric_modelines::AdvancedXGeneric_modelines():
HostXModelineCatagory->addSelection("DVD");
HostXModelineCatagory->addSelection("NTSC");
HostXModelineCatagory->addSelection("Custom");
- //HostXModelineCatagory->addSelection("Nvidia_modeline");
+ //HostXModelineCatagory->addSelection("nVidia Modeline");
HostXModelineCatagory->setHelpText(QObject::tr(""));
HostXadvancedresVESA = new HostComboBox("HostXadvancedresVESA");
@@ -427,7 +427,7 @@ AdvancedXNvidia_modelines::AdvancedXNvidia_modelines():
HostXNvidiaModelineCatagory->addSelection("DVD");
HostXNvidiaModelineCatagory->addSelection("NTSC");
HostXNvidiaModelineCatagory->addSelection("Custom");
- HostXNvidiaModelineCatagory->addSelection("Nvidia_modeline");
+ HostXNvidiaModelineCatagory->addSelection("nVidia Modeline");
HostXNvidiaModelineCatagory->setHelpText(QObject::tr(""));
HostXNvidiaadvancedresVESA = new HostComboBox("HostXNvidiaadvancedresVESA");
@@ -478,9 +478,8 @@ AdvancedXNvidia_modelines::AdvancedXNvidia_modelines():
addTarget("DVD", HostXNvidiaadvancedresDVD);
addTarget("NTSC", HostXNvidiaadvancedresNTSC);
addTarget("Custom",HostXNvidiaadvancedresCustom);
- addTarget("Nvidia_modeline",nVidiastandard);
+ addTarget("nVidia Modeline",nVidiastandard);
addTarget("Auto", new VerticalConfigurationGroup(false, false));
-
};
@@ -511,7 +510,7 @@ void AdvancedXNvidia_modelines::AdvancedXNvidia_modelines_GatherSettings(void)
modeline= HostXNvidiaadvancedresNTSC->getValue();
else if ( modelinecatagory == "Custom")
modeline= HostXNvidiaadvancedresCustom->getValue();
- else if ( modelinecatagory == "Nvidia_modeline" )
+ else if ( modelinecatagory == "nVidia Modeline" )
modeline = "Builtin" ;
// need to add stuff to find the built in nvidia modelines
hostparm.ThisXresadvanced = modelinecatagory +"_"+modeline;
diff --git a/abs/core-testing/mythinstall/xorgsettings.h b/abs/core-testing/mythinstall/xorgsettings.h
index 9efc669..c17720f 100755
--- a/abs/core-testing/mythinstall/xorgsettings.h
+++ b/abs/core-testing/mythinstall/xorgsettings.h
@@ -4,8 +4,6 @@
#include "libmyth/mythwidgets.h"
#include "installsettings.h"
-
-
class AdvancedXNvidiaConnections: public TriggeredConfigurationGroup {
Q_OBJECT
public:
@@ -104,9 +102,59 @@ static HostComboBox *HostXres()
{
HostComboBox *gc = new HostComboBox("HostXres");
gc->setLabel(QObject::tr("Initial resolution"));
- gc->addSelection("800x600");
- gc->addSelection("1280x720") ;
- gc->addSelection("Auto") ;
+ const int num_defaults = 2;
+ char *defaults[num_defaults]={"800x600","1280x720"};
+ int defaults_added[num_defaults]={0,0};
+
+ gc->addSelection("Auto");
+
+ {
+ FILE *modelines;
+ const char*mode_extract_command =
+ "sed -n 's/[[:space:]]\\+/ /g;" // compress whitespace
+ "s/[\\) ]: /#/g;" // Insert # as a field delimiter
+ "/Modes in ModePool/,/ModePool/p'" // get the Modelool lines
+ " /var/log/Xorg.0.log |" // from the Xorg log
+ "cut -d# -f2-3 | " // select the mode and description fields
+ "sed '/^\\\"/!d;" // Only selest modeline lines.
+ "/DoubleScan/d;" // Remove doublescan modelines.
+ "/nvidia-auto-select/d;" // Remove auto modeline.
+ "s/ x /x/g;"
+ "s/ @ /@/g;"
+ "s/From: //g;"
+ "s/ Format [0-9]*) (/, /g;"
+ "s/ Format [0-9]*//g;"
+ "s/ Server//g'"; //reformat.
+ cout << mode_extract_command << endl;
+ modelines = popen (mode_extract_command, "r");
+ if (modelines)
+ {
+ char line_in[200];
+ while (fgets (line_in, sizeof (line_in), modelines))
+ {
+ char *separator;
+
+ if (strchr (line_in, '\n'))
+ strchr (line_in, '\n')[0]=0;
+
+ separator = strchr (line_in, '#');
+
+ if (separator)
+ {
+ separator[0]=0;
+ gc->addSelection(separator + 1,line_in);
+ for (int def = 0; def < num_defaults; def++)
+ if (strncmp (&line_in[1], defaults[def], strlen (defaults[def]))==0)
+ defaults_added[def]=1;
+ }
+ }
+ }
+ }
+
+ for (int def = 0; def < num_defaults; def++)
+ if (!defaults_added[def])
+ gc->addSelection(defaults[def], defaults[def]);
+
gc->setHelpText(QObject::tr(""));
return gc;
}