summaryrefslogtreecommitdiff
path: root/freshmemory.pro
blob: 872af644df9e241e30c481f7a59986db80bd645d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
TEMPLATE = app
QMAKE_CXXFLAGS += -std=c++11
QT += widgets

HEADERS += \
    src/main.h \
    src/version.h \
    src/strings.h \
    src/utils/RandomGenerator.h \
    src/utils/IRandomGenerator.h \
    src/utils/TimeProvider.h \
    src/dictionary/Card.h \
    src/dictionary/IDictionary.h \
    src/dictionary/Dictionary.h \
    src/dictionary/DicRecord.h \
    src/dictionary/Field.h \
    src/dictionary/CardPack.h \
    src/dictionary/ICardPack.h \
    src/dictionary/DictionaryReader.h \
    src/dictionary/DictionaryWriter.h \
    src/dictionary/DicCsvWriter.h \
    src/dictionary/TreeItem.h \
    src/main-view/AppModel.h \
    src/main-view/DictTableModel.h \
    src/main-view/DictTableView.h \
    src/main-view/DictTableDelegate.h \
    src/main-view/DictTableDelegatePainter.h \
    src/main-view/RecordEditor.h \
    src/main-view/FieldContentCodec.h \
    src/main-view/FieldContentPainter.h \
    src/main-view/MainWindow.h \
    src/main-view/DictionaryTabWidget.h \
    src/main-view/FindPanel.h \
    src/main-view/PacksTreeModel.h \
    src/main-view/AboutDialog.h \
    src/main-view/RecentFilesManager.h \
    src/main-view/LanguageMenu.h \
    src/main-view/CardPreview.h \
    src/main-view/WelcomeScreen.h \
    src/export-import/CsvDialog.h \
    src/export-import/CsvImportDialog.h \
    src/export-import/CsvExportDialog.h \
    src/export-import/CsvData.h \
    src/study/CardSideView.h \
    src/study/IStudyModel.h \
    src/study/IStudyWindow.h \
    src/study/WordDrillModel.h \
    src/study/WordDrillWindow.h \
    src/study/SpacedRepetitionModel.h \
    src/study/SpacedRepetitionWindow.h \
    src/study/StudyRecord.h \
    src/study/StudyFileWriter.h \
    src/study/StudyFileReader.h \
    src/study/StudySettings.h \
    src/study/CardsStatusBar.h \
    src/study/NumberFrame.h \
    src/study/WarningPanel.h \
    src/dic-options/DictionaryOptionsDialog.h \
    src/dic-options/FieldsPage.h \
    src/dic-options/FieldsListModel.h \
    src/dic-options/PacksPage.h \
    src/dic-options/PacksListModel.h \
    src/dic-options/PackFieldsListModel.h \
    src/dic-options/FieldsView.h \
    src/dic-options/FieldStyleDelegate.h \
    src/dic-options/FieldsPreviewModel.h \
    src/dic-options/UnusedFieldsListModel.h \
    src/dic-options/PackFieldsView.h \
    src/dic-options/DraggableListModel.h \
    src/field-styles/FieldStyle.h \
    src/field-styles/FieldStyleFactory.h \
    src/settings/FontColorSettingsDialog.h \
    src/settings/ColorBox.h \
    src/settings/StudySettingsDialog.h \
    src/settings/StylesListModel.h \
    src/settings/StylePreviewModel.h \
    src/dictionary/DicCsvReader.h \
    src/main-view/CardFilterModel.h \
    src/main-view/UndoCommands.h \
    src/study/CardEditDialog.h \
    src/statistics/StatisticsView.h \
    src/statistics/BaseStatPage.h \
    src/statistics/TimeChartPage.h \
    src/statistics/StudiedPage.h \
    src/statistics/ScheduledPage.h \
    src/statistics/ProgressPage.h \
    src/charts/Chart.h \
    src/charts/TimeChart.h \
    src/charts/DataPoint.h \
    src/charts/ChartScene.h \
    src/charts/ChartView.h \
    src/charts/ChartAxes.h \
    src/charts/ChartDataLine.h \
    src/charts/ChartMarker.h \
    src/charts/ChartToolTip.h \
    src/charts/PieChart.h \
    src/charts/PieChartScene.h \
    src/charts/PieRound.h \
    src/charts/PieLegend.h
    
SOURCES += \
	src/main.cpp \
    src/version.cpp \
    src/strings.cpp \
    src/utils/RandomGenerator.cpp \
    src/utils/TimeProvider.cpp \
    src/dictionary/Card.cpp \
    src/dictionary/Dictionary.cpp \
    src/dictionary/DicRecord.cpp \
    src/dictionary/Field.cpp \
    src/dictionary/CardPack.cpp \
    src/dictionary/ICardPack.cpp \
    src/dictionary/IDictionary.cpp \
    src/dictionary/DictionaryReader.cpp \
    src/dictionary/DictionaryWriter.cpp \
    src/dictionary/DicCsvWriter.cpp \
    src/main-view/AppModel.cpp \
    src/main-view/DictTableModel.cpp \
    src/main-view/DictTableView.cpp \
    src/main-view/DictTableDelegate.cpp \
    src/main-view/DictTableDelegatePainter.cpp \
    src/main-view/RecordEditor.cpp \
    src/main-view/FieldContentCodec.cpp \
    src/main-view/MainWindow.cpp \
    src/main-view/DictionaryTabWidget.cpp \
    src/main-view/FindPanel.cpp \
    src/main-view/PacksTreeModel.cpp \
    src/main-view/AboutDialog.cpp \
    src/main-view/RecentFilesManager.cpp \
    src/main-view/LanguageMenu.cpp \
    src/main-view/CardPreview.cpp \
    src/main-view/WelcomeScreen.cpp \
    src/export-import/CsvDialog.cpp \
    src/export-import/CsvImportDialog.cpp \
    src/export-import/CsvExportDialog.cpp \
    src/study/IStudyModel.cpp \
    src/study/CardSideView.cpp \
    src/study/WordDrillModel.cpp \
    src/study/WordDrillWindow.cpp \
    src/study/IStudyWindow.cpp \
    src/study/SpacedRepetitionModel.cpp \
    src/study/SpacedRepetitionWindow.cpp \
    src/study/StudyRecord.cpp \
    src/study/StudyFileWriter.cpp \
    src/study/StudyFileReader.cpp \
    src/study/StudySettings.cpp \
    src/study/CardsStatusBar.cpp \
    src/study/NumberFrame.cpp \
    src/study/WarningPanel.cpp \
    src/dic-options/DictionaryOptionsDialog.cpp \
    src/dic-options/FieldsPage.cpp \
    src/dic-options/FieldsListModel.cpp \
    src/dic-options/PacksPage.cpp \
    src/dic-options/PacksListModel.cpp \
    src/dic-options/PackFieldsListModel.cpp \
    src/dic-options/FieldsView.cpp \
    src/dic-options/FieldStyleDelegate.cpp \
    src/dic-options/FieldsPreviewModel.cpp \
    src/dic-options/UnusedFieldsListModel.cpp \
    src/dic-options/PackFieldsView.cpp \
    src/dic-options/DraggableListModel.cpp \
    src/field-styles/FieldStyle.cpp \
    src/field-styles/FieldStyleFactory.cpp \
    src/settings/FontColorSettingsDialog.cpp \
    src/settings/ColorBox.cpp \
    src/settings/StudySettingsDialog.cpp \
    src/settings/StylePreviewModel.cpp \
    src/dictionary/DicCsvReader.cpp \
    src/main-view/CardFilterModel.cpp \
    src/main-view/UndoCommands.cpp \
    src/study/CardEditDialog.cpp \
    src/statistics/StatisticsView.cpp \
    src/statistics/BaseStatPage.cpp \
    src/statistics/TimeChartPage.cpp \
    src/statistics/StudiedPage.cpp \
    src/statistics/ScheduledPage.cpp \
    src/statistics/ProgressPage.cpp \
    src/charts/Chart.cpp \
    src/charts/TimeChart.cpp \
    src/charts/ChartScene.cpp \
    src/charts/ChartView.cpp \
    src/charts/ChartAxes.cpp \
    src/charts/ChartDataLine.cpp \
    src/charts/ChartMarker.cpp \
    src/charts/ChartToolTip.cpp \
    src/charts/PieChart.cpp \
    src/charts/PieChartScene.cpp \
    src/charts/PieRound.cpp \
    src/charts/PieLegend.cpp
    
TRANSLATIONS = \
	tr/freshmemory_cs.ts \
    tr/freshmemory_de.ts \
    tr/freshmemory_en.ts \
    tr/freshmemory_es.ts \
    tr/freshmemory_fi.ts \
    tr/freshmemory_fr.ts \
    tr/freshmemory_ru.ts \
    tr/freshmemory_uk.ts
    
RESOURCES += application.qrc
RC_FILE = freshmemory.rc
TARGET = freshmemory

REV_COMMAND = git rev-parse --short=12 HEAD
unix: REV_COMMAND = $${REV_COMMAND} 2> /dev/null
REV = $$system($${REV_COMMAND})
REVSTR = '\\"$${REV}\\"'
DEFINES += BUILD_REVISION=\"$${REVSTR}\"

VERSIONSTR = '\\"$$cat(version.txt)\\"'
DEFINES += FM_VERSION=\"$${VERSIONSTR}\"

MOC_DIR = moc
OBJECTS_DIR = obj

TARGET = freshmemory
CONFIG(debug, debug|release) {
    CONFIG += console
}
else {
    DEFINES += QT_NO_DEBUG_OUTPUT
}

DESTDIR = ./

INSTALLS = target translations

translations.extra = lrelease freshmemory.pro
translations.files = tr/*.qm
translations.CONFIG = no_check_exist

unix: {
    INSTALLS += desktop icon mime reg_mime

    target.path = /usr/bin
    translations.path = /usr/share/freshmemory/tr
    desktop.files = debian/freshmemory.desktop
    desktop.path = /usr/share/applications
    icon.files = images/freshmemory.png
    icon.path = /usr/share/pixmaps
    mime.files = debian/freshmemory.xml
    mime.uninstall = debian/prerm
    mime.path = /usr/share/freshmemory
    reg_mime.depends = install_desktop install_icon install_mime
    reg_mime.path = /usr/share/freshmemory
    reg_mime.extra = debian/postinst
    }
else:win32 {
	INSTALLS += qtdlls qtplugins
	INSTDIR = /cygdrive/c/Program Files/Freshmemory
	
    target.path = "$$INSTDIR"
    translations.path = "$$INSTDIR/tr"
	qtdlls.files = qt-win/*.dll
	qtdlls.CONFIG = no_check_exist
	qtdlls.path = "$$INSTDIR"
	qtplugins.files = qt-win/imageformats/*.dll
	qtplugins.CONFIG = no_check_exist
	qtplugins.path = "$$INSTDIR/imageformats"
    }