flameshot.pro 8.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294
  1. #-------------------------------------------------
  2. #
  3. # Project created by Dharkael 2017-04-21T00:42:49
  4. #
  5. #-------------------------------------------------
  6. win32:LIBS += -luser32 -lshell32
  7. TAG_VERSION = $$system(git --git-dir $$PWD/.git --work-tree $$PWD describe --always --tags)
  8. isEmpty(TAG_VERSION){
  9. TAG_VERSION = v0.6.0
  10. }
  11. DEFINES += APP_VERSION=\\\"$$TAG_VERSION\\\"
  12. QT += core gui widgets network svg
  13. unix:!macx {
  14. QT += dbus
  15. }
  16. CONFIG += c++11
  17. unix{
  18. CONFIG += link_pkgconfig
  19. PKGCONFIG += opencv
  20. }
  21. #CONFIG += packaging # Enables "make install" for packaging paths
  22. TARGET = flameshot
  23. TEMPLATE = app
  24. win32:RC_ICONS += img/app/flameshot.ico
  25. #release: DESTDIR = build/release
  26. #debug: DESTDIR = build/debug
  27. #OBJECTS_DIR = $$DESTDIR/.obj
  28. #MOC_DIR = $$DESTDIR/.moc
  29. #RCC_DIR = $$DESTDIR/.qrc
  30. #UI_DIR = $$DESTDIR/.ui
  31. TRANSLATIONS = translations/Internationalization_es.ts \
  32. translations/Internationalization_ca.ts \
  33. translations/Internationalization_ru.ts \
  34. translations/Internationalization_zh_CN.ts \
  35. translations/Internationalization_zh_TW.ts \
  36. translations/Internationalization_tr.ts \
  37. translations/Internationalization_ka.ts \
  38. translations/Internationalization_fr.ts \
  39. translations/Internationalization_pl.ts
  40. # Generate translations in build
  41. TRANSLATIONS_FILES =
  42. qtPrepareTool(LRELEASE, lrelease)
  43. for(tsfile, TRANSLATIONS) {
  44. qmfile = $$shadowed($$tsfile)
  45. qmfile ~= s,.ts$,.qm,
  46. qmdir = $$dirname(qmfile)
  47. !exists($$qmdir) {
  48. mkpath($$qmdir)|error("Aborting.")
  49. }
  50. command = $$LRELEASE -removeidentical $$tsfile -qm $$qmfile
  51. system($$command)|error("Failed to run: $$command")
  52. TRANSLATIONS_FILES += $$qmfile
  53. }
  54. DEFINES += QT_DEPRECATED_WARNINGS
  55. include(src/third-party/singleapplication/singleapplication.pri)
  56. include(src/third-party/Qt-Color-Widgets//color_widgets.pri)
  57. DEFINES += QAPPLICATION_CLASS=QApplication
  58. SOURCES += src/main.cpp \
  59. src/widgets/capture/buttonhandler.cpp \
  60. src/widgets/infowindow.cpp \
  61. src/config/configwindow.cpp \
  62. src/widgets/capture/capturewidget.cpp \
  63. src/widgets/capture/colorpicker.cpp \
  64. src/config/buttonlistview.cpp \
  65. src/config/uicoloreditor.cpp \
  66. src/config/geneneralconf.cpp \
  67. src/core/controller.cpp \
  68. src/config/clickablelabel.cpp \
  69. src/config/filenameeditor.cpp \
  70. src/config/strftimechooserwidget.cpp \
  71. src/widgets/capture/capturebutton.cpp \
  72. src/tools/pencil/penciltool.cpp \
  73. src/tools/undo/undotool.cpp \
  74. src/tools/redo/redotool.cpp \
  75. src/tools/arrow/arrowtool.cpp \
  76. src/tools/circle/circletool.cpp \
  77. src/tools/copy/copytool.cpp \
  78. src/tools/exit/exittool.cpp \
  79. src/tools/imgur/imguruploadertool.cpp \
  80. src/tools/line/linetool.cpp \
  81. src/tools/marker/markertool.cpp \
  82. src/tools/move/movetool.cpp \
  83. src/tools/rectangle/rectangletool.cpp \
  84. src/tools/save/savetool.cpp \
  85. src/tools/selection/selectiontool.cpp \
  86. src/tools/sizeindicator/sizeindicatortool.cpp \
  87. src/tools/toolfactory.cpp \
  88. src/utils/filenamehandler.cpp \
  89. src/utils/screengrabber.cpp \
  90. src/utils/confighandler.cpp \
  91. src/utils/systemnotification.cpp \
  92. src/cli/commandlineparser.cpp \
  93. src/cli/commandoption.cpp \
  94. src/cli/commandargument.cpp \
  95. src/utils/screenshotsaver.cpp \
  96. src/tools/imgur/imguruploader.cpp \
  97. src/widgets/loadspinner.cpp \
  98. src/widgets/imagelabel.cpp \
  99. src/widgets/notificationwidget.cpp \
  100. src/widgets/capture/notifierbox.cpp \
  101. src/utils/desktopinfo.cpp \
  102. src/tools/launcher/applauncherwidget.cpp \
  103. src/utils/desktopfileparse.cpp \
  104. src/tools/launcher/launcheritemdelegate.cpp \
  105. src/tools/blur/blurtool.cpp \
  106. src/tools/pin/pintool.cpp \
  107. src/tools/launcher/terminallauncher.cpp \
  108. src/config/visualseditor.cpp \
  109. src/config/extendedslider.cpp \
  110. src/tools/launcher/openwithprogram.cpp \
  111. src/tools/launcher/applaunchertool.cpp \
  112. src/utils/pathinfo.cpp \
  113. src/utils/colorutils.cpp \
  114. src/tools/capturecontext.cpp \
  115. src/widgets/capture/modificationcommand.cpp \
  116. src/tools/abstractpathtool.cpp \
  117. src/tools/abstracttwopointtool.cpp \
  118. src/tools/abstractactiontool.cpp \
  119. src/utils/globalvalues.cpp \
  120. src/widgets/panel/utilitypanel.cpp \
  121. src/widgets/capture/hovereventfilter.cpp \
  122. src/widgets/capture/selectionwidget.cpp \
  123. src/tools/pin/pinwidget.cpp \
  124. src/tools/text/texttool.cpp \
  125. src/tools/text/textwidget.cpp \
  126. src/core/capturerequest.cpp \
  127. src/tools/text/textconfig.cpp \
  128. src/cv/rectdetector.cpp \
  129. src/cv/cvmatandqimage.cpp \
  130. src/widgets/capture/rectgroup.cpp \
  131. src/widgets/panel/colorpickerwidget.cpp
  132. HEADERS += src/widgets/capture/buttonhandler.h \
  133. src/widgets/infowindow.h \
  134. src/config/configwindow.h \
  135. src/widgets/capture/capturewidget.h \
  136. src/widgets/capture/colorpicker.h \
  137. src/config/buttonlistview.h \
  138. src/config/uicoloreditor.h \
  139. src/config/geneneralconf.h \
  140. src/config/clickablelabel.h \
  141. src/config/filenameeditor.h \
  142. src/utils/filenamehandler.h \
  143. src/config/strftimechooserwidget.h \
  144. src/utils/screengrabber.h \
  145. src/tools/capturetool.h \
  146. src/widgets/capture/capturebutton.h \
  147. src/tools/pencil/penciltool.h \
  148. src/tools/undo/undotool.h \
  149. src/tools/redo/redotool.h \
  150. src/tools/arrow/arrowtool.h \
  151. src/tools/circle/circletool.h \
  152. src/tools/copy/copytool.h \
  153. src/tools/exit/exittool.h \
  154. src/tools/imgur/imguruploadertool.h \
  155. src/tools/line/linetool.h \
  156. src/tools/marker/markertool.h \
  157. src/tools/move/movetool.h \
  158. src/tools/rectangle/rectangletool.h \
  159. src/tools/save/savetool.h \
  160. src/tools/selection/selectiontool.h \
  161. src/tools/sizeindicator/sizeindicatortool.h \
  162. src/tools/toolfactory.h \
  163. src/utils/confighandler.h \
  164. src/core/controller.h \
  165. src/utils/systemnotification.h \
  166. src/cli/commandlineparser.h \
  167. src/cli/commandoption.h \
  168. src/cli/commandargument.h \
  169. src/utils/screenshotsaver.h \
  170. src/tools/imgur/imguruploader.h \
  171. src/widgets/loadspinner.h \
  172. src/widgets/imagelabel.h \
  173. src/widgets/notificationwidget.h \
  174. src/widgets/capture/notifierbox.h \
  175. src/utils/desktopinfo.h \
  176. src/tools/launcher/applauncherwidget.h \
  177. src/utils/desktopfileparse.h \
  178. src/tools/launcher/launcheritemdelegate.h \
  179. src/tools/blur/blurtool.h \
  180. src/tools/pin/pintool.h \
  181. src/tools/launcher/terminallauncher.h \
  182. src/config/visualseditor.h \
  183. src/config/extendedslider.h \
  184. src/tools/launcher/openwithprogram.h \
  185. src/utils/pathinfo.h \
  186. src/tools/capturecontext.h \
  187. src/tools/launcher/applaunchertool.h \
  188. src/utils/globalvalues.h \
  189. src/utils/colorutils.h \
  190. src/widgets/capture/modificationcommand.h \
  191. src/tools/abstractpathtool.h \
  192. src/tools/abstracttwopointtool.h \
  193. src/tools/abstractactiontool.h \
  194. src/widgets/panel/utilitypanel.h \
  195. src/widgets/capture/hovereventfilter.h \
  196. src/widgets/capture/selectionwidget.h \
  197. src/tools/pin/pinwidget.h \
  198. src/tools/text/texttool.h \
  199. src/tools/text/textwidget.h \
  200. src/core/capturerequest.h \
  201. src/tools/text/textconfig.h \
  202. src/cv/rectdetector.h \
  203. src/cv/cvmatandqimage.h \
  204. src/widgets/capture/rectgroup.h \
  205. src/widgets/panel/colorpickerwidget.h
  206. unix:!macx {
  207. SOURCES += src/core/flameshotdbusadapter.cpp \
  208. src/utils/dbusutils.cpp
  209. HEADERS += src/core/flameshotdbusadapter.h \
  210. src/utils/dbusutils.h
  211. }
  212. win32 {
  213. SOURCES += src/core/globalshortcutfilter.cpp
  214. HEADERS += src/core/globalshortcutfilter.h
  215. }
  216. RESOURCES += \
  217. graphics.qrc
  218. # installs
  219. unix:!macx {
  220. isEmpty(PREFIX) {
  221. packaging {
  222. PREFIX = /usr
  223. } else {
  224. PREFIX = /usr/local
  225. }
  226. }
  227. DEFINES += APP_PREFIX=\\\"$$PREFIX\\\"
  228. target.path = $${PREFIX}/bin/
  229. qmfile.path = $${PREFIX}/share/flameshot/translations/
  230. qmfile.files = $${TRANSLATIONS_FILES}
  231. dbus.path = $${PREFIX}/share/dbus-1/interfaces/
  232. dbus.files = dbus/org.dharkael.Flameshot.xml
  233. icon.path = $${PREFIX}/share/icons/hicolor/
  234. icon.files = img/hicolor/*
  235. completion.path = $${PREFIX}/share/bash-completion/completions/
  236. completion.files = docs/bash-completion/flameshot
  237. appdata.path = $${PREFIX}/share/metainfo/
  238. appdata.files = docs/appdata/flameshot.appdata.xml
  239. desktopentry.path = $${PREFIX}/share/applications
  240. desktopentry.files = docs/desktopEntry/package/flameshot.desktop
  241. servicedbus.path = $${PREFIX}/share/dbus-1/services/
  242. packaging {
  243. servicedbus.files = dbus/package/org.dharkael.Flameshot.service
  244. } else {
  245. servicedbus.files = dbus/make/org.dharkael.Flameshot.service
  246. }
  247. INSTALLS += target \
  248. icon \
  249. desktopentry \
  250. qmfile \
  251. servicedbus \
  252. dbus \
  253. completion \
  254. appdata
  255. }
  256. # Imgur API data
  257. include(src/imgur.pri)