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
+2
View File
@@ -38,4 +38,6 @@ find_package(ZLIB 1.2 REQUIRED)
# Subdirectories
#=======================================
add_subdirectory (glabels)
add_subdirectory (templates)
add_subdirectory (data)
+3
View File
@@ -1,3 +1,6 @@
![logo](glabels/images/glabels-logo.png)
![gLabels Label Designer](glabels/images/glabels-label-designer.png)
gLabels-qt
==========
+14
View File
@@ -0,0 +1,14 @@
cmake_minimum_required (VERSION 2.8.12)
###############################################################################
# gLabels data subproject
###############################################################################
project (data)
#=======================================
# Install
#=======================================
install (FILES glabels-qt.desktop DESTINATION share/applications)
install (FILES x-glabels-document.mime.xml DESTINATION share/mime/packages)
install (FILES glabels-qt.appdata.xml DESTINATION share/appdata)
+29
View File
@@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="desktop">
<id>glabels-qt.desktop</id>
<metadata_license>CC0-1.0</metadata_license>
<project_license>GPL-3.0+</project_license>
<name>gLabels</name>
<summary>Create labels, business cards and media covers</summary>
<description>
<p>gLabels is a program for creating labels and business cards. It is
designed to work with various laser/ink-jet peel-off label and business
card sheets that you'll find at most office supply stores.</p>
<p>gLabels can be used to design address labels, name tags, price tags,
cd/dvd labels, or just about anything else that is organized in a regular
pattern on a sheet of paper. Labels (or cards) can contain text, images,
lines, shapes, and barcodes. gLabels also includes a document-merge feature
which lets you print a unique label for each record from an external data
source, such as a CSV file.</p>
</description>
<!--
<screenshots>
<screenshot width="881" type="default" height="640">
<image>http://glabels.org/screenshots/400-screenshot-main.png</image>
</screenshot>
</screenshots>
-->
<url type="homepage">http://glabels.org/</url>
<url type="bugtracker">https://github.com/jimevins/glabels-qt/issues</url>
<update_contact>evins_at_snaught.com</update_contact>
</component>
+11
View File
@@ -0,0 +1,11 @@
[Desktop Entry]
Name=gLabels Label Designer 4
Comment=Create labels, business cards and media covers
Keywords=label;card;print;office;barcode;
Exec=glabels-qt %F
Icon=glabels
Terminal=false
Type=Application
Categories=Office;
StartupNotify=true
MimeType=application/x-glabels;
+9
View File
@@ -0,0 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<mime-info xmlns="http://www.freedesktop.org/standards/shared-mime-info">
<mime-type type="application/x-glabels">
<comment>gLabels Project File</comment>
<sub-class-of type="application/xml"/>
<generic-icon name="x-glabels-project"/>
<glob pattern="*.glabels"/>
</mime-type>
</mime-info>
+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

+61
View File
@@ -0,0 +1,61 @@
cmake_minimum_required (VERSION 2.8.12)
###############################################################################
# gLabels templates subproject
###############################################################################
project (templates)
#=======================================
# Template Files
#=======================================
set (template_dtd glabels-3.0.dtd)
set (template_files
ascom-iso-templates.xml
avery-iso-templates.xml
avery-other-templates.xml
avery-us-templates.xml
begalabel-templates.xml
brother-other-templates.xml
cablelabel-templates.xml
canon-other-templates.xml
databecker-iso-templates.xml
dataline-iso-templates.xml
decadry-iso-templates.xml
desmat-templates.xml
dymo-other-templates.xml
endisch-templates.xml
geha-iso-templates.xml
hama-iso-templates.xml
herma-iso-templates.xml
hisago-templates.xml
igepa-templates.xml
jac-iso-templates.xml
maco-us-templates.xml
mayspies-templates.xml
meritline-us-templates.xml
microapp-templates.xml
misc-iso-templates.xml
misc-other-templates.xml
misc-us-templates.xml
online-templates.xml
pearl-iso-templates.xml
rayfilm-templates.xml
sheetlabels-us-templates.xml
uline-us-templates.xml
worldlabel-us-templates.xml
zweckform-iso-templates.xml
)
set (other_db_files
categories.xml
paper-sizes.xml
vendors.xml
)
#=======================================
# Install
#=======================================
install (FILES ${template_dtd} DESTINATION share/glabels-qt/templates)
install (FILES ${template_files} DESTINATION share/glabels-qt/templates)
install (FILES ${other_db_files} DESTINATION share/glabels-qt/templates)