Fresh IDE . Artifact [d3f7fa189f]
Not logged in

This repository is a mirror!

The original is located on: https://fresh.flatassembler.net/fossil/repo/fresh
If you want to follow the project, please update your remote-url

Artifact d3f7fa189fb9e5cba3d70c9d9d278585308c1918:


The project file format must be flexible enough to provide
free developement of new features and compatibility with the
previous projects.
Also, it is good to keep it in binary format, as more assembly like. :)

Project must contain following data:

1. Project options - actually I think that all IDE options - directories, environment variables
                     even help files must be project based, not IDE based.
                     Of course, present options should be maintained as well.

2. Project tree - here should be possible to set files as links and as a text inside the project.
3. Main file / main files....
4. project encapsulated source files.


Project file format:

0. Header: 

offset len       content         description
------+-----+----------------+----------------------------------
  0   |  4  |    'FNPr'      | "(F)resh (N)ew (Pr)oject format"
  4   |  2  |   $0d, $0a     |  CR+LF
  6   |  1  |   $1a          |  EOF
  7   |  1  |   $0a          |  LF      (pad to 8
------+-----+----------------+----------------------------------



1. Chunk header:

offset  len      content         description
------+-----+----------------+--------------------------------------------------
  0   |  4  |   dword Name   |   Readable name of the chunk.
  4   |  4  |   dword L      |   Length of data field of the chunk in bytes.
  8   |  L  |   data bytes   |   Data bytes of the chunk.
  L+8 |  4  |   Hash         |   FNV-1a hash of the chunk data.
------+-----+----------------+--------------------------------------------------

3. Common chunks:

PRTR - project tree element. Contains one category and list of containing files.
       Files that are inside the project directory (the directory of the
       project file) will have relative names. The files that are outside the project
       directory should have absolute filenames.
       Files have no custom icons - they have icons depending on file type.

ICPL - icons pool - contains the icons used in the project tree.

ESRC - embeded source file - identified with unique index in the chunk. Every index
       have respective item in EMDR chunk. The files can be text or binary (images for example)

EDIR - embeded sources directory. Contains tree of directories where embeded files resides.
       also, contains list of all embeded files in the project.

VARS - local environment variables defined for the project. If the names of the local and global
       variables conflicts - the local take precedence.

MAIN - main source file of the project.

CTNM - Target filename of the project (executable to be created)

CMEM - compiler options - memory size.


At first time following chunks should be implemented:

MAIN - main filename of the project.
PRTR - it contains the structure of the project.
VARS - good feature.
CTNM - name and auto flag of the project.
CMEM - compiler memory size.



PRTR data format:

[dword icon], [dword FLAGS], 'full category name', 0
'filename 1', 0
.......
'filename N', 0



VARS data format:

'name', 0, 'value', 0, ..., 0 - double NULL ends the list.

CTNM data format:

[byte flag], 'name', 0