Skip to content

Commit

Permalink
Moved some installation files around and fixed libpng CRC error.
Browse files Browse the repository at this point in the history
  • Loading branch information
richeytastic committed Sep 2, 2019
1 parent b60e541 commit 7548d22
Show file tree
Hide file tree
Showing 30 changed files with 34 additions and 15 deletions.
14 changes: 7 additions & 7 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ set( APP_SOURCE "https://github.com/frontiersi/${PROJECT_NAME}/releases")
# D: APP_BUILD_DTSTAMP - Date-time stamp of build (coordinated universal time).
set( APP_VERSION_MAJOR 4)
set( APP_VERSION_MINOR 0)
set( APP_VERSION_PATCH 1)
set( APP_VERSION_PATCH 2)
string( TIMESTAMP APP_BUILD_DTSTAMP "%y%m%d" UTC)
set( APP_VERSION_STRING "${APP_VERSION_MAJOR}.${APP_VERSION_MINOR}.${APP_VERSION_PATCH}.${APP_BUILD_DTSTAMP}")

Expand Down Expand Up @@ -172,11 +172,11 @@ if ( WIN32)
set( _rootPackageXML "${_packageRoot}/meta/package.xml")

# Copy over the base directory structure for the config and packages folders from the source directory.
#install( DIRECTORY "installer/" DESTINATION "${PROJECT_BINARY_DIR}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)
install( DIRECTORY "installer/" DESTINATION "${CMAKE_INSTALL_PREFIX}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)
#install( DIRECTORY "install/windows/" DESTINATION "${PROJECT_BINARY_DIR}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)
install( DIRECTORY "install/windows/" DESTINATION "${CMAKE_INSTALL_PREFIX}" PATTERN "*.py" EXCLUDE PATTERN "*.xml.in" EXCLUDE)
# Configure the required package installer configuration files
configure_file( "installer/${_rootPackageXML}.in" "${CMAKE_INSTALL_PREFIX}/${_rootPackageXML}")
configure_file( "installer/${_configXML}.in" "${CMAKE_INSTALL_PREFIX}/${_configXML}")
configure_file( "install/windows/${_rootPackageXML}.in" "${CMAKE_INSTALL_PREFIX}/${_rootPackageXML}")
configure_file( "install/windows/${_configXML}.in" "${CMAKE_INSTALL_PREFIX}/${_configXML}")

# Create the package directories with required structure
set( _packageRootData "${_packageRoot}/data")
Expand Down Expand Up @@ -239,8 +239,8 @@ elseif(UNIX)
# NB ENSURE THAT LD_LIBRARY_PATH IS SET CORRECTLY TO FIND THE CORRECT LIBRARIES NEEDED!
install( CODE "execute_process( COMMAND ${_linuxdeploy} --appdir=${_appdir}
--executable=${_bin_dir}/${PROJECT_NAME}
--desktop-file=${PROJECT_SOURCE_DIR}/installer/linux/${PROJECT_NAME}.desktop
--icon-file=${PROJECT_SOURCE_DIR}/installer/linux/${PROJECT_NAME}.png
--desktop-file=${PROJECT_SOURCE_DIR}/install/linux/${PROJECT_NAME}.desktop
--icon-file=${PROJECT_SOURCE_DIR}/install/linux/${PROJECT_NAME}.png
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
install( CODE "execute_process( COMMAND ${_appimagetool} ${_appdir}
WORKING_DIRECTORY ${CMAKE_INSTALL_PREFIX})")
Expand Down
1 change: 1 addition & 0 deletions include/ClinifaceMain.h
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ private slots:
FaceAction *_actionInvertNormals;
FaceAction *_actionAlignVertices;
FaceAction *_actionSaveFaceModel;
FaceAction *_actionVisPolyLabels;
FaceAction *_actionAlignLandmarks;
FaceAction *_actionCloseFaceModel;
FaceAction *_actionExportMetaData;
Expand Down
File renamed without changes.
File renamed without changes
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
File renamed without changes
File renamed without changes
2 changes: 1 addition & 1 deletion plugins/CurvatureVis/include/CurvatureVis.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Q_PLUGIN_METADATA( IID QToolsPluginInterface_iid)
Q_INTERFACES( QTools::PluginInterface)
public:
CurvatureVis();
std::string applicationCode() const { return "org.cliniface_4.0.1_plugin";}
std::string applicationCode() const { return "org.cliniface_4.0.2_plugin";}
}; // end class

} // end namespace
Expand Down
2 changes: 1 addition & 1 deletion plugins/SymmetryVis/include/SymmetryVis.h
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ Q_PLUGIN_METADATA( IID QToolsPluginInterface_iid)
Q_INTERFACES( QTools::PluginInterface)
public:
SymmetryVis();
std::string applicationCode() const { return "org.cliniface_4.0.1_plugin";}
std::string applicationCode() const { return "org.cliniface_4.0.2_plugin";}
}; // end class

} // end namespace
Expand Down
Binary file modified res/icons/icons8-user-left-male-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified res/icons/icons8-user-right-male-48.png
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
23 changes: 19 additions & 4 deletions src/ClinifaceMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,7 @@
#include <FaceActionManager.h>

#include <OutlinesVisualisation.h>
#include <PolyLabelsVisualisation.h>
#include <VertexLabelsVisualisation.h>

#include <QLabel>
Expand All @@ -83,6 +84,16 @@ QAction* connectDialog( QAction* a, QDialog* d)
} // end connectDialog


QString appName()
{
#ifdef NDEBUG
return APP_NAME;
#else
return QString( "%1 (DEBUG)").arg(APP_NAME);
#endif
} // end appName


// Plugin help documentation is embedded within a single HTML page with header and footer defined by Cliniface.
QString producePluginHelpContent( FaceAction* act)
{
Expand Down Expand Up @@ -144,6 +155,7 @@ void ClinifaceMain::registerActions()
FAM::registerAction( _actionVisOutlines);
FAM::registerAction( _actionVisWireframe);
FAM::registerAction( _actionVisTexture);
FAM::registerAction( _actionVisPolyLabels);
FAM::registerAction( _actionVisVertexLabels);

FAM::registerAction( new ActionMapCurvature);
Expand Down Expand Up @@ -239,6 +251,7 @@ void ClinifaceMain::createViewMenu()
_ui->menu_View->addAction( _actionEditLandmarks->qaction());
_ui->menu_View->addAction( _actionEditPaths->qaction());
_ui->menu_View->addAction( _actionRadialSelect->qaction());
_ui->menu_View->addAction( _actionVisPolyLabels->qaction());
_ui->menu_View->addAction( _actionVisVertexLabels->qaction());

QMenu *surfaceMenu = _ui->menu_View->addMenu( "&Scalar Mapping...");
Expand Down Expand Up @@ -441,6 +454,7 @@ void ClinifaceMain::createActions()
_actionVisTexture->addTriggerEvent( Event::LOADED_MODEL);
_actionVisWireframe = new ActionVisualise( "Wireframe", QIcon(":/icons/WIREFRAME"), new WireframeVisualisation, Qt::Key_W);
_actionVisOutlines = new ActionVisualise( "Outlines", QIcon(":/icons/OUTLINES"), new OutlinesVisualisation, Qt::Key_O);
_actionVisPolyLabels = new ActionVisualise( "Polygon Labels", QIcon(":/icons/NUMBERS"), new PolyLabelsVisualisation, Qt::SHIFT + Qt::Key_V);
_actionVisVertexLabels = new ActionVisualise( "Vertex Labels", QIcon(":/icons/NUMBERS"), new VertexLabelsVisualisation, Qt::Key_V);
_actionEditLandmarks = new ActionEditLandmarks( "Show Landmarks", QIcon(":/icons/MARKER"), Qt::Key_L);

Expand Down Expand Up @@ -577,12 +591,13 @@ void ClinifaceMain::createMetrics()
} // end createMetrics



// public
ClinifaceMain::ClinifaceMain()
: QMainWindow(nullptr), _ui(new Ui::ClinifaceMain)
{
_ui->setupUi(this);
setWindowTitle( APP_NAME);
setWindowTitle( appName());
setAcceptDrops(true); // Accept dropping of files onto this widget
setContextMenuPolicy(Qt::NoContextMenu);

Expand Down Expand Up @@ -616,7 +631,7 @@ ClinifaceMain::ClinifaceMain()
Preferences::updateApplication(); // Initialise loaded preferences

_ploader = new ClinifacePluginsLoader( this);
_ploader->dialog()->setWindowTitle( APP_NAME + QString(" | Plugins"));
_ploader->dialog()->setWindowTitle( appName() + QString(" | Plugins"));

createToolBar();
createFileMenu();
Expand Down Expand Up @@ -724,14 +739,14 @@ void ClinifaceMain::closeEvent( QCloseEvent* evt)

void ClinifaceMain::_doOnUpdate( const FaceTools::FM* fm)
{
QString wtitle = QString( "%1 %2").arg( APP_NAME, APP_VERSION_STRING);
QString wtitle = QString( "%1 %2").arg( appName(), APP_VERSION_STRING);

if ( fm)
{
QString mfile = FaceTools::FileIO::FMM::filepath(fm).c_str();
if ( !fm->isSaved())
mfile += " (*)";
wtitle = QString("%1 | %2").arg( APP_NAME, mfile);
wtitle = QString("%1 | %2").arg( appName(), mfile);
} // end if

setWindowTitle( wtitle);
Expand Down
7 changes: 5 additions & 2 deletions src/ClinifacePluginsLoader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,7 @@ void ClinifacePluginsLoader::loadPlugins( const QString& dllsDir)
QTools::PluginsLoader ploader( dllsDir.toStdString());
connect( &ploader, &QTools::PluginsLoader::loadedPlugin, this, &ClinifacePluginsLoader::_addPlugin);
const std::string pluginToken = QString( "org.cliniface_%1.%2.%3_plugin").arg(APP_VERSION_MAJOR).arg(APP_VERSION_MINOR).arg(APP_VERSION_PATCH).toStdString();
std::cerr << "Loading plugins from: " << ploader.pluginsDir().absolutePath().toStdString()
<< " using compatibility code: " << pluginToken << std::endl;
std::cerr << "Looking for plugins in: " << ploader.pluginsDir().absolutePath().toStdString() << std::endl;
ploader.loadPlugins( pluginToken); // Actually load with _addPlugin called for each
_pdialog->addPlugins( ploader); // Add plugins to the dialog
} // end loadPlugins
Expand All @@ -46,11 +45,15 @@ void ClinifacePluginsLoader::_addPlugin( QTools::PluginInterface* plugin, const
{
if ( !plugin)
{
#ifndef NDEBUG
std::cerr << "Failed to load plugin from: " << pluginpath.toStdString() << std::endl;
std::cerr << " >>> Might there be undefined functions on the class?" << std::endl;
#endif
return;
} // end if

std::cerr << "Loaded plugin: " << plugin->displayName().toStdString() << std::endl;

for ( const QString& iid : plugin->interfaceIds())
{
FaceAction *act = qobject_cast<FaceAction*>( plugin->iface(iid));
Expand Down

0 comments on commit 7548d22

Please sign in to comment.