File: AlbumShaper.pro

package info (click to toggle)
albumshaper 2.1-5
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 8,752 kB
  • ctags: 2,047
  • sloc: cpp: 20,875; ansic: 714; sh: 180; makefile: 51; xml: 8
file content (542 lines) | stat: -rw-r--r-- 21,013 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
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
#   _______   _______
#  /       \ /       \
# |         |         |
# |  The    |         |       Album Shaper 
# |  Album  | Project |       (c.) 2003-2005 Will Stokes
# |  Shaper |  File   |       wstokes (at) gmail (dot) com
# |         |         |       http://albumshaper.sf.net
# |  ______ |  _____  |
# |_/      \|_/     \_|

#===========================================================================================
#===========================================================================================
#
#                                    Installation options
#
#===========================================================================================
#===========================================================================================

# Directory binary (and possibly launcher script) will be installed
#-------------------------------------------------------
win32:BIN_DIR = AlbumShaper.win
mac:BUNDLE_DIR = build/AlbumShaper.app
!mac:unix:BIN_DIR = $(DEBIAN_DESTDIR)/usr/bin


#Directory translations, button icons, etc will be installed
#-------------------------------------------------------
win32:DATA_DIR     = AlbumShaper.win
mac:DATA_DIR       = $${BUNDLE_DIR}/Contents/Resources
!mac:unix:DATA_DIR = $(DEBIAN_DESTDIR)/usr/share/albumshaper

#===========================================================================================
#===========================================================================================
#
#                                    Compiling options 
#
#===========================================================================================
#===========================================================================================


#Comment this in if you want to manually set the include and linking paths
#CONFIG += manualPaths

#Comment this out if you don't want to UPX compress the binary
!mac:unix:CONFIG += useUpxCompression

#Comment this in if you want to link statically
#CONFIG += static

# Set compiler flags accrding to DEB_BUILD_OPTIONS overriding the flags set
# by qmake 
#
DEB_BUILD_OPTIONS=$$(DEB_BUILD_OPTIONS)

message( 'DEB_BUILD_OPTIONS:' )
message( '------------------' )

# clean preset flags
QMAKE_CFLAGS_RELEASE   -= -O2
QMAKE_CXXFLAGS_RELEASE -= -O2

# switch to debug mode (nostrip) if nostrip found
!contains( DEB_BUILD_OPTIONS, nostrip ) {
  unix:QMAKE_LFLAGS_RELEASE += -s
  message( 'The binary will be stripped' )
} else {
  message( 'Not stripping the binary' )
}

# add debugging symbols if debug found
contains( DEB_BUILD_OPTIONS, debug ) {
    QMAKE_CFLAGS_RELEASE   += -g
    QMAKE_CXXFLAGS_RELEASE += -g
    message( 'Including debug symbols' )
}

# avoid optimization if noopt found, optimize otherwise
contains( DEB_BUILD_OPTIONS, noopt ) {
    QMAKE_CFLAGS_RELEASE   += -O0
    QMAKE_CXXFLAGS_RELEASE += -O0
    message( 'Optimization is off' )
} else {
    QMAKE_CFLAGS_RELEASE   += -O2
    QMAKE_CXXFLAGS_RELEASE += -O2
    message( 'Optimization is on' )
}

message( '' )

#------------ Linux/FreeBSD Include Paths + Linking Options ---------------
!mac:unix {
  contains( CONFIG, manualPaths ) {
    INCLUDEPATH += ../libxml2/include
    INCLUDEPATH += ../libxslt
    INCLUDEPATH += ../libjpeg
    LIBS += ../libs/libjpeg.a
    LIBS += ../libs/libqt-mt.a
    LIBS += ../libs/libxslt.a
    LIBS += ../libs/libxml2.a
  } else {
    LIBXML2_INCLUDE        = $$system(xml2-config --cflags)
    LIBXSLT_INCLUDE        = $$system(xslt-config --cflags)
    QMAKE_CFLAGS_DEBUG     += $$LIBXML2_INCLUDE $$LIBXSLT_INCLUDE
    QMAKE_CXXFLAGS_DEBUG   += $$LIBXML2_INCLUDE $$LIBXSLT_INCLUDE
    QMAKE_CFLAGS_RELEASE   += $$LIBXML2_INCLUDE $$LIBXSLT_INCLUDE
    QMAKE_CXXFLAGS_RELEASE += $$LIBXML2_INCLUDE $$LIBXSLT_INCLUDE
    LIBS += -ljpeg
    LIBS += $$system(xslt-config --libs)  
    LIBS += $$system(xml2-config --libs)
    LIBS += -lxslt -lxml2 -ljpeg
  }

  TARGET = bin/AlbumShaper.bin 
}
#------------------- Mac OSX Include + Linking Options --------------------
mac {
  #Force static building on Windows
  !debug { !contains( CONFIG, static ):CONFIG += static }
  
  !contains( CONFIG, static ):CONFIG += static

  INCLUDEPATH += ../libxml2/include
  INCLUDEPATH += ../libxslt
  INCLUDEPATH += ../libjpeg
  LIBS += -L../libs -F../libs

  static {
    contains( CONFIG, release ):LIBS += ../libs/libjpeg.a 
    LIBS += ../libs/libqt-mt.a
    LIBS += ../libs/libxslt.a
    LIBS += ../libs/libxml2.a
    LIBS += ../libs/libiconv.a
  } else {
    LIBS += -ljpeg -framework libxslt -framework libxml /usr/lib/libiconv.dylib
    INSTALLS += frameworks
  }

  #if debugging qt library already linked against libjpeg, also for some reason
  #we must link against the xml2.a file instead of the framework
  contains( CONFIG, debug ) {
    BUNDLE_DIR = build/AlbumShaper.app
    DATA_DIR = $${BUNDLE_DIR}/Contents/Resources
    LIBS -= ../libs/libqt-mt.a
    LIBS -= -ljpeg
    LIBS -= "-framework libxml"
    LIBS += ../libs/libxml2.a
#   LIBS += /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation
#   LIBS += /System/Library/Frameworks/Carbon.framework/Carbon
  }

  TARGET = build/AlbumShaper
}
#------------------- Windows Include + Linking Options --------------------
win32 {
  #Force static building on Windows
  !debug { !contains( CONFIG, static ):CONFIG += static }

  INCLUDEPATH += ../libxml2/include
  INCLUDEPATH += ../libxslt/include
  INCLUDEPATH += ../libjpeg/include
  INCLUDEPATH += ../iconv/include
  LIBS += ../libjpeg/lib/libjpeg.a
  LIBS += ../libxslt/lib/libxslt_a.lib
  LIBS += ../libxml2/lib/libxml2_a.lib
  LIBS += ../iconv/lib/iconv_a.lib

  release {
    TARGET = bin/AlbumShaper
  }
  debug {
    TARGET = bin/AlbumShaperDBG
  }
}

#===========================================================================================
#===========================================================================================
#
#                                     Translations
#
#===========================================================================================
#===========================================================================================

TRANSLATIONS = bin/translations/AlbumShaper_de.ts \
               bin/translations/AlbumShaper_es.ts \
               bin/translations/AlbumShaper_fr.ts \
               bin/translations/AlbumShaper_it.ts \
               bin/translations/AlbumShaper_nl.ts \
               bin/translations/AlbumShaper_pl.ts \
               bin/translations/AlbumShaper_ro.ts \
               bin/translations/AlbumShaper_ru.ts \
               bin/translations/AlbumShaper_sk.ts \
               bin/translations/AlbumShaper_sv.ts

#===========================================================================================
#===========================================================================================
#
#                      NO CHANGES SHOULD BE NECESSARY BELOW!
#
#===========================================================================================
#===========================================================================================

# Standard Qt project settings, plus threading support
TEMPLATE = app
CONFIG += qt thread
mac:CONFIG += link_prl

# If not compiling in debug mode add release to CONFIG string
!contains( CONFIG, debug ):CONFIG += release

# Debugging a statically linked binary is problematic, so disable static if debug enabled
contains(CONFIG, static):contains( CONFIG, debug):CONFIG -= static

#if UPX flag was set then setup running upx compression when releasing the binary
!mac:unix:release {
  contains( CONFIG, useUpxCompression ) {
    system(which upx > /dev/null && { exit 0; }):QMAKE_POST_LINK = upx $(TARGET)
  }
}

# Make sure static libraries are used for linking if static is set
!mac:unix:static {
  QMAKE_LFLAGS_RELEASE += -static
}

# Define preprocessor variables specifying where items will be installed. This is
# needed to set up the MATERIAL_DIR variable which is used to load application resources
DEFINES += BIN_DIR=\"$$BIN_DIR\"
DEFINES += DATA_DIR=\"$$DATA_DIR\"

# xcopy is needed to properly copy directories in Windows
# /Y - supress overwrite confirm messages
# /K - copy attributes
# /E - copy all directories, even empty ones
# /Q - don't print out all filenames, faster
win32:QMAKE_COPY = xcopy /Y /K /E /Q

# Place moc and obj files in a tmp directory

MOC_DIR     = tmp
OBJECTS_DIR = tmp

#===========================================================================================
#===========================================================================================
#
#                       Application Resources (and Frameworks)
#
#===========================================================================================
#===========================================================================================

#--------------------  Images -------------------------
win32:images.path  = $${DATA_DIR}/images
!win32:images.path = $${DATA_DIR}
images.files = bin/images

#---------- Text files for about dialog ---------------
win32:text.path  = $${DATA_DIR}/text
!win32:text.path = $${DATA_DIR}
text.files = bin/text

#------------------- Themes ---------------------------
win32:themes.path  = $${DATA_DIR}/themes
!win32:themes.path = $${DATA_DIR}
themes.files = bin/themes

#----------------- Translations -----------------------
win32:translations.path  = $${DATA_DIR}/translations
!win32:translations.path = $${DATA_DIR}
translations.files = bin/translations

#---------- XML/XSLT album update scripts -------------
win32:xmlConversion.path  = $${DATA_DIR}/xmlConversion
!win32:xmlConversion.path = $${DATA_DIR}
xmlConversion.files = bin/xmlConversion

#------------ Bundle frameworks (OSX) -----------------
mac:frameworks.path = $${BUNDLE_DIR}/Contents/Frameworks
mac:frameworks.files = ../libs/libxslt.framework
mac:frameworks.files += ../libs/libxml.framework

#---------- Custom Info.plist file (OSX) --------------
mac:plists.path = $${BUNDLE_DIR}/Contents
mac:plists.files = resources/macx/Info.plist

#-------- Application Icon (Windows / OSX ) -----------
win32:RC_FILE = resources/win32/AlbumShaper.rc
mac:RC_FILE = resources/macx/AlbumShaper.icns

#--------- Launcher Script (Linux/FreeBSD) ------------
!mac:unix:scripts.path = $${BIN_DIR}
!mac:unix:scripts.commands = cp -f bin/AlbumShaper $${BIN_DIR}/AlbumShaper;


#===========================================================================================
#===========================================================================================
#
#                                   Setup install target
#
#===========================================================================================
#===========================================================================================
win32:target.path = $$BIN_DIR
!mac:unix:target.path = $$BIN_DIR
!mac:INSTALLS += target

INSTALLS += images
INSTALLS += text
INSTALLS += themes
INSTALLS += translations
INSTALLS += xmlConversion

mac:INSTALLS += plists
!mac:unix:INSTALLS += scripts

#===========================================================================================
#===========================================================================================
#
#                                     Source Files
#
#===========================================================================================
#===========================================================================================

SOURCES += src/main.cpp \
           src/config.cpp \
           src/backend/album.cpp \
           src/backend/subalbum.cpp \
           src/backend/photo.cpp \
           src/backend/recentAlbums.cpp \
           src/backend/enhancements/color.cpp \
           src/backend/enhancements/contrast.cpp \
           src/backend/enhancements/redEye.cpp \
           src/backend/enhancements/tilt.cpp \
           src/backend/manipulations/blackWhite.cpp \
           src/backend/manipulations/blur.cpp \
           src/backend/manipulations/crop.cpp \
           src/backend/manipulations/edgeDetect.cpp \
           src/backend/manipulations/emboss.cpp \
           src/backend/manipulations/invert.cpp \
           src/backend/manipulations/mosaic.cpp \
           src/backend/manipulations/painting.cpp \
           src/backend/manipulations/pointillism.cpp \
           src/backend/manipulations/sepia.cpp \
           src/backend/manipulations/sharpen.cpp \
           src/backend/tools/fileTools.cpp \
           src/backend/tools/guiTools.cpp \            
           src/backend/tools/wallpaperTools.cpp \
           src/backend/tools/md5.cpp \
           src/backend/tools/xmlTools.cpp \
           src/backend/tools/imageTools.cpp \
           src/backend/tools/jpeg/jpegInternal.c \
           src/backend/tools/jpeg/jpegSize.cpp \
           src/backend/tools/jpeg/jpegTools.cpp \
           src/configuration/configuration.cpp \
           src/configuration/settinggroup.cpp \
           src/configuration/setting.cpp \
           src/configuration/configurationWidget.cpp \
           src/configuration/groupsWidget.cpp \
           src/configuration/groupIcon.cpp \
           src/configuration/alertsWidget.cpp \
           src/configuration/layoutSettingsWidget.cpp \
           src/configuration/loadingSavingWidget.cpp \
           src/configuration/miscSettings.cpp \
           src/gui/ALabel.cpp \
           src/gui/cursors.cpp \
           src/gui/clickableLabel.cpp \
           src/gui/blurSharpenSlider.cpp \
           src/gui/dynamicSlider.cpp \
           src/gui/layoutWidget.cpp \
           src/gui/photoDescEdit.cpp \
           src/gui/photoPreviewWidget.cpp \
           src/gui/photosIconView.cpp \
           src/gui/recentAlbumMenuItem.cpp \
           src/gui/statusWidget.cpp \
           src/gui/subalbumPreviewWidget.cpp \
           src/gui/subalbumsIconView.cpp \
           src/gui/subalbumsWidget.cpp \
           src/gui/subalbumWidget.cpp \
           src/gui/titleWidget.cpp \
           src/gui/window.cpp \
           src/gui/editing/editingInterface.cpp \
           src/gui/editing/selectionInterface.cpp \
           src/gui/editing/histogramEditor.cpp \
           src/gui/editing/grainEditor.cpp \
           src/gui/editing/splitViewInterface.cpp \
           src/gui/editing/scaledPreviewInterface.cpp \           
           src/gui/editing/panningPreviewInterface.cpp \
           src/gui/editing/selectionPlacementInterface.cpp \
           src/gui/editing/histogramInterface.cpp \
           src/gui/editing/manipulations/mosaicOptionsDialog.cpp \
           src/gui/dialogs/about.cpp \
           src/gui/dialogs/addPhotosDialog.cpp \
           src/gui/dialogs/albumStatistics.cpp \
           src/gui/dialogs/alertDialog.cpp \
           src/gui/dialogs/questionDialog.cpp \
           src/gui/dialogs/saveDialog.cpp \
           src/gui/help/helpWindow.cpp \
           src/gui/help/contents.cpp \
           src/gui/help/whatsNew.cpp \
           src/gui/help/importing.cpp \
           src/gui/help/annotating.cpp \
           src/gui/help/framing.cpp \
           src/gui/help/enhancing.cpp \
           src/gui/help/proTools.cpp \
           src/gui/help/manipulating.cpp \
           src/gui/help/loadSave.cpp \
           src/gui/help/shortcuts.cpp \
           src/gui/welcomeWindow/item.cpp \
           src/gui/welcomeWindow/items.cpp \
           src/gui/welcomeWindow/welcomeWindow.cpp

HEADERS += src/config.h \
           src/backend/album.h \
           src/backend/subalbum.h \
           src/backend/photo.h \
           src/backend/recentAlbums.h \
           src/backend/enhancements/color.h \
           src/backend/enhancements/contrast.h \
           src/backend/enhancements/redEye.h \
           src/backend/enhancements/redEye_internal.h \
           src/backend/enhancements/tilt.h \
           src/backend/enhancements/tilt_internal.h \
           src/backend/manipulations/blackWhite.h \
           src/backend/manipulations/blur.h \
           src/backend/manipulations/crop.h \
           src/backend/manipulations/edgeDetect.h \
           src/backend/manipulations/emboss.h \
           src/backend/manipulations/invert.h \
           src/backend/manipulations/manipulationOptions.h \
           src/backend/manipulations/mosaic.h \
           src/backend/manipulations/painting.h \
           src/backend/manipulations/pointillism.h \
           src/backend/manipulations/sepia.h \
           src/backend/manipulations/sharpen.h \
           src/backend/tools/fileTools.h \
           src/backend/tools/guiTools.h \            
           src/backend/tools/wallpaperTools.h \
           src/backend/tools/md5.h \
           src/backend/tools/xmlTools.h \
           src/backend/tools/imageTools.h \
           src/backend/tools/jpeg/jpegInternal.h \
           src/backend/tools/jpeg/jpegSize.h \
           src/backend/tools/jpeg/jpegTools.h \
           src/configuration/configuration.h \
           src/configuration/settinggroup.h \
           src/configuration/setting.h \
           src/configuration/configurationWidget.h \
           src/configuration/groupsWidget.h \
           src/configuration/groupIcon.h \
           src/configuration/alertsWidget.h \
           src/configuration/layoutSettingsWidget.h \
           src/configuration/loadingSavingWidget.h \
           src/configuration/miscSettings.h \
           src/gui/ALabel.h \
           src/gui/cursors.h \
           src/gui/clickableLabel.h \
           src/gui/blurSharpenSlider.h \
           src/gui/dynamicSlider.h \
           src/gui/layoutWidget.h \
           src/gui/photoDescEdit.h \
           src/gui/photoPreviewWidget.h \
           src/gui/photosIconView.h \
           src/gui/recentAlbumMenuItem.h \
           src/gui/statusWidget.h \
           src/gui/subalbumPreviewWidget.h \
           src/gui/subalbumsIconView.h \
           src/gui/subalbumsWidget.h \
           src/gui/subalbumWidget.h \
           src/gui/titleWidget.h \
           src/gui/window.h \
           src/gui/editing/editingInterface.h \
           src/gui/editing/selectionInterface.h \
           src/gui/editing/histogramEditor.h \
           src/gui/editing/grainEditor.h \
           src/gui/editing/splitViewInterface.h \
           src/gui/editing/scaledPreviewInterface.h \
           src/gui/editing/panningPreviewInterface.h \
           src/gui/editing/selectionPlacementInterface.h \
           src/gui/editing/histogramInterface.h \
           src/gui/editing/manipulations/mosaicOptionsDialog.h \
           src/gui/dialogs/about.h \
           src/gui/dialogs/addPhotosDialog.h \
           src/gui/dialogs/albumStatistics.h \
           src/gui/dialogs/alertDialog.h \
           src/gui/dialogs/questionDialog.h \
           src/gui/dialogs/saveDialog.h \
           src/gui/help/helpWindow.h \
           src/gui/help/contents.h \
           src/gui/help/whatsNew.h \
           src/gui/help/importing.h \
           src/gui/help/annotating.h \
           src/gui/help/framing.h \
           src/gui/help/enhancing.h \
           src/gui/help/proTools.h \
           src/gui/help/manipulating.h \
           src/gui/help/loadSave.h \
           src/gui/help/shortcuts.h \
           src/gui/welcomeWindow/item.h \
           src/gui/welcomeWindow/items.h \
           src/gui/welcomeWindow/welcomeWindow.h

#===========================================================================================
#===========================================================================================
#
#                  Print compilation and installation options
#
#===========================================================================================
#===========================================================================================

message('Compilation options:')
message('--------------------')
win32 {
  message( 'Using Win32 Include + Linking options' )
}
mac {
  message( 'Using Mac OSX Include + Linking options' )
}
!mac:unix {
  contains( CONFIG, manualPaths ) {
    message( 'Using manual Linux/FreeBSD include paths/linking options' )
  } else {
    message( 'Automatically determining Linux/FreeBSD include paths/linking options' )
  }
}

contains( CONFIG, debug             ):message('Including debug symbols')
contains( CONFIG, static            ):message('Statically linking binary')
contains( CONFIG, useUpxCompression ):message('Using UPX compression after binary has been built')
message('                     ')
message('Installation options:')
message('---------------------')
message('Launcher script.. $${BIN_DIR}/AlbumShaper')
mac {
  message('Bundle........... $${BUNDLE_DIR}') 
  message('Resources........ $${DATA_DIR}')
} else {
  message('Binary........... $${BIN_DIR}/AlbumShaper.bin')
  message('Resources........ $${DATA_DIR}')
}
message('                     ')
win32 {
  message('-> Constructing Makefile, when done run "nmake"    ')
} else {
  message('-> Constructing Makefile, when done run "make"    ')
}