Merge pull request #868 from birarda/fervor

changes to update flow to prepare for gazzlab
This commit is contained in:
Andrzej Kapolka 2013-08-20 10:34:10 -07:00
commit 7ab0f18622
6 changed files with 22 additions and 10 deletions

View file

@ -3,8 +3,8 @@ project(Fervor)
find_package(Qt5Core REQUIRED)
find_package(Qt5Network REQUIRED)
find_package(Qt5WebKit REQUIRED)
find_package(Qt5Widgets REQUIRED)
find_package(Qt5WebKitWidgets REQUIRED)
add_definitions(-DFV_GUI)
@ -32,4 +32,4 @@ include_directories(
add_library(fervor ${FERVOR_SOURCES} ${FERVOR_HEADERS} ${FERVOR_MOC_SOURCES} ${FERVOR_WRAPPED_UI})
target_link_libraries(fervor ${QUAZIP_LIBRARIES})
qt5_use_modules(fervor Core Network Widgets WebKit)
qt5_use_modules(fervor Core Network Widgets WebKitWidgets)

Binary file not shown.

View file

@ -1,5 +1,5 @@
[INFO]
name=interface
name=Interface
version=0.0.1
organizationName=High Fidelity
organizationDomain=highfidelity.io

View file

@ -64,7 +64,6 @@
#include "renderer/ProgramObject.h"
#include "ui/TextRenderer.h"
#include "Swatch.h"
#include "fvupdater.h"
using namespace std;
@ -209,12 +208,6 @@ Application::Application(int& argc, char** argv, timeval &startup_time) :
NodeList::getInstance()->startSilentNodeRemovalThread();
_window->setCentralWidget(_glWidget);
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
// if this is a release OS X build use fervor to check for an update
FvUpdater::sharedUpdater()->SetFeedURL("https://s3-us-west-1.amazonaws.com/highfidelity/appcast.xml");
FvUpdater::sharedUpdater()->CheckForUpdatesSilent();
#endif
// call Menu getInstance static method to set up the menu
_window->setMenuBar(Menu::getInstance());
@ -312,6 +305,11 @@ void Application::initializeGL() {
// update before the first render
update(0.0f);
// now that things are drawn - if this is an OS X release build we can check for an update
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
Menu::getInstance()->checkForUpdates();
#endif
}
void Application::paintGL() {

View file

@ -20,6 +20,7 @@
#include <QStandardPaths>
#include "Application.h"
#include "fvupdater.h"
#include "PairingHandler.h"
#include "Menu.h"
#include "Util.h"
@ -63,6 +64,11 @@ Menu::Menu() :
this,
SLOT(editPreferences())))->setMenuRole(QAction::PreferencesRole);
#if defined(Q_OS_MAC) && defined(QT_NO_DEBUG)
// show "Check for Updates" in the menu
(addActionToQMenuAndActionHash(fileMenu, MenuOption::CheckForUpdates, 0, this, SLOT(checkForUpdates())))->setMenuRole(QAction::ApplicationSpecificRole);
#endif
QMenu* pairMenu = addMenu("Pair");
addActionToQMenuAndActionHash(pairMenu, MenuOption::Pair, 0, PairingHandler::getInstance(), SLOT(sendPairRequest()));
@ -459,6 +465,12 @@ void Menu::exportSettings() {
}
}
void Menu::checkForUpdates() {
qDebug() << "Checking if there are available updates.\n";
// if this is a release OS X build use fervor to check for an update
FvUpdater::sharedUpdater()->SetFeedURL("http://s3.highfidelity.io/appcast.xml");
FvUpdater::sharedUpdater()->CheckForUpdatesSilent();
}
void Menu::loadAction(QSettings* set, QAction* action) {
if (action->isChecked() != set->value(action->text(), action->isChecked()).toBool()) {

View file

@ -58,6 +58,7 @@ public slots:
void saveSettings(QSettings* settings = NULL);
void importSettings();
void exportSettings();
void checkForUpdates();
private slots:
void editPreferences();
@ -112,6 +113,7 @@ namespace MenuOption {
const QString Atmosphere = "Atmosphere";
const QString Bandwidth = "Bandwidth Display";
const QString BandwidthDetails = "Bandwidth Details";
const QString CheckForUpdates = "Check for Updates...";
const QString Collisions = "Collisions";
const QString CopyVoxels = "Copy Voxels";
const QString CoverageMap = "Render Coverage Map";