| 1 | BeIDE .prof project file format - a reverse engineering attempt[[BR]] |
| 2 | This is based on Philippe Houdoin's previous work.[[BR]] |
| 3 | |
| 4 | Hierarchical tags format.[[BR]] |
| 5 | Tag structure:[[BR]] |
| 6 | |
| 7 | {{{ |
| 8 | uint32 tag |
| 9 | uint32 tag data size |
| 10 | uint8 data[tag_data_size] |
| 11 | |
| 12 | (Values are big endian - always?) |
| 13 | |
| 14 | 'MIDE' = Metrowerks IDE top tag |
| 15 | uint32 = sizeof of tag data |
| 16 | 'DPrf' = Data project file? Define Prefs? |
| 17 | uint32 = size of tag data |
| 18 | 'PrEn' = Project/prefs encoding? |
| 19 | uint32 = size of tag data (4) |
| 20 | uint32 0xffffffff = ??? |
| 21 | 'PrVr' = Project/pref Version? |
| 22 | uint32 = size of tag data (4) |
| 23 | uint32 0x00000003 = ??? |
| 24 | 'Priv' = ??? |
| 25 | uint32 = size of tag data (8) |
| 26 | uint32 0x00000007 = ??? |
| 27 | uint32 0x00000000 = ??? |
| 28 | 'DAcc' = ??? |
| 29 | uint32 = size of tag data (16 = 0x10) |
| 30 | uint32 0x00000006 = ??? |
| 31 | uint32 0x00000000 = ??? |
| 32 | uint32 0x00000005 = ??? |
| 33 | uint32 0x00000002 = ??? (flags fields) |
| 34 | 'SPth' = Search Paths tag (fixed tag size of 0x0108 = 264 bytes) |
| 35 | uint32 = size of tag data (264 = 0x108) |
| 36 | uint32 = Flags field ? (values seen so far: 0, 1 or 3) |
| 37 | uint8 = boolean ??? (local or system? precompiled/cached?) |
| 38 | uint8[259] = path string |
| 39 | 'PPth' = Project paths (reuse the same tag format above, see SPth tag) |
| 40 | 'Trgg' = Table of build "Trigger" ? Tag data is n x 140 bytes |
| 41 | record of bellow format: |
| 42 | uint32 = size of tag data (n x 140 bytes) |
| 43 | uint16 = build stage ? (ranging from 0-never, 1-preproc, |
| 44 | 2-compile, 3-link, 4-resource, ?=always) |
| 45 | uint16 = build flags (0 ou 1 ou 4 + 2 + 1 = ?) |
| 46 | uint8[8] = file kind extension |
| 47 | uint8[64] = tool kind (gcc_link, gcc, rsrc ?) |
| 48 | uint8[64] = file kind mime type |
| 49 | 'GPrf' = Global prefs ? |
| 50 | uint32 = size of tag data |
| 51 | 'GenB' = Generic block ? |
| 52 | uint32 = size of tag data |
| 53 | one single generic_block |
| 54 | |
| 55 | generic_block has the following structure: |
| 56 | uint32 = block group ID |
| 57 | uint32 = value size |
| 58 | string with zero ending = value name |
| 59 | uint32 = flags (1 = factory/default value?, 7 = custom ? To investigate) |
| 60 | uint8[value size - 4] = value |
| 61 | |
| 62 | List of generic blocks groups and names found so far: |
| 63 | |
| 64 | 'MWPr' = Metrowerks prefs ? |
| 65 | name = 'AppEditorPrefs', value = binary blob with colors, booleans, flags |
| 66 | 'cccg' = C compiler config |
| 67 | name = 'gccCompilerOptions', value = gcc options string |
| 68 | name = 'gccLanguage', value = language number ? |
| 69 | name = 'gccCommonWarning', value = array of uint8 booleans ? |
| 70 | name = 'gccWarning', value = array of uint8 booleans ? |
| 71 | name = 'gccCodeGeneration', value = array of uint8 booleans ? |
| 72 | 'dlcg' = dynamic linker config |
| 73 | name = 'gccLinkerOptions', value = gcc linker options string |
| 74 | name = 'AdditionalGCCLinkerOptions', value = additions linker options string |
| 75 | 'GNOL' = ??? (Globally needs object linking ?) |
| 76 | name = 'UpdateProject, value = uint32 (boolean?) |
| 77 | 'mwcx' = Metrowerks C++ ? |
| 78 | name = 'ProjectPrefsx86', value = binary blob with: |
| 79 | uint8[9] of flags & like... |
| 80 | uint8[64] = output file mime type (for setmime) (usually |
| 81 | 'application/x-vnd.Be-elfexecutable'!) |
| 82 | uint8[67 (!?)] = output file name |
| 83 | -> To investigate deeper |
| 84 | 'RsDt' = Resource Data config |
| 85 | name = 'ResData', value = array of uint8 booleans ? |
| 86 | 'mwcc' = Metrowerks C compiler |
| 87 | name = 'ProcessorPrefs', value = binary blob/array of booleans |
| 88 | name = 'XLanguagePrefs', value = binary blob/array of booleans |
| 89 | name = 'WarningsPrefs', value = binary blob/array of booleans |
| 90 | name = 'DisassemblerPrefs', value = ??? |
| 91 | name = 'GlobalOpts', value = ??? |
| 92 | 'mwld' = Metrowerks linker |
| 93 | name = 'LinkerPrefs', value = few array of booleans + 3 x |
| 94 | uint8[64), the symbol names of the |
| 95 | __start, _term_routine and _init_routine routines. |
| 96 | name = 'PEFPrefs', value = we don't care about PEF ;-) |
| 97 | name = 'ProjectNamePrefs', value = |
| 98 | uint8[64] = Default output name string ('Application') |
| 99 | SUBTYPE in big endian ('????') |
| 100 | TYPE 'BAPP' in big endian |
| 101 | uint8[64] = output mime type string |
| 102 | (application/x-be-executable) |
| 103 | 'ShDt' = Shell Data |
| 104 | name = 'ShellData', value = shell string options (usually '-noprofile') |
| 105 | 'msan' = NASM config |
| 106 | name = 'NASMOptions', value = cryptic binary blob :-( |
| 107 | |
| 108 | 'Sect' = Section (Group section in project list) |
| 109 | uint32 = size of tag data (always 0x50 bytes long) |
| 110 | uint32 = nb items ('Link', 'PLnk', 'Fil1' or 'IgFl' tags) in this section |
| 111 | uint32[2] = flags ? |
| 112 | uint8 = ??? boolean ??? |
| 113 | uint8[*] = Name of the section |
| 114 | |
| 115 | 'Link' = Link file |
| 116 | uint32 = size of tag data |
| 117 | uint32[6] = ??? |
| 118 | One or more file (sub-)tag: |
| 119 | |
| 120 | List of file sub-tags found so far: |
| 121 | 'Mime' = value = MIME type of the file (one per parent tag) |
| 122 | uint32 = sizeof tag data |
| 123 | uint32 = size of value = size of tag data - sizeof(uint32) |
| 124 | uint8[size of value] = MIME type of the file |
| 125 | 'MSFl' = Master/Main/Module? Source File (one per parent tag) |
| 126 | (either a library file, or a source file) |
| 127 | uint32 = sizeof tag data |
| 128 | uint32[2] = flags (to investigate) |
| 129 | 'Name' |
| 130 | uint32 = sizeof 'Name' tag |
| 131 | uint32 = sizeof 'Name' value |
| 132 | uint8[size of 'Name' value] = File name (no path) |
| 133 | 'SrFl' = Source File dependencies ([0..n] tags after the 'MSFl' tag) (mostly, headers - presents in Fil1 parent tag) |
| 134 | uint32 = sizeof tag data |
| 135 | uint32[2] = flags (to investigate) |
| 136 | 'Name' |
| 137 | uint32 = sizeof 'Name' tag |
| 138 | uint32 = sizeof 'Name' value |
| 139 | uint8[size of 'Name' value] = File name (no path) |
| 140 | |
| 141 | 'PLnk' = Post-Link file? (e.g. resource file) |
| 142 | Same structure as 'Link' |
| 143 | 'Fil1' = One build file |
| 144 | Same structure as 'Link' |
| 145 | 'IgFl' = Ignored File, for file user has added to project list for easy access but is not build (e.g. local headers) |
| 146 | Same structure as 'Link'. Note that the next 2 following uint32 (off 6) are then set to 0xFFFF each. |
| 147 | 'Brws' = Source browser info |
| 148 | uint32 = size of tag |
| 149 | uint8[*] |
| 150 | }}} |