File: focuswriter.pro

package info (click to toggle)
focuswriter 1.7.3-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, sid
  • size: 16,592 kB
  • sloc: cpp: 31,862; sh: 408; xml: 286; makefile: 20
file content (338 lines) | stat: -rw-r--r-- 8,765 bytes parent folder | download
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
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
lessThan(QT_MAJOR_VERSION, 5) {
	error("FocusWriter requires Qt 5.9 or greater")
}
equals(QT_MAJOR_VERSION, 5):lessThan(QT_MINOR_VERSION, 9) {
	error("FocusWriter requires Qt 5.9 or greater")
}

TEMPLATE = app
QT += network widgets printsupport multimedia concurrent
macx {
	QT += macextras
	QMAKE_INFO_PLIST = resources/mac/Info.plist
}
win32 {
	QT += winextras
}
CONFIG += c++11

CONFIG(debug, debug|release) {
	CONFIG += warn_on
	DEFINES += QT_DEPRECATED_WARNINGS
	DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x051300
	DEFINES += QT_NO_NARROWING_CONVERSIONS_IN_CONNECT
}

# Allow in-tree builds
!win32 {
	MOC_DIR = build
	OBJECTS_DIR = build
	RCC_DIR = build
}

# Set program version
VERSION = 1.7.3
DEFINES += VERSIONSTR=\\\"$${VERSION}\\\"

# Set program name
unix: !macx: !haiku {
	TARGET = focuswriter
} else {
	TARGET = FocusWriter
}

# Add dependencies
macx {
	DEFINES += RTFCLIPBOARD

	LIBS += -lz -framework AppKit

	HEADERS += src/fileformats/clipboard_mac.h \
		src/spelling/dictionary_provider_nsspellchecker.h

	OBJECTIVE_SOURCES += src/spelling/dictionary_provider_nsspellchecker.mm

	SOURCES += src/fileformats/clipboard_mac.cpp
} else:win32 {
	DEFINES += RTFCLIPBOARD HUNSPELL_STATIC

	LIBS += -lz -lole32

	INCLUDEPATH += src/spelling/hunspell

	HEADERS += src/fileformats/clipboard_windows.h \
		src/spelling/dictionary_provider_hunspell.h \
		src/spelling/dictionary_provider_voikko.h

	SOURCES += src/fileformats/clipboard_windows.cpp \
		src/spelling/dictionary_provider_hunspell.cpp \
		src/spelling/dictionary_provider_voikko.cpp \
		src/spelling/hunspell/affentry.cxx \
		src/spelling/hunspell/affixmgr.cxx \
		src/spelling/hunspell/csutil.cxx \
		src/spelling/hunspell/filemgr.cxx \
		src/spelling/hunspell/hashmgr.cxx \
		src/spelling/hunspell/hunspell.cxx \
		src/spelling/hunspell/hunzip.cxx \
		src/spelling/hunspell/phonet.cxx \
		src/spelling/hunspell/replist.cxx \
		src/spelling/hunspell/suggestmgr.cxx
} else:unix {
	CONFIG += link_pkgconfig
	PKGCONFIG += hunspell zlib

	HEADERS += src/spelling/dictionary_provider_hunspell.h \
		src/spelling/dictionary_provider_voikko.h

	SOURCES += src/spelling/dictionary_provider_hunspell.cpp \
		src/spelling/dictionary_provider_voikko.cpp
}

INCLUDEPATH += src src/fileformats src/qtsingleapplication src/qtzip src/spelling

# Specify program sources
HEADERS += src/action_manager.h \
	src/alert.h \
	src/alert_layer.h \
	src/application.h \
	src/block_stats.h \
	src/color_button.h \
	src/deltas.h \
	src/daily_progress.h \
	src/daily_progress_dialog.h \
	src/daily_progress_label.h \
	src/document.h \
	src/document_cache.h \
	src/document_watcher.h \
	src/document_writer.h \
	src/find_dialog.h \
	src/font_combobox.h \
	src/gzip.h \
	src/image_button.h \
	src/load_screen.h \
	src/locale_dialog.h \
	src/paths.h \
	src/preferences.h \
	src/preferences_dialog.h \
	src/ranged_int.h \
	src/ranged_string.h \
	src/scene_list.h \
	src/scene_model.h \
	src/session.h \
	src/session_manager.h \
	src/settings_file.h \
	src/shortcut_edit.h \
	src/smart_quotes.h \
	src/sound.h \
	src/stack.h \
	src/stats.h \
	src/symbols_dialog.h \
	src/symbols_model.h \
	src/theme.h \
	src/theme_dialog.h \
	src/theme_manager.h \
	src/theme_renderer.h \
	src/timer.h \
	src/timer_display.h \
	src/timer_manager.h \
	src/utils.h \
	src/window.h \
	src/fileformats/docx_reader.h \
	src/fileformats/docx_writer.h \
	src/fileformats/format_manager.h \
	src/fileformats/format_reader.h \
	src/fileformats/odt_reader.h \
	src/fileformats/odt_writer.h \
	src/fileformats/rtf_reader.h \
	src/fileformats/rtf_tokenizer.h \
	src/fileformats/rtf_writer.h \
	src/fileformats/txt_reader.h \
	src/qtsingleapplication/qtsingleapplication.h \
	src/qtsingleapplication/qtlocalpeer.h \
	src/qtzip/qtzipreader.h \
	src/qtzip/qtzipwriter.h \
	src/spelling/abstract_dictionary.h \
	src/spelling/abstract_dictionary_provider.h \
	src/spelling/dictionary_dialog.h \
	src/spelling/dictionary_manager.h \
	src/spelling/dictionary_ref.h \
	src/spelling/highlighter.h \
	src/spelling/spell_checker.h

SOURCES += src/action_manager.cpp \
	src/alert.cpp \
	src/alert_layer.cpp \
	src/application.cpp \
	src/block_stats.cpp \
	src/color_button.cpp \
	src/deltas.cpp \
	src/daily_progress.cpp \
	src/daily_progress_dialog.cpp \
	src/daily_progress_label.cpp \
	src/document.cpp \
	src/document_cache.cpp \
	src/document_watcher.cpp \
	src/document_writer.cpp \
	src/find_dialog.cpp \
	src/font_combobox.cpp \
	src/gzip.cpp \
	src/image_button.cpp \
	src/load_screen.cpp \
	src/locale_dialog.cpp \
	src/main.cpp \
	src/paths.cpp \
	src/preferences.cpp \
	src/preferences_dialog.cpp \
	src/scene_list.cpp \
	src/scene_model.cpp \
	src/session.cpp \
	src/session_manager.cpp \
	src/shortcut_edit.cpp \
	src/smart_quotes.cpp \
	src/sound.cpp \
	src/stack.cpp \
	src/stats.cpp \
	src/symbols_dialog.cpp \
	src/symbols_model.cpp \
	src/theme.cpp \
	src/theme_dialog.cpp \
	src/theme_manager.cpp \
	src/theme_renderer.cpp \
	src/timer.cpp \
	src/timer_display.cpp \
	src/timer_manager.cpp \
	src/utils.cpp \
	src/window.cpp \
	src/fileformats/docx_reader.cpp \
	src/fileformats/docx_writer.cpp \
	src/fileformats/format_manager.cpp \
	src/fileformats/odt_reader.cpp \
	src/fileformats/odt_writer.cpp \
	src/fileformats/rtf_reader.cpp \
	src/fileformats/rtf_tokenizer.cpp \
	src/fileformats/rtf_writer.cpp \
	src/fileformats/txt_reader.cpp \
	src/qtsingleapplication/qtsingleapplication.cpp \
	src/qtsingleapplication/qtlocalpeer.cpp \
	src/qtzip/qtzip.cpp \
	src/spelling/dictionary_dialog.cpp \
	src/spelling/dictionary_manager.cpp \
	src/spelling/highlighter.cpp \
	src/spelling/spell_checker.cpp

# Generate translations
TRANSLATIONS = $$files(translations/focuswriter_*.ts)
qtPrepareTool(LRELEASE, lrelease)
updateqm.input = TRANSLATIONS
updateqm.output = ${QMAKE_FILE_PATH}/${QMAKE_FILE_BASE}.qm
updateqm.commands = $$LRELEASE -silent ${QMAKE_FILE_IN} -qm ${QMAKE_FILE_OUT}
updateqm.CONFIG += no_link target_predeps
QMAKE_EXTRA_COMPILERS += updateqm

# Install program data
RESOURCES = resources/images/images.qrc

macx {
	ICON = resources/mac/focuswriter.icns

	ICONS.files = resources/images/icons/oxygen/hicolor
	ICONS.path = Contents/Resources/icons

	SOUNDS.files = resources/sounds
	SOUNDS.path = Contents/Resources

	SYMBOLS.files = resources/symbols/symbols1000.dat
	SYMBOLS.path = Contents/Resources

	THEMES.files = resources/themes
	THEMES.path = Contents/Resources

	QMAKE_BUNDLE_DATA += ICONS SOUNDS SYMBOLS THEMES
} else:win32 {
	RC_ICONS = resources/windows/focuswriter.ico
	QMAKE_TARGET_DESCRIPTION = "Fullscreen word processor"
	QMAKE_TARGET_COPYRIGHT = "Copyright (C) 2019 Graeme Gott"
} else:haiku {
	RESOURCES += resources/images/icons/icons.qrc

	isEmpty(PREFIX) {
		PREFIX = /boot/home/config/non-packaged/apps/FocusWriter
	}
	isEmpty(BINDIR) {
		BINDIR = $$PREFIX
	}
	isEmpty(DATADIR) {
		DATADIR = $$PREFIX/data
	}
	DEFINES += DATADIR=\\\"$$DATADIR\\\"
	target.path = $$BINDIR

	icons.files = resources/images/icons/oxygen/hicolor/*
	icons.path = $$DATADIR/icons/hicolor

	man.files = resources/unix/focuswriter.1
	man.path = $$PREFIX/../../documentation/man/man1

	qm.files = $$replace(TRANSLATIONS, .ts, .qm)
	qm.path = $$DATADIR/translations
	qm.CONFIG += no_check_exist

	sounds.files = resources/sounds/*
	sounds.path = $$DATADIR/sounds

	themes.files = resources/themes/*
	themes.path = $$DATADIR/themes

	symbols.files = resources/symbols/symbols1000.dat
	symbols.path = $$DATADIR

	INSTALLS += target man icons qm sounds symbols themes
} else:unix {
	RESOURCES += resources/images/icons/icons.qrc

	isEmpty(PREFIX) {
		PREFIX = /usr/local
	}
	isEmpty(BINDIR) {
		BINDIR = $$PREFIX/bin
	}
	isEmpty(DATADIR) {
		DATADIR = $$PREFIX/share
	}
	DEFINES += DATADIR=\\\"$${DATADIR}/focuswriter\\\"

	target.path = $$BINDIR

	icon.files = resources/images/icons/hicolor/*
	icon.path = $$DATADIR/icons/hicolor

	pixmap.files = resources/unix/focuswriter.xpm
	pixmap.path = $$DATADIR/pixmaps

	icons.files = resources/images/icons/oxygen/hicolor/*
	icons.path = $$DATADIR/focuswriter/icons/hicolor

	desktop.files = resources/unix/focuswriter.desktop
	desktop.path = $$DATADIR/applications/

	appdata.files = resources/unix/focuswriter.appdata.xml
	appdata.path = $$DATADIR/metainfo/

	man.files = resources/unix/focuswriter.1
	man.path = $$PREFIX/share/man/man1

	qm.files = $$replace(TRANSLATIONS, .ts, .qm)
	qm.path = $$DATADIR/focuswriter/translations
	qm.CONFIG += no_check_exist

	sounds.files = resources/sounds/*
	sounds.path = $$DATADIR/focuswriter/sounds

	themes.files = resources/themes/*
	themes.path = $$DATADIR/focuswriter/themes

	symbols.files = resources/symbols/symbols1000.dat
	symbols.path = $$DATADIR/focuswriter

	INSTALLS += target icon pixmap desktop appdata man icons qm sounds symbols themes
}