Fleshing out installation.

This commit is contained in:
Jim Evins
2017-02-26 15:07:44 -05:00
parent 62a87a5b03
commit 95467b6ed2
13 changed files with 319 additions and 16 deletions
+11 -4
View File
@@ -200,10 +200,6 @@ include_directories (
${Qt5Svg_INCLUDE_DIRS}
)
link_directories (
${glabels_qt_SOURCE_DIR}/libglabels
)
#=======================================
# Subdirectories
@@ -215,3 +211,14 @@ add_subdirectory (Merge)
# Install
#=======================================
install (TARGETS glabels-qt RUNTIME DESTINATION bin)
install (FILES icons/scalable/apps/glabels.svg DESTINATION share/icons/hicolor/scalable/apps)
install (FILES icons/16x16/apps/glabels.svg DESTINATION share/icons/hicolor/16x16/apps)
install (FILES icons/22x22/apps/glabels.svg DESTINATION share/icons/hicolor/22x22/apps)
install (FILES icons/32x32/apps/glabels.svg DESTINATION share/icons/hicolor/32x32/apps)
install (FILES icons/48x48/apps/glabels.svg DESTINATION share/icons/hicolor/48x48/apps)
install (FILES icons/scalable/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/scalable/mimetypes)
install (FILES icons/16x16/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/16x16/mimetypes)
install (FILES icons/22x22/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/22x22/mimetypes)
install (FILES icons/24x24/mimetypes/x-glabels-project.svg DESTINATION share/icons/hicolor/24x24/mimetypes)
+15 -12
View File
@@ -23,6 +23,7 @@
#include <QApplication>
#include <QtDebug>
#include <QtGlobal>
#include "Config.h"
#include "StrUtil.h"
@@ -604,22 +605,24 @@ namespace glabels
QDir Db::systemTemplatesDir()
{
QDir dir(QApplication::applicationDirPath());
QDir dir;
if ( dir.dirName() == "bin" )
// First, try finding templates directory relative to application path
dir.cd( QApplication::applicationDirPath() );
if ( (dir.dirName() == "bin") &&
dir.cdUp() && dir.cd( "share" ) && dir.cd( "glabels-qt" ) && dir.cd( "templates" ) )
{
dir.cdUp();
dir.cd( "share" );
dir.cd( "libglabels-3.0" ); // TODO: install qt version
}
else
{
// Working out of build directory
dir.cd( Config::PROJECT_SOURCE_DIR );
return dir;
}
dir.cd( "templates" );
return dir;
// Next, try running out of the source directory.
if ( dir.cd( Config::PROJECT_SOURCE_DIR ) && dir.cd( "templates" ) )
{
return dir;
}
qFatal( "Cannot find template directory!" );
return QDir("/");
}
@@ -0,0 +1,35 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="16" height="16" >
<path
style="fill:#ffffff;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1"
d="M 3.5,1.5 3.5,14.5 13.5,14.5 13.5,4.5 10.5,1.5 Z" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="3" x="5" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="3" x="5" y="7" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="3" x="5" y="10" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="1" x="9" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="3" x="9" y="7" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="2" width="3" x="9" y="10" />
<path
style="fill:#fcfcfc;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1;stroke-linejoin:bevel"
d="M 13.5,4.5 10.5,1.5 10.5,4.5 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.0 KiB

@@ -0,0 +1,43 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="22" height="22" >
<path
style="fill:#ffffff;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1"
d="M 4.5,1.5 4.5,19.5 18.5,19.5 18.5,6.5 13.5,1.5 Z" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="6" y="3" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="6" y="7" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="6" y="11" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="6" y="15" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="3" x="12" y="3" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="12" y="7" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="12" y="11" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="12" y="15" />
<path
style="fill:#fcfcfc;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1;stroke-linejoin:bevel"
d="M 18.5,6.5 13.5,1.5 13.5,6.5 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,43 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" >
<path
style="fill:#ffffff;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1"
d="M 5.5,2.5 5.5,20.5 19.5,20.5 19.5,7.5 14.5,2.5 Z" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="8" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="12" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="16" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="3" x="13" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="8" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="12" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="16" />
<path
style="fill:#fcfcfc;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1;stroke-linejoin:bevel"
d="M 19.5,7.5 14.5,2.5 14.5,7.5 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB

@@ -0,0 +1,43 @@
<svg xmlns="http://www.w3.org/2000/svg" version="1.1" width="24" height="24" >
<path
style="fill:#ffffff;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1"
d="M 5.5,2.5 5.5,20.5 19.5,20.5 19.5,7.5 14.5,2.5 Z" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="8" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="12" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="7" y="16" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="3" x="13" y="4" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="8" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="12" />
<rect
style="fill:#eeeeee;fill-opacity:1;stroke:none"
height="3" width="5" x="13" y="16" />
<path
style="fill:#fcfcfc;fill-opacity:1;stroke:#333333;stroke-width:1;stroke-opacity:1;stroke-linejoin:bevel"
d="M 19.5,7.5 14.5,2.5 14.5,7.5 Z" />
</svg>

After

Width:  |  Height:  |  Size: 1.2 KiB