Change project structure for support libs.
--HG-- branch : feature
This commit is contained in:
parent
8f281a31c2
commit
1e99fb68c1
218
Valentina.pro
218
Valentina.pro
|
@ -1,216 +1,2 @@
|
||||||
#-------------------------------------------------
|
TEMPLATE = subdirs
|
||||||
#
|
SUBDIRS = src
|
||||||
# Project created by QtCreator 2013-06-18T12:36:43
|
|
||||||
#
|
|
||||||
#-------------------------------------------------
|
|
||||||
|
|
||||||
# Use out-of-source builds (shadow builds)
|
|
||||||
|
|
||||||
QT += core gui widgets xml svg printsupport xmlpatterns
|
|
||||||
|
|
||||||
TEMPLATE = app
|
|
||||||
|
|
||||||
TARGET = valentina
|
|
||||||
|
|
||||||
CONFIG -= debug_and_release debug_and_release_target
|
|
||||||
CONFIG += c++11
|
|
||||||
|
|
||||||
#DEFINES += ...
|
|
||||||
|
|
||||||
# directory for executable file
|
|
||||||
DESTDIR = bin
|
|
||||||
|
|
||||||
# files created moc
|
|
||||||
MOC_DIR = moc
|
|
||||||
|
|
||||||
# objecs files
|
|
||||||
OBJECTS_DIR = obj
|
|
||||||
|
|
||||||
# files created rcc
|
|
||||||
RCC_DIR = rcc
|
|
||||||
|
|
||||||
# files created uic
|
|
||||||
UI_DIR = uic
|
|
||||||
|
|
||||||
include(src/src.pri)
|
|
||||||
include(src/container/container.pri)
|
|
||||||
include(src/dialogs/dialogs.pri)
|
|
||||||
include(src/exception/exception.pri)
|
|
||||||
include(src/geometry/geometry.pri)
|
|
||||||
include(src/tools/tools.pri)
|
|
||||||
include(src/widgets/widgets.pri)
|
|
||||||
include(src/xml/xml.pri)
|
|
||||||
|
|
||||||
RESOURCES += \
|
|
||||||
share/resources/icon.qrc \
|
|
||||||
share/resources/cursor.qrc \
|
|
||||||
share/resources/theme.qrc \
|
|
||||||
share/resources/schema.qrc
|
|
||||||
|
|
||||||
OTHER_FILES += share/resources/valentina.rc \
|
|
||||||
share/resources/icon/64x64/icon64x64.ico
|
|
||||||
|
|
||||||
TRANSLATIONS += share/translations/valentina.ts \
|
|
||||||
share/translations/valentina_ru.ts \
|
|
||||||
share/translations/valentina_uk.ts \
|
|
||||||
share/translations/valentina_de.ts \
|
|
||||||
share/translations/valentina_cs.ts \
|
|
||||||
share/translations/valentina_he_IL.ts \
|
|
||||||
share/translations/valentina_fr.ts
|
|
||||||
|
|
||||||
unix {
|
|
||||||
QMAKE_CXX = ccache g++
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG += precompile_header
|
|
||||||
# Precompiled headers (PCH)
|
|
||||||
PRECOMPILED_HEADER = src/stable.h
|
|
||||||
win32-msvc* {
|
|
||||||
PRECOMPILED_SOURCE = src/stable.cpp
|
|
||||||
}
|
|
||||||
|
|
||||||
CONFIG(debug, debug|release){
|
|
||||||
# Debug
|
|
||||||
unix {
|
|
||||||
*-g++{
|
|
||||||
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
|
||||||
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
|
||||||
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \
|
|
||||||
-isystem "$${RCC_DIR}" \
|
|
||||||
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
|
|
||||||
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
|
|
||||||
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
|
|
||||||
-Wformat=2 -Wimport \
|
|
||||||
-Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \
|
|
||||||
-Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \
|
|
||||||
-Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \
|
|
||||||
-Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\
|
|
||||||
-Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3
|
|
||||||
-ftrapv
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
*-g++{#Don't use additional GCC keys on Windows system.
|
|
||||||
QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}else{
|
|
||||||
# Release
|
|
||||||
*-g++{
|
|
||||||
QMAKE_CXXFLAGS += -O2
|
|
||||||
}
|
|
||||||
|
|
||||||
DEFINES += QT_NO_DEBUG_OUTPUT
|
|
||||||
}
|
|
||||||
|
|
||||||
message(Qt version: $$[QT_VERSION])
|
|
||||||
message(Qt is installed in $$[QT_INSTALL_PREFIX])
|
|
||||||
message(Qt resources can be found in the following locations:)
|
|
||||||
message(Documentation: $$[QT_INSTALL_DOCS])
|
|
||||||
message(Header files: $$[QT_INSTALL_HEADERS])
|
|
||||||
message(Libraries: $$[QT_INSTALL_LIBS])
|
|
||||||
message(Binary files (executables): $$[QT_INSTALL_BINS])
|
|
||||||
message(Plugins: $$[QT_INSTALL_PLUGINS])
|
|
||||||
message(Data files: $$[QT_INSTALL_DATA])
|
|
||||||
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
|
|
||||||
message(Settings: $$[QT_INSTALL_SETTINGS])
|
|
||||||
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
|
||||||
|
|
||||||
win32:RC_FILE = share/resources/valentina.rc
|
|
||||||
|
|
||||||
# Remove generated files at cleaning
|
|
||||||
QMAKE_DISTCLEAN += $${DESTDIR}/* \
|
|
||||||
$${OBJECTS_DIR}/* \
|
|
||||||
$${UI_DIR}/* \
|
|
||||||
$${MOC_DIR}/* \
|
|
||||||
$${RCC_DIR}/* \
|
|
||||||
$$PWD/share/translations/valentina_*.qm
|
|
||||||
|
|
||||||
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \
|
|
||||||
share/translations/valentina_uk.qm \
|
|
||||||
share/translations/valentina_de.qm \
|
|
||||||
share/translations/valentina_cs.qm \
|
|
||||||
share/translations/valentina_he_IL.qm \
|
|
||||||
share/translations/valentina_fr.qm
|
|
||||||
|
|
||||||
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst
|
|
||||||
|
|
||||||
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
|
|
||||||
|
|
||||||
unix {
|
|
||||||
#VARIABLES
|
|
||||||
isEmpty(PREFIX) {
|
|
||||||
PREFIX = /usr
|
|
||||||
}
|
|
||||||
BINDIR = $$PREFIX/bin
|
|
||||||
DATADIR =$$PREFIX/share
|
|
||||||
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
|
||||||
#MAKE INSTALL
|
|
||||||
target.path = $$BINDIR
|
|
||||||
desktop.path = $$DATADIR/applications/
|
|
||||||
desktop.files += dist/$${TARGET}.desktop
|
|
||||||
pixmaps.path = $$DATADIR/pixmaps/
|
|
||||||
pixmaps.files += dist/$${TARGET}.png
|
|
||||||
translations.path = $$DATADIR/$${TARGET}/translations/
|
|
||||||
translations.files = $$INSTALL_TRANSLATIONS
|
|
||||||
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
|
||||||
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
|
||||||
individual.path = $$DATADIR/$${TARGET}/tables/individual/
|
|
||||||
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS
|
|
||||||
INSTALLS += target \
|
|
||||||
desktop \
|
|
||||||
pixmaps \
|
|
||||||
translations \
|
|
||||||
standard \
|
|
||||||
individual
|
|
||||||
}
|
|
||||||
|
|
||||||
!isEmpty(TRANSLATIONS): {
|
|
||||||
for(_translation_name, TRANSLATIONS) {
|
|
||||||
_translation_name_qm = $$section(_translation_name,".", 0, 0).qm
|
|
||||||
|
|
||||||
system($$shell_path($$[QT_INSTALL_BINS]/lrelease) $$shell_path($$PWD/$$_translation_name) -qm $$shell_path($$PWD/$$_translation_name_qm))
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
# Copies the given files to the destination directory
|
|
||||||
defineTest(copyToDestdir) {
|
|
||||||
files = $$1
|
|
||||||
DDIR = $$2
|
|
||||||
mkpath($$DDIR)
|
|
||||||
|
|
||||||
for(FILE, files) {
|
|
||||||
|
|
||||||
# Replace slashes in paths with backslashes for Windows
|
|
||||||
win32{
|
|
||||||
FILE ~= s,/,\\,g
|
|
||||||
DDIR ~= s,/,\\,g
|
|
||||||
}
|
|
||||||
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
|
||||||
}
|
|
||||||
|
|
||||||
export(QMAKE_POST_LINK)
|
|
||||||
}
|
|
||||||
|
|
||||||
for(DIR, INSTALL_TRANSLATIONS) {
|
|
||||||
#add these absolute paths to a variable which
|
|
||||||
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
||||||
tr_path += $$PWD/$$DIR
|
|
||||||
}
|
|
||||||
|
|
||||||
copyToDestdir($$tr_path, $$shell_path($$OUT_PWD/$$DESTDIR/translations))
|
|
||||||
|
|
||||||
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
|
||||||
#add these absolute paths to a variable which
|
|
||||||
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
||||||
st_path += $$PWD/$$DIR
|
|
||||||
}
|
|
||||||
|
|
||||||
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
|
|
||||||
|
|
||||||
for(DIR, INSTALL_INDIVIDUAL_MEASHUREMENTS) {
|
|
||||||
#add these absolute paths to a variable which
|
|
||||||
#ends up as 'mkcommands = path1 path2 path3 ...'
|
|
||||||
ind_path += $$PWD/$$DIR
|
|
||||||
}
|
|
||||||
|
|
||||||
copyToDestdir($$ind_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/individual))
|
|
||||||
|
|
27
dist/copyright_template.txt
vendored
Normal file
27
dist/copyright_template.txt
vendored
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
/************************************************************************
|
||||||
|
**
|
||||||
|
** @file %FILENAME%
|
||||||
|
** @author Roman Telezhinsky <dismine@gmail.com>
|
||||||
|
** @date %DAY% %MONTH%, %YEAR%
|
||||||
|
**
|
||||||
|
** @brief
|
||||||
|
** @copyright
|
||||||
|
** This source code is part of the Valentine project, a pattern making
|
||||||
|
** program, whose allow create and modeling patterns of clothing.
|
||||||
|
** Copyright (C) 2013 Valentina project
|
||||||
|
** <https://bitbucket.org/dismine/valentina> All Rights Reserved.
|
||||||
|
**
|
||||||
|
** Valentina is free software: you can redistribute it and/or modify
|
||||||
|
** it under the terms of the GNU General Public License as published by
|
||||||
|
** the Free Software Foundation, either version 3 of the License, or
|
||||||
|
** (at your option) any later version.
|
||||||
|
**
|
||||||
|
** Valentina is distributed in the hope that it will be useful,
|
||||||
|
** but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
** GNU General Public License for more details.
|
||||||
|
**
|
||||||
|
** You should have received a copy of the GNU General Public License
|
||||||
|
** along with Valentina. If not, see <http://www.gnu.org/licenses/>.
|
||||||
|
**
|
||||||
|
*************************************************************************/
|
234
src/app/app.pri
Normal file
234
src/app/app.pri
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2013-06-18T12:36:43
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
# Use out-of-source builds (shadow builds)
|
||||||
|
|
||||||
|
QT += core gui widgets xml svg printsupport xmlpatterns
|
||||||
|
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
TARGET = valentina
|
||||||
|
|
||||||
|
CONFIG -= debug_and_release debug_and_release_target
|
||||||
|
CONFIG += c++11
|
||||||
|
|
||||||
|
#DEFINES += ...
|
||||||
|
|
||||||
|
# directory for executable file
|
||||||
|
DESTDIR = bin
|
||||||
|
|
||||||
|
# files created moc
|
||||||
|
MOC_DIR = moc
|
||||||
|
|
||||||
|
# objecs files
|
||||||
|
OBJECTS_DIR = obj
|
||||||
|
|
||||||
|
# files created rcc
|
||||||
|
RCC_DIR = rcc
|
||||||
|
|
||||||
|
# files created uic
|
||||||
|
UI_DIR = uic
|
||||||
|
|
||||||
|
include(src/app/container/container.pri)
|
||||||
|
include(src/app/dialogs/dialogs.pri)
|
||||||
|
include(src/app/exception/exception.pri)
|
||||||
|
include(src/app/geometry/geometry.pri)
|
||||||
|
include(src/app/tools/tools.pri)
|
||||||
|
include(src/app/widgets/widgets.pri)
|
||||||
|
include(src/app/xml/xml.pri)
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
src/app/main.cpp \
|
||||||
|
src/app/mainwindow.cpp \
|
||||||
|
src/app/tablewindow.cpp \
|
||||||
|
src/app/stable.cpp \
|
||||||
|
src/app/version.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
src/app/mainwindow.h \
|
||||||
|
src/app/options.h \
|
||||||
|
src/app/tablewindow.h \
|
||||||
|
src/app/stable.h \
|
||||||
|
src/app/version.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
src/app/mainwindow.ui \
|
||||||
|
src/app/tablewindow.ui
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
share/resources/icon.qrc \
|
||||||
|
share/resources/cursor.qrc \
|
||||||
|
share/resources/theme.qrc \
|
||||||
|
share/resources/schema.qrc
|
||||||
|
|
||||||
|
OTHER_FILES += share/resources/valentina.rc \
|
||||||
|
share/resources/icon/64x64/icon64x64.ico
|
||||||
|
|
||||||
|
TRANSLATIONS += share/translations/valentina.ts \
|
||||||
|
share/translations/valentina_ru.ts \
|
||||||
|
share/translations/valentina_uk.ts \
|
||||||
|
share/translations/valentina_de.ts \
|
||||||
|
share/translations/valentina_cs.ts \
|
||||||
|
share/translations/valentina_he_IL.ts \
|
||||||
|
share/translations/valentina_fr.ts
|
||||||
|
|
||||||
|
unix {
|
||||||
|
QMAKE_CXX = ccache g++
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG += precompile_header
|
||||||
|
# Precompiled headers (PCH)
|
||||||
|
PRECOMPILED_HEADER = src/stable.h
|
||||||
|
win32-msvc* {
|
||||||
|
PRECOMPILED_SOURCE = src/stable.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release){
|
||||||
|
# Debug
|
||||||
|
unix {
|
||||||
|
*-g++{
|
||||||
|
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
||||||
|
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
||||||
|
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \
|
||||||
|
-isystem "$${RCC_DIR}" \
|
||||||
|
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
|
||||||
|
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
|
||||||
|
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
|
||||||
|
-Wformat=2 -Wimport \
|
||||||
|
-Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \
|
||||||
|
-Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \
|
||||||
|
-Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \
|
||||||
|
-Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\
|
||||||
|
-Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3
|
||||||
|
-ftrapv
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
*-g++{#Don't use additional GCC keys on Windows system.
|
||||||
|
QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
# Release
|
||||||
|
*-g++{
|
||||||
|
QMAKE_CXXFLAGS += -O2
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
message(Qt version: $$[QT_VERSION])
|
||||||
|
message(Qt is installed in $$[QT_INSTALL_PREFIX])
|
||||||
|
message(Qt resources can be found in the following locations:)
|
||||||
|
message(Documentation: $$[QT_INSTALL_DOCS])
|
||||||
|
message(Header files: $$[QT_INSTALL_HEADERS])
|
||||||
|
message(Libraries: $$[QT_INSTALL_LIBS])
|
||||||
|
message(Binary files (executables): $$[QT_INSTALL_BINS])
|
||||||
|
message(Plugins: $$[QT_INSTALL_PLUGINS])
|
||||||
|
message(Data files: $$[QT_INSTALL_DATA])
|
||||||
|
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
|
||||||
|
message(Settings: $$[QT_INSTALL_SETTINGS])
|
||||||
|
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
||||||
|
|
||||||
|
win32:RC_FILE = share/resources/valentina.rc
|
||||||
|
|
||||||
|
# Remove generated files at cleaning
|
||||||
|
QMAKE_DISTCLEAN += $${DESTDIR}/* \
|
||||||
|
$${OBJECTS_DIR}/* \
|
||||||
|
$${UI_DIR}/* \
|
||||||
|
$${MOC_DIR}/* \
|
||||||
|
$${RCC_DIR}/* \
|
||||||
|
$$PWD/share/translations/valentina_*.qm
|
||||||
|
|
||||||
|
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \
|
||||||
|
share/translations/valentina_uk.qm \
|
||||||
|
share/translations/valentina_de.qm \
|
||||||
|
share/translations/valentina_cs.qm \
|
||||||
|
share/translations/valentina_he_IL.qm \
|
||||||
|
share/translations/valentina_fr.qm
|
||||||
|
|
||||||
|
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst
|
||||||
|
|
||||||
|
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
|
||||||
|
|
||||||
|
unix {
|
||||||
|
#VARIABLES
|
||||||
|
isEmpty(PREFIX) {
|
||||||
|
PREFIX = /usr
|
||||||
|
}
|
||||||
|
BINDIR = $$PREFIX/bin
|
||||||
|
DATADIR =$$PREFIX/share
|
||||||
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
||||||
|
#MAKE INSTALL
|
||||||
|
target.path = $$BINDIR
|
||||||
|
desktop.path = $$DATADIR/applications/
|
||||||
|
desktop.files += dist/$${TARGET}.desktop
|
||||||
|
pixmaps.path = $$DATADIR/pixmaps/
|
||||||
|
pixmaps.files += dist/$${TARGET}.png
|
||||||
|
translations.path = $$DATADIR/$${TARGET}/translations/
|
||||||
|
translations.files = $$INSTALL_TRANSLATIONS
|
||||||
|
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
||||||
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
||||||
|
individual.path = $$DATADIR/$${TARGET}/tables/individual/
|
||||||
|
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS
|
||||||
|
INSTALLS += target \
|
||||||
|
desktop \
|
||||||
|
pixmaps \
|
||||||
|
translations \
|
||||||
|
standard \
|
||||||
|
individual
|
||||||
|
}
|
||||||
|
|
||||||
|
!isEmpty(TRANSLATIONS): {
|
||||||
|
for(_translation_name, TRANSLATIONS) {
|
||||||
|
_translation_name_qm = $$section(_translation_name,".", 0, 0).qm
|
||||||
|
|
||||||
|
system($$shell_path($$[QT_INSTALL_BINS]/lrelease) $$shell_path($$PWD/$$_translation_name) -qm $$shell_path($$PWD/$$_translation_name_qm))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copies the given files to the destination directory
|
||||||
|
defineTest(copyToDestdir) {
|
||||||
|
files = $$1
|
||||||
|
DDIR = $$2
|
||||||
|
mkpath($$DDIR)
|
||||||
|
|
||||||
|
for(FILE, files) {
|
||||||
|
|
||||||
|
# Replace slashes in paths with backslashes for Windows
|
||||||
|
win32{
|
||||||
|
FILE ~= s,/,\\,g
|
||||||
|
DDIR ~= s,/,\\,g
|
||||||
|
}
|
||||||
|
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
||||||
|
}
|
||||||
|
|
||||||
|
export(QMAKE_POST_LINK)
|
||||||
|
}
|
||||||
|
|
||||||
|
for(DIR, INSTALL_TRANSLATIONS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
tr_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$tr_path, $$shell_path($$OUT_PWD/$$DESTDIR/translations))
|
||||||
|
|
||||||
|
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
st_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
|
||||||
|
|
||||||
|
for(DIR, INSTALL_INDIVIDUAL_MEASHUREMENTS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
ind_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$ind_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/individual))
|
||||||
|
|
234
src/app/app.pro
Normal file
234
src/app/app.pro
Normal file
|
@ -0,0 +1,234 @@
|
||||||
|
#-------------------------------------------------
|
||||||
|
#
|
||||||
|
# Project created by QtCreator 2013-06-18T12:36:43
|
||||||
|
#
|
||||||
|
#-------------------------------------------------
|
||||||
|
|
||||||
|
# Use out-of-source builds (shadow builds)
|
||||||
|
|
||||||
|
QT += core gui widgets xml svg printsupport xmlpatterns
|
||||||
|
|
||||||
|
TEMPLATE = app
|
||||||
|
|
||||||
|
TARGET = valentina
|
||||||
|
|
||||||
|
CONFIG -= debug_and_release debug_and_release_target
|
||||||
|
CONFIG += c++11
|
||||||
|
|
||||||
|
#DEFINES += ...
|
||||||
|
|
||||||
|
# directory for executable file
|
||||||
|
DESTDIR = bin
|
||||||
|
|
||||||
|
# files created moc
|
||||||
|
MOC_DIR = moc
|
||||||
|
|
||||||
|
# objecs files
|
||||||
|
OBJECTS_DIR = obj
|
||||||
|
|
||||||
|
# files created rcc
|
||||||
|
RCC_DIR = rcc
|
||||||
|
|
||||||
|
# files created uic
|
||||||
|
UI_DIR = uic
|
||||||
|
|
||||||
|
include(container/container.pri)
|
||||||
|
include(dialogs/dialogs.pri)
|
||||||
|
include(exception/exception.pri)
|
||||||
|
include(geometry/geometry.pri)
|
||||||
|
include(tools/tools.pri)
|
||||||
|
include(widgets/widgets.pri)
|
||||||
|
include(xml/xml.pri)
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
main.cpp \
|
||||||
|
mainwindow.cpp \
|
||||||
|
tablewindow.cpp \
|
||||||
|
stable.cpp \
|
||||||
|
version.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
mainwindow.h \
|
||||||
|
options.h \
|
||||||
|
tablewindow.h \
|
||||||
|
stable.h \
|
||||||
|
version.h
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
mainwindow.ui \
|
||||||
|
tablewindow.ui
|
||||||
|
|
||||||
|
RESOURCES += \
|
||||||
|
share/resources/icon.qrc \
|
||||||
|
share/resources/cursor.qrc \
|
||||||
|
share/resources/theme.qrc \
|
||||||
|
share/resources/schema.qrc
|
||||||
|
|
||||||
|
OTHER_FILES += share/resources/valentina.rc \
|
||||||
|
share/resources/icon/64x64/icon64x64.ico
|
||||||
|
|
||||||
|
TRANSLATIONS += share/translations/valentina.ts \
|
||||||
|
share/translations/valentina_ru.ts \
|
||||||
|
share/translations/valentina_uk.ts \
|
||||||
|
share/translations/valentina_de.ts \
|
||||||
|
share/translations/valentina_cs.ts \
|
||||||
|
share/translations/valentina_he_IL.ts \
|
||||||
|
share/translations/valentina_fr.ts
|
||||||
|
|
||||||
|
unix {
|
||||||
|
QMAKE_CXX = ccache g++
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG += precompile_header
|
||||||
|
# Precompiled headers (PCH)
|
||||||
|
PRECOMPILED_HEADER = stable.h
|
||||||
|
win32-msvc* {
|
||||||
|
PRECOMPILED_SOURCE = stable.cpp
|
||||||
|
}
|
||||||
|
|
||||||
|
CONFIG(debug, debug|release){
|
||||||
|
# Debug
|
||||||
|
unix {
|
||||||
|
*-g++{
|
||||||
|
QMAKE_CXXFLAGS += -isystem "/usr/include/qt5" -isystem "/usr/include/qt5/QtWidgets" \
|
||||||
|
-isystem "/usr/include/qt5/QtXml" -isystem "/usr/include/qt5/QtGui" \
|
||||||
|
-isystem "/usr/include/qt5/QtCore" -isystem "$${UI_DIR}" -isystem "$${MOC_DIR}" \
|
||||||
|
-isystem "$${RCC_DIR}" \
|
||||||
|
-O0 -Wall -Wextra -pedantic -Weffc++ -Woverloaded-virtual -Wctor-dtor-privacy \
|
||||||
|
-Wnon-virtual-dtor -Wold-style-cast -Wconversion -Winit-self -Wstack-protector \
|
||||||
|
-Wunreachable-code -Wcast-align -Wcast-qual -Wdisabled-optimization -Wfloat-equal \
|
||||||
|
-Wformat=2 -Wimport \
|
||||||
|
-Winvalid-pch -Wunsafe-loop-optimizations -Wlong-long -Wmissing-format-attribute \
|
||||||
|
-Wmissing-include-dirs -Wpacked -Wredundant-decls -Winline \
|
||||||
|
-Wswitch-default -Wswitch-enum -Wuninitialized -Wvariadic-macros \
|
||||||
|
-Wlogical-op -Wnoexcept -Wmissing-noreturn -Wpointer-arith\
|
||||||
|
-Wstrict-null-sentinel -Wstrict-overflow=5 -Wundef -Wno-unused -gdwarf-3
|
||||||
|
-ftrapv
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
*-g++{#Don't use additional GCC keys on Windows system.
|
||||||
|
QMAKE_CXXFLAGS += -O0 -Wall -Wextra -pedantic
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}else{
|
||||||
|
# Release
|
||||||
|
*-g++{
|
||||||
|
QMAKE_CXXFLAGS += -O2
|
||||||
|
}
|
||||||
|
|
||||||
|
DEFINES += QT_NO_DEBUG_OUTPUT
|
||||||
|
}
|
||||||
|
|
||||||
|
message(Qt version: $$[QT_VERSION])
|
||||||
|
message(Qt is installed in $$[QT_INSTALL_PREFIX])
|
||||||
|
message(Qt resources can be found in the following locations:)
|
||||||
|
message(Documentation: $$[QT_INSTALL_DOCS])
|
||||||
|
message(Header files: $$[QT_INSTALL_HEADERS])
|
||||||
|
message(Libraries: $$[QT_INSTALL_LIBS])
|
||||||
|
message(Binary files (executables): $$[QT_INSTALL_BINS])
|
||||||
|
message(Plugins: $$[QT_INSTALL_PLUGINS])
|
||||||
|
message(Data files: $$[QT_INSTALL_DATA])
|
||||||
|
message(Translation files: $$[QT_INSTALL_TRANSLATIONS])
|
||||||
|
message(Settings: $$[QT_INSTALL_SETTINGS])
|
||||||
|
message(Examples: $$[QT_INSTALL_EXAMPLES])
|
||||||
|
|
||||||
|
win32:RC_FILE = share/resources/valentina.rc
|
||||||
|
|
||||||
|
# Remove generated files at cleaning
|
||||||
|
QMAKE_DISTCLEAN += $${DESTDIR}/* \
|
||||||
|
$${OBJECTS_DIR}/* \
|
||||||
|
$${UI_DIR}/* \
|
||||||
|
$${MOC_DIR}/* \
|
||||||
|
$${RCC_DIR}/* \
|
||||||
|
$$PWD/share/translations/valentina_*.qm
|
||||||
|
|
||||||
|
INSTALL_TRANSLATIONS += share/translations/valentina_ru.qm \
|
||||||
|
share/translations/valentina_uk.qm \
|
||||||
|
share/translations/valentina_de.qm \
|
||||||
|
share/translations/valentina_cs.qm \
|
||||||
|
share/translations/valentina_he_IL.qm \
|
||||||
|
share/translations/valentina_fr.qm
|
||||||
|
|
||||||
|
INSTALL_STANDARD_MEASHUREMENTS += share/tables/standard/GOST_man_ru.vst
|
||||||
|
|
||||||
|
INSTALL_INDIVIDUAL_MEASHUREMENTS += share/tables/individual/indivindual_ru.vit
|
||||||
|
|
||||||
|
unix {
|
||||||
|
#VARIABLES
|
||||||
|
isEmpty(PREFIX) {
|
||||||
|
PREFIX = /usr
|
||||||
|
}
|
||||||
|
BINDIR = $$PREFIX/bin
|
||||||
|
DATADIR =$$PREFIX/share
|
||||||
|
DEFINES += DATADIR=\\\"$$DATADIR\\\" PKGDATADIR=\\\"$$PKGDATADIR\\\"
|
||||||
|
#MAKE INSTALL
|
||||||
|
target.path = $$BINDIR
|
||||||
|
desktop.path = $$DATADIR/applications/
|
||||||
|
desktop.files += dist/$${TARGET}.desktop
|
||||||
|
pixmaps.path = $$DATADIR/pixmaps/
|
||||||
|
pixmaps.files += dist/$${TARGET}.png
|
||||||
|
translations.path = $$DATADIR/$${TARGET}/translations/
|
||||||
|
translations.files = $$INSTALL_TRANSLATIONS
|
||||||
|
standard.path = $$DATADIR/$${TARGET}/tables/standard/
|
||||||
|
standard.files = $$INSTALL_STANDARD_MEASHUREMENTS
|
||||||
|
individual.path = $$DATADIR/$${TARGET}/tables/individual/
|
||||||
|
individual.files = $$INSTALL_INDIVIDUAL_MEASHUREMENTS
|
||||||
|
INSTALLS += target \
|
||||||
|
desktop \
|
||||||
|
pixmaps \
|
||||||
|
translations \
|
||||||
|
standard \
|
||||||
|
individual
|
||||||
|
}
|
||||||
|
|
||||||
|
!isEmpty(TRANSLATIONS): {
|
||||||
|
for(_translation_name, TRANSLATIONS) {
|
||||||
|
_translation_name_qm = $$section(_translation_name,".", 0, 0).qm
|
||||||
|
|
||||||
|
system($$shell_path($$[QT_INSTALL_BINS]/lrelease) $$shell_path($$PWD/$$_translation_name) -qm $$shell_path($$PWD/$$_translation_name_qm))
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
# Copies the given files to the destination directory
|
||||||
|
defineTest(copyToDestdir) {
|
||||||
|
files = $$1
|
||||||
|
DDIR = $$2
|
||||||
|
mkpath($$DDIR)
|
||||||
|
|
||||||
|
for(FILE, files) {
|
||||||
|
|
||||||
|
# Replace slashes in paths with backslashes for Windows
|
||||||
|
win32{
|
||||||
|
FILE ~= s,/,\\,g
|
||||||
|
DDIR ~= s,/,\\,g
|
||||||
|
}
|
||||||
|
QMAKE_POST_LINK += $$QMAKE_COPY $$quote($$FILE) $$quote($$DDIR) $$escape_expand(\\n\\t)
|
||||||
|
}
|
||||||
|
|
||||||
|
export(QMAKE_POST_LINK)
|
||||||
|
}
|
||||||
|
|
||||||
|
for(DIR, INSTALL_TRANSLATIONS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
tr_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$tr_path, $$shell_path($$OUT_PWD/$$DESTDIR/translations))
|
||||||
|
|
||||||
|
for(DIR, INSTALL_STANDARD_MEASHUREMENTS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
st_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$st_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/standard))
|
||||||
|
|
||||||
|
for(DIR, INSTALL_INDIVIDUAL_MEASHUREMENTS) {
|
||||||
|
#add these absolute paths to a variable which
|
||||||
|
#ends up as 'mkcommands = path1 path2 path3 ...'
|
||||||
|
ind_path += $$PWD/$$DIR
|
||||||
|
}
|
||||||
|
|
||||||
|
copyToDestdir($$ind_path, $$shell_path($$OUT_PWD/$$DESTDIR/tables/individual))
|
||||||
|
|
11
src/app/container/container.pri
Normal file
11
src/app/container/container.pri
Normal file
|
@ -0,0 +1,11 @@
|
||||||
|
SOURCES += \
|
||||||
|
container/vcontainer.cpp \
|
||||||
|
container/calculator.cpp \
|
||||||
|
container/vmeasurement.cpp \
|
||||||
|
container/vincrement.cpp
|
||||||
|
|
||||||
|
HEADERS += \
|
||||||
|
container/vcontainer.h \
|
||||||
|
container/calculator.h \
|
||||||
|
container/vmeasurement.h \
|
||||||
|
container/vincrement.h
|
90
src/app/dialogs/dialogs.pri
Normal file
90
src/app/dialogs/dialogs.pri
Normal file
|
@ -0,0 +1,90 @@
|
||||||
|
HEADERS += \
|
||||||
|
dialogs/dialogs.h \
|
||||||
|
dialogs/tools/dialogtriangle.h \
|
||||||
|
dialogs/tools/dialogtool.h \
|
||||||
|
dialogs/tools/dialogsplinepath.h \
|
||||||
|
dialogs/tools/dialogspline.h \
|
||||||
|
dialogs/tools/dialogsinglepoint.h \
|
||||||
|
dialogs/tools/dialogshoulderpoint.h \
|
||||||
|
dialogs/tools/dialogpointofintersection.h \
|
||||||
|
dialogs/tools/dialogpointofcontact.h \
|
||||||
|
dialogs/tools/dialognormal.h \
|
||||||
|
dialogs/tools/dialoglineintersect.h \
|
||||||
|
dialogs/tools/dialogline.h \
|
||||||
|
dialogs/tools/dialogheight.h \
|
||||||
|
dialogs/tools/dialogendline.h \
|
||||||
|
dialogs/tools/dialogdetail.h \
|
||||||
|
dialogs/tools/dialogbisector.h \
|
||||||
|
dialogs/tools/dialogarc.h \
|
||||||
|
dialogs/tools/dialogalongline.h \
|
||||||
|
dialogs/tools/dialogcutspline.h \
|
||||||
|
dialogs/tools/dialogcutsplinepath.h \
|
||||||
|
dialogs/tools/dialoguniondetails.h \
|
||||||
|
dialogs/tools/dialogcutarc.h \
|
||||||
|
dialogs/app/dialogincrements.h \
|
||||||
|
dialogs/app/dialoghistory.h \
|
||||||
|
dialogs/app/configdialog.h \
|
||||||
|
dialogs/app/pages.h \
|
||||||
|
dialogs/app/dialogpatternproperties.h \
|
||||||
|
dialogs/app/dialogmeasurements.h \
|
||||||
|
dialogs/app/dialogstandardmeasurements.h \
|
||||||
|
dialogs/app/dialogindividualmeasurements.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
dialogs/tools/dialogtriangle.cpp \
|
||||||
|
dialogs/tools/dialogtool.cpp \
|
||||||
|
dialogs/tools/dialogsplinepath.cpp \
|
||||||
|
dialogs/tools/dialogspline.cpp \
|
||||||
|
dialogs/tools/dialogsinglepoint.cpp \
|
||||||
|
dialogs/tools/dialogshoulderpoint.cpp \
|
||||||
|
dialogs/tools/dialogpointofintersection.cpp \
|
||||||
|
dialogs/tools/dialogpointofcontact.cpp \
|
||||||
|
dialogs/tools/dialognormal.cpp \
|
||||||
|
dialogs/tools/dialoglineintersect.cpp \
|
||||||
|
dialogs/tools/dialogline.cpp \
|
||||||
|
dialogs/tools/dialogheight.cpp \
|
||||||
|
dialogs/tools/dialogendline.cpp \
|
||||||
|
dialogs/tools/dialogdetail.cpp \
|
||||||
|
dialogs/tools/dialogbisector.cpp \
|
||||||
|
dialogs/tools/dialogarc.cpp \
|
||||||
|
dialogs/tools/dialogalongline.cpp \
|
||||||
|
dialogs/tools/dialogcutspline.cpp \
|
||||||
|
dialogs/tools/dialogcutsplinepath.cpp \
|
||||||
|
dialogs/tools/dialoguniondetails.cpp \
|
||||||
|
dialogs/tools/dialogcutarc.cpp \
|
||||||
|
dialogs/app/dialogincrements.cpp \
|
||||||
|
dialogs/app/dialoghistory.cpp \
|
||||||
|
dialogs/app/configdialog.cpp \
|
||||||
|
dialogs/app/pages.cpp \
|
||||||
|
dialogs/app/dialogpatternproperties.cpp \
|
||||||
|
dialogs/app/dialogmeasurements.cpp \
|
||||||
|
dialogs/app/dialogstandardmeasurements.cpp \
|
||||||
|
dialogs/app/dialogindividualmeasurements.cpp
|
||||||
|
|
||||||
|
FORMS += \
|
||||||
|
dialogs/tools/dialogtriangle.ui \
|
||||||
|
dialogs/tools/dialogsplinepath.ui \
|
||||||
|
dialogs/tools/dialogspline.ui \
|
||||||
|
dialogs/tools/dialogsinglepoint.ui \
|
||||||
|
dialogs/tools/dialogshoulderpoint.ui \
|
||||||
|
dialogs/tools/dialogpointofintersection.ui \
|
||||||
|
dialogs/tools/dialogpointofcontact.ui \
|
||||||
|
dialogs/tools/dialognormal.ui \
|
||||||
|
dialogs/tools/dialoglineintersect.ui \
|
||||||
|
dialogs/tools/dialogline.ui \
|
||||||
|
dialogs/tools/dialogheight.ui \
|
||||||
|
dialogs/tools/dialogendline.ui \
|
||||||
|
dialogs/tools/dialogdetail.ui \
|
||||||
|
dialogs/tools/dialogbisector.ui \
|
||||||
|
dialogs/tools/dialogarc.ui \
|
||||||
|
dialogs/tools/dialogalongline.ui \
|
||||||
|
dialogs/tools/dialogcutspline.ui \
|
||||||
|
dialogs/tools/dialogcutsplinepath.ui \
|
||||||
|
dialogs/tools/dialoguniondetails.ui \
|
||||||
|
dialogs/tools/dialogcutarc.ui \
|
||||||
|
dialogs/app/dialogincrements.ui \
|
||||||
|
dialogs/app/dialoghistory.ui \
|
||||||
|
dialogs/app/dialogpatternproperties.ui \
|
||||||
|
dialogs/app/dialogmeasurements.ui \
|
||||||
|
dialogs/app/dialogstandardmeasurements.ui \
|
||||||
|
dialogs/app/dialogindividualmeasurements.ui
|
15
src/app/exception/exception.pri
Normal file
15
src/app/exception/exception.pri
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
HEADERS += \
|
||||||
|
exception/vexceptionobjecterror.h \
|
||||||
|
exception/vexceptionemptyparameter.h \
|
||||||
|
exception/vexceptionconversionerror.h \
|
||||||
|
exception/vexceptionbadid.h \
|
||||||
|
exception/vexception.h \
|
||||||
|
exception/vexceptionwrongid.h
|
||||||
|
|
||||||
|
SOURCES += \
|
||||||
|
exception/vexceptionobjecterror.cpp \
|
||||||
|
exception/vexceptionemptyparameter.cpp \
|
||||||
|
exception/vexceptionconversionerror.cpp \
|
||||||
|
exception/vexceptionbadid.cpp \
|
||||||
|
exception/vexception.cpp \
|
||||||
|
exception/vexceptionwrongid.cpp
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user