installs.pri 3.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. # Fresh Install Project File
  2. !build_pass:!no_fresh_install {
  3. mac:universal {
  4. UNIVERSAL_TEXT = "(universal)"
  5. }
  6. FRESH_INSTALL_HEADERS = $$[QT_INSTALL_HEADERS]
  7. FRESH_INSTALL_LIBS = $$[QT_INSTALL_LIBS]
  8. FRESH_INSTALL_TRANSLATIONS = $$[QT_INSTALL_TRANSLATIONS]
  9. FRESH_INSTALL_FEATURES = $$[QMAKE_MKSPECS]/features
  10. cb_win32 {
  11. FRESH_INSTALL_HEADERS = $(QT_WIN32_PATH)/include
  12. FRESH_INSTALL_LIBS = $(QT_WIN32_PATH)/lib
  13. FRESH_INSTALL_TRANSLATIONS = $(QT_WIN32_PATH)/translations
  14. FRESH_INSTALL_FEATURES = $(QT_WIN32_PATH)/mkspecs/features
  15. }
  16. message( "Configuring Fresh..." )
  17. message( "Build mode: $${FRESH_BUILD_MODE}" )
  18. message( "Build type: $${FRESH_BUILD_TYPE} $${UNIVERSAL_TEXT}" )
  19. message( "Install headers: $${FRESH_INSTALL_HEADERS}" )
  20. message( "Install libs: $${FRESH_INSTALL_LIBS}" )
  21. message( "Install translations: $${FRESH_INSTALL_TRANSLATIONS}" )
  22. message( "You can change the build mode:" )
  23. message( " qmake \"build_mode = release\"" )
  24. message( " qmake \"build_mode = debug\"" )
  25. message( "You can change the build type:" )
  26. message( " qmake \"build_type = static\"" )
  27. message( " qmake \"build_type = shared\"" )
  28. mac:!universal {
  29. message( "You can create a universal build:" )
  30. message( " qmake \"CONFIG *= universal\"" )
  31. }
  32. message( "Multiple options can be use at same time" )
  33. message( "Configuration complete" )
  34. # core headers
  35. fresh_core_headers.path = $${FRESH_INSTALL_HEADERS}/FreshCore
  36. fresh_core_headers.files = include/FreshCore/*
  37. win32:!cb_win32:fresh_core_headers.files *= $$system( for /R src/core %i in (*.h) do @echo %i )
  38. else:fresh_core_headers.files *= $$system( find src/core -name '*.h' )
  39. fresh_core_headers.files = $$replace( fresh_core_headers.files, $${Q_BACK_SLASH}, $${Q_SLASH} )
  40. # gui headers
  41. fresh_gui_headers.path = $${FRESH_INSTALL_HEADERS}/FreshGui
  42. fresh_gui_headers.files = include/FreshGui/*
  43. win32:!cb_win32:fresh_gui_headers.files *= $$system( for /R src/gui %i in (*.h) do @echo %i )
  44. else:fresh_gui_headers.files *= $$system( find src/gui -name '*.h' )
  45. fresh_gui_headers.files = $$replace( fresh_gui_headers.files, $${Q_BACK_SLASH}, $${Q_SLASH} )
  46. # generate fresh.prf
  47. # remove old one if needed
  48. prf_file = $${OUT_PWD}/fresh.prf
  49. win32:!cb_win32:prf_file = $$replace( prf_file, $${Q_SLASH}, $${Q_BACK_SLASH} )
  50. exists( $${prf_file} ) {
  51. win32:!cb_win32 {
  52. system( "del $${prf_file}" )
  53. } else {
  54. system( "rm $${prf_file}" )
  55. }
  56. }
  57. # create target directory if needed
  58. path = $$dirname( prf_file )
  59. !isEmpty( path ):!exists( $${path} ) {
  60. win32:!cb_win32 {
  61. system( "mkdir $${path}" )
  62. } else {
  63. system( "mkdir -p $${path}" )
  64. }
  65. }
  66. # create new one based on build type
  67. isEqual( FRESH_BUILD_TYPE, static ) {
  68. win32:!cb_win32 {
  69. system( "copy fresh_static.prf $${prf_file}" )
  70. } else {
  71. system( "cp fresh_static.prf $${prf_file}" )
  72. }
  73. } else {
  74. win32:!cb_win32 {
  75. system( "copy fresh_shared.prf $${prf_file}" )
  76. } else {
  77. system( "cp fresh_shared.prf $${prf_file}" )
  78. }
  79. }
  80. # features
  81. features.path = $${FRESH_INSTALL_FEATURES}
  82. features.files = $${prf_file}
  83. # translations
  84. translations.path = $${FRESH_INSTALL_TRANSLATIONS}
  85. translations.files = translations/*.ts
  86. translations.files *= translations/*.qm
  87. # library
  88. target.path = $${FRESH_INSTALL_LIBS}
  89. INSTALLS = fresh_core_headers fresh_gui_headers features translations target
  90. }