flameshot.pro 10 KB

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