defines.h 6.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149
  1. #ifndef DEFINES_H
  2. #define DEFINES_H
  3. enum WidgetType{ W3C_WIDGET = 0, APPLE_WIDGET, GOOGLE_WIDGET, YAHOO_WIDGET, OPERA_WIDGET, WRT_WIDGET, DIRECTORY, UNKNOWN_WIDGET };
  4. // TODO get rid of this enum here, try getting rid of even in the iqtprojectgenerator interface
  5. // rationale: these phases are too much symbian specific
  6. // OBS FDOS enum GeneratorPhase{ INITIAL, UNZIP_WIDGET, QMAKE_PLUGINS, MAKE_PLUGINS, QMAKE_FW, MAKE_FW, MAKESIS_FW, QMAKE_APP, MAKE_APP, MAKESIS_APP, ENDED_SUCCESSFULLY, ENDED_WITH_ERRORS, };
  7. /**
  8. * Phases of project generation vary from platform to platform, even
  9. * in their numbers. Therefore this is just a generic placeholder for an
  10. * intvalue that will happen to be the same as a platform specific enum value.
  11. *
  12. * The reason this is not merely an int or even a typedef to an int is
  13. * that this way compiler will enforce that this is a different type (although
  14. * opaque from the application point of view).
  15. */
  16. struct GeneratorPhase
  17. {
  18. int m_phase;
  19. GeneratorPhase(int phase);
  20. GeneratorPhase();
  21. };
  22. bool operator==(const GeneratorPhase & left,
  23. const GeneratorPhase & right);
  24. bool operator!=(const GeneratorPhase & left,
  25. const GeneratorPhase & right);
  26. enum GeneratorTarget { NO_TARGET, PREVIEW, BUILD, REBUILD };
  27. //enum SymbianCapabilities{ LOCALSERVICES, LOCATION, NETWORKSERVICES, READUSERDATA, USERENVIRONMENT, WRITEUSERDATA, POWERMGMT, PROTSERV, READDEVICEDATA, SORROUNDINGSDD, SWEVENT, TRUSTEDUI, WRITEDEVICEDATA, COMMDD, DISKADMIN, NETWORKCONTROL, MULTIMEDIADD, ALLFILES, DRM, TCB };
  28. #define GENERATOR_QT_VERSION "4.6.2"
  29. #define HAG_TEMP_DIR "/__hag_temp_dir"
  30. #define BUILD_DIR "/hag_build/"
  31. #define FRAMEWORK_DIR "/fw/"
  32. #define PLUGINSTUBS_DIR "/qmakepluginstubs/"
  33. #define TEMPLATES_DIR "/templates/hybrid/"
  34. #define PLUGINS_DIR "/mw/"
  35. #define WIDGET_SUBDIR "widget/"
  36. #define PLUGINS_PROJECT_FILE "mw.pro"
  37. #define FRAMEWORK_PROJECT_FILE "fw.pro"
  38. #define PROJECT_TEMPLATE_FILE "hybridapp.pro"
  39. #define HYBRIDAPI_JS_FILE "hybridapi.js"
  40. #define DISABLE_SELECTION_CSS_FILE "disable-selection.css"
  41. #define INFO_PLIST_FILE "info.plist"
  42. #define ICON_FILE "icon.png"
  43. #define MAIN_FILE "main.cpp"
  44. #define MAIN_WINDOW_FILE "mainwindow.cpp"
  45. #define WIDGET_IDENTIFIER_FILE "coremethods.cpp"
  46. #define GENERATOR_LOG_FILE "hag.log"
  47. #define W3C_CONFIG_FILE "config.xml"
  48. #define W3C_MAIN_HTML_FILE "index.html"
  49. #define W3C_ROOT_TAG "widget"
  50. #define WRT_WIDGET_FILE_EXTENSION "wgz"
  51. #define QMAKE_APP_NAME "qmake"
  52. #define MAKE_APP_NAME "make"
  53. #define MAKESIS_APP_NAME "makesis"
  54. #define UNZIP_APP_NAME "unzip"
  55. #define INFO_PLIST_TAG_KEY "key"
  56. #define INFO_PLIST_TAG_DICT "dict"
  57. #define QRC_FILE_TAG_RCC "RCC"
  58. #define QRC_FILE_TAG_QRESOURCE "qresource"
  59. #define QRC_FILE_ATTRIBUTE_PREFIX "prefix"
  60. #define QRC_FILE_TAG_FILE "file"
  61. #define CONFIG_XML_WIDGET_TAG "widget"
  62. // key values in info.plist file
  63. #define INFO_PLIST_KEY_DISPLAY_NAME "DisplayName"
  64. #define INFO_PLIST_KEY_IDENTIFIER "Identifier"
  65. #define INFO_PLIST_KEY_MAIN_HTML "MainHTML"
  66. #define INFO_PLIST_KEY_ALLOW_NETWORK_ACCESS "AllowNetworkAccess"
  67. #define INFO_PLIST_KEY_VERSION "Version"
  68. #define INFO_PLIST_KEY_MINI_VIEW_ENABLED "MiniViewEnabled"
  69. #define INFO_PLIST_KEY_UID "UID"
  70. #define KEY_WIDGET_ROOT_DIR "WidgetRootDir"
  71. #define KEY_WIDGET_ICON_FILE "WidgetIconFile"
  72. // tags to be replaced in template files
  73. #define MAIN_HTML_FILE_TAG "@main_html_file"
  74. #define TOOL_NAME_TAG "@tool_name"
  75. #define TIMSTAMP_TAG "@timestamp"
  76. #define APPLICATION_NAME_TAG "@application_name"
  77. #define RESOURCE_FILE_TAG "@resource_file"
  78. #define WIDGET_IDENTIFIER_TAG "@widget_identifier"
  79. #define SYMBIAN_UID3_TAG "@uid3"
  80. #define PANNING_ENABLED_TAG "@panning_enabled"
  81. #define FULL_SCREEN_TAG "@full_screen_enabled"
  82. #define SOFT_KEYS_TAG "@soft_keys_enabled"
  83. #define INFO_PLIST_DISPLAY_NAME_TAG "@DisplayName"
  84. #define INFO_PLIST_IDENTIFIER_TAG "@Identifier"
  85. #define INFO_PLIST_MAIN_HTML_TAG "@MainHTML"
  86. #define INFO_PLIST_VERSION_TAG "@Version"
  87. #define MOBILITY_PATH_TAG "@qt_mobility_path"
  88. #define SDK_VERSION_DEFINES_TAG "@sdk_version_defines"
  89. #define PLUGIN_DEPLOYMENT_TAG "@hybrid_plugin_deployment"
  90. #define TOOL_NAME_STRING "Qt Project Generator"
  91. #define PLUGINS_PROJECT_FILE_CONTENT "TEMPLATE = subdirs\nCONFIG += ordered\nSUBDIRS = %1"
  92. #define MSG_PROCESS_EXIT_CODE_STATUS "existCode: %1, exitStatus: %2"
  93. #define MSG_FILE_PROCESSING_COMPLETED "%1 file processing completed"
  94. #define MSG_FILE_UPDATED_SUCCESSFULLY "%1 file updated successfully"
  95. #define MSG_FILE_CREATED_SUCCESSFULLY "%1 file created successfully"
  96. #define MSG_WIDGET_DIRECTORY_PROCESSED_N_FILES_FOUND "Widget directory processed: %1 files found"
  97. #define MSG_WIDGET_FILES_COPIED_TO_DIRECTORY "Widget files copied to %1"
  98. #define ERR_FILE_NOT_SELECTED "File not selected! Cannot continue!"
  99. #define ERR_FILE_NOT_FOUND "%1 not found! Cannot continue!"
  100. #define ERR_FILE_NOT_FOUND_CAN_CONTINUE "%1 not found!"
  101. #define ERR_FILE_OPEN_READ_FAILED_CANNOT_CONTINUE "Failed to open %1 file for reading! Cannot continue!"
  102. #define ERR_FILE_OPEN_WRITE_FAILED_CANNOT_CONTINUE "Failed to open %1 file for writing! Cannot continue!"
  103. #define ERR_FILE_OPEN_WRITE_FAILED_CAN_CONTINUE "Failed to open %1 file for writing!"
  104. #define ERR_PROCESS_FINISHED_WITH_ERRORS_CANNOT_CONTINUE "%1 finished with errors, cannot continue: "
  105. #define ERR_FILE_COPY_FAILED "Failed to copy file %1 to %2!"
  106. #define ERR_FILE_OPEN_FAILED_TITLE "File open failed"
  107. #define ERR_TITLE "Error"
  108. #define ERR_WIDGET_TAG_NOT_FOUND_CANNOT_CONTINUE "widget-tag not found in config.xml file! Cannot continue!"
  109. #define ERR_CANNOT_FIND_UID3_IN_MMP_FILE "UID not found in %1 file, cannot embed hybridfw sis in application sis"
  110. #define ERR_FILE_PARSING_FAILED_CANNOT_CONTINUE "Failed to parse %1 file! Cannot continue!"
  111. #define ERR_XML_NODE_NOT_FOUND "%1 node not found in %2, file can not be processed!"
  112. #define HAG_STATUS_EXTRACTING_WIDGET "Extracting widget files";
  113. #define HAG_STATUS_BUILDING_APP "Building hybrid application";
  114. #define HAG_STATUS_BUILDING_PLUGINS "Building plugins";
  115. #define HAG_STATUS_IDLE "Idle";
  116. #define HAG_STATUS_COMPLETED_OK "Compilation completed successfully";
  117. #define HAG_STATUS_COMPLETED_NOTOK "Compilation failed. See hag.log file for details.";
  118. #endif // DEFINES_H