summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobert Lancaster <rlancaste@gmail.com>2016-11-04 09:19:56 (GMT)
committerJasem Mutlaq <mutlaqja@ikarustech.com>2016-11-04 09:19:56 (GMT)
commit61df10526344c10f489edff66cdf4e023a3bdefc (patch)
tree7847bcd185bf459d42a9d14a02c487389a0e035d
parent3b5c56479078084c7f949a6e5245fb8164c48167 (diff)
OSX bundle fixes
-rw-r--r--kstars/ekos/align/offlineastrometryparser.cpp48
-rw-r--r--kstars/ekos/opsekos.cpp42
-rw-r--r--kstars/ekos/opsekos.ui8
-rw-r--r--kstars/indi/drivermanager.cpp2
-rw-r--r--kstars/indi/indidriver.cpp2
-rw-r--r--kstars/indi/opsindi.cpp28
-rw-r--r--kstars/indi/opsindi.ui4
7 files changed, 78 insertions, 56 deletions
diff --git a/kstars/ekos/align/offlineastrometryparser.cpp b/kstars/ekos/align/offlineastrometryparser.cpp
index b6b2fa3..5210cbc 100644
--- a/kstars/ekos/align/offlineastrometryparser.cpp
+++ b/kstars/ekos/align/offlineastrometryparser.cpp
@@ -75,11 +75,22 @@ bool OfflineAstrometryParser::astrometryNetOK()
{
bool solverOK=false, wcsinfoOK=false;
- QFileInfo solver(Options::astrometrySolver());
- solverOK = solver.exists() && solver.isFile();
+ if(Options::astrometrySolverIsInternal()){
+ QFileInfo solver(QCoreApplication::applicationDirPath()+"/astrometry/bin/solve-field");
+ solverOK = solver.exists() && solver.isFile();
+ }
+ else{
+ QFileInfo solver(Options::astrometrySolver());
+ solverOK = solver.exists() && solver.isFile();
+ }
- QFileInfo wcsinfo(Options::astrometryWCSInfo());
- wcsinfoOK = wcsinfo.exists() && wcsinfo.isFile();
+ if(Options::wcsIsInternal()){
+ QFileInfo wcsinfo(QCoreApplication::applicationDirPath()+"/astrometry/bin/wcsinfo");
+ wcsinfoOK = wcsinfo.exists() && wcsinfo.isFile();
+ }else{
+ QFileInfo wcsinfo(Options::astrometryWCSInfo());
+ wcsinfoOK = wcsinfo.exists() && wcsinfo.isFile();
+ }
return (solverOK && wcsinfoOK);
}
@@ -144,7 +155,14 @@ void OfflineAstrometryParser::verifyIndexFiles(double fov_x, double fov_y)
bool OfflineAstrometryParser::getAstrometryDataDir(QString &dataDir)
{
- QFile confFile(Options::astrometryConfFile());
+ QString confPath;
+
+ if(Options::astrometryConfFileIsInternal())
+ confPath = QCoreApplication::applicationDirPath()+"/astrometry/bin/astrometry.cfg";
+ else
+ confPath = Options::astrometryConfFile();
+
+ QFile confFile(confPath);
if (confFile.open(QIODevice::ReadOnly) == false)
{
@@ -210,13 +228,20 @@ bool OfflineAstrometryParser::startSovler(const QString &filename, const QStrin
solverTimer.start();
- solver.start(Options::astrometrySolver(), solverArgs);
+ QString solverPath;
+
+ if(Options::astrometrySolverIsInternal())
+ solverPath=QCoreApplication::applicationDirPath()+"/astrometry/bin/solve-field";
+ else
+ solverPath=Options::astrometrySolver();
+
+ solver.start(solverPath, solverArgs);
align->appendLogText(i18n("Starting solver..."));
if (Options::solverVerbose())
{
- QString command = Options::astrometrySolver() + " " + solverArgs.join(" ");
+ QString command = solverPath + " " + solverArgs.join(" ");
align->appendLogText(command);
}
@@ -249,7 +274,14 @@ void OfflineAstrometryParser::solverComplete(int exist_status)
connect(&wcsinfo, SIGNAL(finished(int)), this, SLOT(wcsinfoComplete(int)));
- wcsinfo.start(Options::astrometryWCSInfo(), QStringList(solutionFile));
+ QString wcsPath;
+
+ if(Options::wcsIsInternal())
+ wcsPath = QCoreApplication::applicationDirPath()+"/astrometry/bin/wcsinfo";
+ else
+ wcsPath = Options::astrometryWCSInfo();
+
+ wcsinfo.start(wcsPath, QStringList(solutionFile));
}
void OfflineAstrometryParser::wcsinfoComplete(int exist_status)
diff --git a/kstars/ekos/opsekos.cpp b/kstars/ekos/opsekos.cpp
index d63a115..b091f4c 100644
--- a/kstars/ekos/opsekos.cpp
+++ b/kstars/ekos/opsekos.cpp
@@ -32,30 +32,24 @@ OpsEkos::OpsEkos()
m_ConfigDialog = KConfigDialog::exists( "settings" );
#ifdef Q_OS_OSX
-connect(solverInternal, SIGNAL(clicked()), this, SLOT(toggleSolverInternal()));
-solverInternal->setToolTip(i18n("Internal or External Plate Solver."));
-if(Options::astrometrySolverIsInternal()){
- solverInternal->setChecked(true);
+connect(kcfg_astrometrySolverIsInternal, SIGNAL(clicked()), this, SLOT(toggleSolverInternal()));
+kcfg_astrometrySolverIsInternal->setToolTip(i18n("Internal or External Plate Solver?"));
+if(Options::astrometrySolverIsInternal())
kcfg_astrometrySolver->setEnabled(false);
-}
-connect(configInternal, SIGNAL(clicked()), this, SLOT(toggleConfigInternal()));
-configInternal->setToolTip(i18n("Internal or External Astrometry.cfg."));
-if(Options::astrometryConfFileIsInternal()){
- configInternal->setChecked(true);
+connect(kcfg_astrometryConfFileIsInternal, SIGNAL(clicked()), this, SLOT(toggleConfigInternal()));
+kcfg_astrometryConfFileIsInternal->setToolTip(i18n("Internal or External astrometry.cfg?"));
+if(Options::astrometryConfFileIsInternal())
kcfg_astrometryConfFile->setEnabled(false);
-}
-connect(wcsInternal, SIGNAL(clicked()), this, SLOT(toggleWCSInternal()));
-wcsInternal->setToolTip(i18n("Internal or External WCS Info."));
-if(Options::wcsIsInternal()){
- wcsInternal->setChecked(true);
+connect(kcfg_wcsIsInternal, SIGNAL(clicked()), this, SLOT(toggleWCSInternal()));
+kcfg_wcsIsInternal->setToolTip(i18n("Internal or External wcsinfo?"));
+if(Options::wcsIsInternal())
kcfg_astrometryWCSInfo->setEnabled(false);
-}
#else
-solverInternal->setVisible(false);
-configInternal->setVisible(false);
-wcsInternal->setVisible(false);
+kcfg_astrometrySolverIsInternal->setVisible(false);
+kcfg_astrometryConfFileIsInternal->setVisible(false);
+kcfg_wcsIsInternal->setVisible(false);
#endif
connect( m_ConfigDialog->button(QDialogButtonBox::Apply), SIGNAL( clicked() ), SLOT( slotApply() ) );
@@ -68,8 +62,8 @@ OpsEkos::~OpsEkos() {}
void OpsEkos::toggleSolverInternal()
{
- kcfg_astrometrySolver->setEnabled(!solverInternal->isChecked());
- if(solverInternal->isChecked())
+ kcfg_astrometrySolver->setEnabled(!kcfg_astrometrySolverIsInternal->isChecked());
+ if(kcfg_astrometrySolverIsInternal->isChecked())
kcfg_astrometrySolver->setText("*Internal Solver*");
else
kcfg_astrometrySolver->setText("/usr/local/bin/solve-field");
@@ -77,8 +71,8 @@ void OpsEkos::toggleSolverInternal()
void OpsEkos::toggleConfigInternal()
{
- kcfg_astrometryConfFile->setEnabled(!configInternal->isChecked());
- if(configInternal->isChecked())
+ kcfg_astrometryConfFile->setEnabled(!kcfg_astrometryConfFileIsInternal->isChecked());
+ if(kcfg_astrometryConfFileIsInternal->isChecked())
kcfg_astrometryConfFile->setText("*Internal astrometry.cfg*");
else
kcfg_astrometryConfFile->setText("/etc/astrometry.cfg");
@@ -86,8 +80,8 @@ void OpsEkos::toggleConfigInternal()
void OpsEkos::toggleWCSInternal()
{
- kcfg_astrometryWCSInfo->setEnabled(!wcsInternal->isChecked());
- if(wcsInternal->isChecked())
+ kcfg_astrometryWCSInfo->setEnabled(!kcfg_wcsIsInternal->isChecked());
+ if(kcfg_wcsIsInternal->isChecked())
kcfg_astrometryWCSInfo->setText("*Internal wcsinfo*");
else
kcfg_astrometryWCSInfo->setText("/usr/local/bin/wcsinfo");
diff --git a/kstars/ekos/opsekos.ui b/kstars/ekos/opsekos.ui
index f1cbe52..e51fb28 100644
--- a/kstars/ekos/opsekos.ui
+++ b/kstars/ekos/opsekos.ui
@@ -7,7 +7,7 @@
<x>0</x>
<y>0</y>
<width>658</width>
- <height>506</height>
+ <height>508</height>
</rect>
</property>
<property name="windowTitle">
@@ -393,7 +393,7 @@
</widget>
</item>
<item row="0" column="3">
- <widget class="QCheckBox" name="wcsInternal">
+ <widget class="QCheckBox" name="kcfg_wcsIsInternal">
<property name="text">
<string/>
</property>
@@ -441,7 +441,7 @@
</widget>
</item>
<item row="1" column="0">
- <widget class="QCheckBox" name="configInternal">
+ <widget class="QCheckBox" name="kcfg_astrometryConfFileIsInternal">
<property name="text">
<string/>
</property>
@@ -472,7 +472,7 @@
</widget>
</item>
<item row="0" column="0">
- <widget class="QCheckBox" name="solverInternal">
+ <widget class="QCheckBox" name="kcfg_astrometrySolverIsInternal">
<property name="text">
<string/>
</property>
diff --git a/kstars/indi/drivermanager.cpp b/kstars/indi/drivermanager.cpp
index a7030de..05b849e 100644
--- a/kstars/indi/drivermanager.cpp
+++ b/kstars/indi/drivermanager.cpp
@@ -959,7 +959,7 @@ bool DriverManager::readXMLDrivers()
if (indiDir.cd(driversDir) == false)
{
- KMessageBox::error(0, i18n("Unable to find INDI Drivers directory: %1\nPlease make sure to set the correct path in KStars configuration", Options::indiDriversDir()));
+ KMessageBox::error(0, i18n("Unable to find INDI Drivers directory: %1\nPlease make sure to set the correct path in KStars configuration", driversDir));
return false;
}
diff --git a/kstars/indi/indidriver.cpp b/kstars/indi/indidriver.cpp
index cda61e4..38f4004 100644
--- a/kstars/indi/indidriver.cpp
+++ b/kstars/indi/indidriver.cpp
@@ -505,7 +505,7 @@ bool INDIDriver::readXMLDrivers()
if (indiDir.cd(driversDir) == false)
{
- KMessageBox::error(0, xi18n("Unable to find INDI Drivers directory: %1\nPlease make sure to set the correct path in KStars configuration", Options::indiDriversDir()));
+ KMessageBox::error(0, xi18n("Unable to find INDI Drivers directory: %1\nPlease make sure to set the correct path in KStars configuration", driversDir));
return false;
}
diff --git a/kstars/indi/opsindi.cpp b/kstars/indi/opsindi.cpp
index 15e3845..dfd52b5 100644
--- a/kstars/indi/opsindi.cpp
+++ b/kstars/indi/opsindi.cpp
@@ -46,23 +46,19 @@ OpsINDI::OpsINDI()
selectDriversDirB->setAttribute(Qt::WA_LayoutUsesWidgetRect);
#ifdef Q_OS_OSX
- connect(indiInternal, SIGNAL(clicked()), this, SLOT(toggleINDIInternal()));
- indiInternal->setToolTip(i18n("Internal or External INDI Server."));
- connect(driversInternal, SIGNAL(clicked()), this, SLOT(toggleDriversInternal()));
- driversInternal->setToolTip(i18n("Internal or External INDI Drivers."));
+ connect(kcfg_indiServerIsInternal, SIGNAL(clicked()), this, SLOT(toggleINDIInternal()));
+ kcfg_indiServerIsInternal->setToolTip(i18n("Internal or External INDI Server?"));
+ connect(kcfg_indiDriversAreInternal, SIGNAL(clicked()), this, SLOT(toggleDriversInternal()));
+ kcfg_indiDriversAreInternal->setToolTip(i18n("Internal or External INDI Drivers?"));
- if(Options::indiServerIsInternal()){
- indiInternal->setChecked(true);
+ if(Options::indiServerIsInternal())
kcfg_indiServer->setEnabled(false);
- }
- if(Options::indiDriversAreInternal()){
- driversInternal->setChecked(true);
+ if(Options::indiDriversAreInternal())
kcfg_indiDriversDir->setEnabled(false);
- }
#else
- indiInternal->setVisible(false);
- driversInternal->setVisible(false);
+ kcfg_indiServerIsInternal->setVisible(false);
+ kcfg_indiDriversAreInternal->setVisible(false);
#endif
connect(selectFITSDirB, SIGNAL(clicked()), this, SLOT(saveFITSDirectory()));
@@ -79,8 +75,8 @@ OpsINDI::~OpsINDI() {}
void OpsINDI::toggleINDIInternal()
{
- kcfg_indiServer->setEnabled(!indiInternal->isChecked());
- if(indiInternal->isChecked())
+ kcfg_indiServer->setEnabled(!kcfg_indiServerIsInternal->isChecked());
+ if(kcfg_indiServerIsInternal->isChecked())
kcfg_indiServer->setText("*Internal INDI Server*");
else
kcfg_indiServer->setText("/usr/local/bin/indiserver");
@@ -88,8 +84,8 @@ void OpsINDI::toggleINDIInternal()
void OpsINDI::toggleDriversInternal()
{
- kcfg_indiDriversDir->setEnabled(!driversInternal->isChecked());
- if(driversInternal->isChecked())
+ kcfg_indiDriversDir->setEnabled(!kcfg_indiDriversAreInternal->isChecked());
+ if(kcfg_indiDriversAreInternal->isChecked())
kcfg_indiDriversDir->setText("*Internal INDI Drivers*");
else
kcfg_indiDriversDir->setText("/usr/local/bin/");
diff --git a/kstars/indi/opsindi.ui b/kstars/indi/opsindi.ui
index af63efd..9780596 100644
--- a/kstars/indi/opsindi.ui
+++ b/kstars/indi/opsindi.ui
@@ -20,7 +20,7 @@
<item>
<layout class="QHBoxLayout" name="horizontalLayout_3">
<item>
- <widget class="QCheckBox" name="indiInternal">
+ <widget class="QCheckBox" name="kcfg_indiServerIsInternal">
<property name="text">
<string/>
</property>
@@ -51,7 +51,7 @@
<number>-1</number>
</property>
<item>
- <widget class="QCheckBox" name="driversInternal">
+ <widget class="QCheckBox" name="kcfg_indiDriversAreInternal">
<property name="text">
<string/>
</property>