summaryrefslogtreecommitdiffstats
path: root/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp')
-rwxr-xr-xabs/core/mythinstall/MythVantage-app/mythinstall/main.cpp73
1 files changed, 39 insertions, 34 deletions
diff --git a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
index 5c2e128..6751796 100755
--- a/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
+++ b/abs/core/mythinstall/MythVantage-app/mythinstall/main.cpp
@@ -1,5 +1,4 @@
-//#include <qapplication.h>
-
+// mythinstall
#include "installdialog.h"
#include "installsettings.h"
#include "password_manage.h"
@@ -12,6 +11,7 @@
#include <QDir>
#include <QTextStream>
+#include <stdio.h>
#include <cstdlib>
#include <sys/types.h>
#include <sys/stat.h>
@@ -19,8 +19,6 @@
#include <chrono> // for milliseconds
#include <thread> // for sleep_for
-#include <stdio.h>
-
//MythTV
#include "langsettings.h"
#include "mythcontext.h"
@@ -39,18 +37,18 @@
#include "mythuihelper.h"
//??
-#include "myththemebase.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");
-}
+//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)
{
@@ -67,7 +65,7 @@ int main(int argc, char **argv)
bool bShowplugins = false;
bool bShowsoftware = false;
bool bShowTemplate = false;
- bool bShowuser = false;
+ bool bShowuser = false;
bool bShowwebuser = false;
bool bRunSetup = false;
bool bShowHelp = false;
@@ -78,8 +76,8 @@ int main(int argc, char **argv)
bool bShowquestion = false;
bool bShowsupplemental = false;
bool bShowremotes_only = false;
- bool bShowvnc = false;
- bool bShowFileshare = false;
+ bool bShowvnc = false;
+ bool bShowFileshare = false;
QStringList template_c_line ;
QString modulelist = "" ;
@@ -261,14 +259,17 @@ int main(int argc, char **argv)
showLang = true;
LCD::SetupLCD();
+
if (class LCD *lcd = LCD::Get())
lcd->switchToTime();
-
MythTranslation::load("mythfrontend");
+
GetMythUI()->LoadQtConfig();
+
MythMainWindow *mainWindow = GetMythMainWindow();
mainWindow->Init();
+ MythScreenStack *mainStack = mainWindow->GetMainStack();
// if parms were passed to -t then doen't init the screen.
// if ( template_c_line.size() == 0 )
@@ -282,14 +283,15 @@ int main(int argc, char **argv)
// initKeys();
// };
- gCoreContext->ActivateSettingsCache(false);
- gCoreContext->ClearSettingsCache();
- gCoreContext->ActivateSettingsCache(false);
+// gCoreContext->ActivateSettingsCache(false);
+// gCoreContext->ClearSettingsCache();
+// gCoreContext->ActivateSettingsCache(false);
+ MythScreenType *screen;
if (bShowSettings)
{
- gCoreContext->ActivateSettingsCache(false);
- gCoreContext->ClearSettingsCache();
+ //gCoreContext->ActivateSettingsCache(false);
+ //gCoreContext->ClearSettingsCache();
bool runconfig = false;
int sysRet=system("cp -f /etc/systemconfig /tmp/systemconfig.bak");
if (sysRet < 0)
@@ -321,7 +323,6 @@ int main(int argc, char **argv)
"libdvdcss",
"mythweather",
"mythzoneminder",
- "huludesktop",
"openpht",
"plex-media-server",
"kodi",
@@ -347,7 +348,6 @@ int main(int argc, char **argv)
"Hostpluginmythvideo_dvdcss",
"Hostpluginmythweather",
"Hostpluginmythzoneminder",
- "HostHuluDesktop",
"HostPLEXHT",
"HostPLEXMS",
"HostXBMC",
@@ -389,14 +389,18 @@ int main(int argc, char **argv)
}
//DONE sync db with pacman
- runsettings(false,bShowNetwork,bShowHostype,bShowMisc,bShowshutdown,bShowadvanced,bShowsound,bShowadvancedX,bShowAccesscontrol,bShowplugins,bShowsoftware,bShowuser,bShowwebuser,bShowddns,bShowinfrared,bShowscreensaver,bShowsupplemental,bShowremotes_only,bShowvnc,bShowFileshare);
+ 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=MV_ROOT;
- cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb);
+ cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb);
sysRet=system(qPrintable(cmdtxt));
if (sysRet < 0)
LOG(VB_GENERAL, LOG_ERR, "Could not save settings");
@@ -413,7 +417,7 @@ int main(int argc, char **argv)
//db changed save setting from olddb
QString cmdtxt;
cmdtxt=MV_ROOT;
- cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb ) ;
+ cmdtxt.append("bin/myth_settings_wrapper.sh -c save -t syssettings -d " + olddb);
int sysRet=system(qPrintable(cmdtxt));
if (sysRet < 0)
LOG(VB_GENERAL, LOG_ERR, "Could not save settings");
@@ -421,15 +425,14 @@ int main(int argc, char **argv)
if ( runconfig )
{
- //LOG(VB_GENERAL, LOG_ERR,
- // "mythinstall: this is where i stalled");
+ //LOG(VB_GENERAL, LOG_ERR, "mythinstall: this is where i stalled");
if ( newhostype != oldhostype )
modulelist.append("hostypec,");
- // trim off last ,
+ // 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 ");
+ 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);
@@ -438,8 +441,8 @@ int main(int argc, char **argv)
if (sysRet < 0)
LOG(VB_GENERAL, LOG_ERR, "Could not remove /tmp/systemconfig.bak.");
- gCoreContext->ActivateSettingsCache(false);
- gCoreContext->ClearSettingsCache();
+// gCoreContext->ActivateSettingsCache(false);
+// gCoreContext->ClearSettingsCache();
if ( restart )
{
QString prompt;
@@ -469,9 +472,9 @@ int main(int argc, char **argv)
if (sysRet < 0)
LOG(VB_GENERAL, LOG_ERR, "Could not reload frontend.");
}
- gCoreContext->ActivateSettingsCache(false);
- gCoreContext->ClearSettingsCache();
- gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE");
+// gCoreContext->ActivateSettingsCache(false);
+// gCoreContext->ClearSettingsCache();
+// gCoreContext->SendMessage("CLEAR_SETTINGS_CACHE");
}//run settings
else if (bShowTemplate)
@@ -644,6 +647,8 @@ int main(int argc, char **argv)
}
DestroyMythMainWindow();
delete gContext;
+// gContext = nullptr;
+// delete qApp;
SignalHandler::Done();
return retval;
}