Compiling from Source

Setup

  • haxe setup.hxml

    • Install required Haxe libs, listed in the file setup.hxml .

  • cd app  -> npm i

    • Install Electron locally and other dependencies through NPM.

Compile

  • haxe main.debug.hxml

  • haxe renderer.debug.hxml

  • cd app  -> npm run start

  • The app/package.json  contains a list of other commands to use with npm run _command_

Changing entries

  • In LDtk :

    • Add the entry in the class by changing the entries in:

      • new

      • toJson

      • fromJson

    • Visually:

      • related .html  file.

        • Makes things appear in the interface, but nothing is saved when making any change.

      • ui/modal/panel/_related_script_/updateForm()

        • Used to save the changes made in the interface. Without this, opening and closing a tab in the app loses the information.

        • References:

          • zindex .

          • ysort .

          • colWidth .

          • colMode .

  • In ldtk-haxe-api (Schema) :

    • About :

      • It is necessary to change the ldtk-haxe-api , because it is there that the json schemas are obtained.

      • The classes ldtk.Json , etc, come from that lib.

      • It is not necessary to change docs/JSON_SCHEMA.json  or docs/MINIMAL_JSON_SCHEMA.json .

      • It is not necessary to change the version of ldtk-haxe-api  before running the haxelib git ldtk-haxe-api ... etc  command.

    • Change the files of the ldtk-haxe-api .

      • I believe the only important file is src/json.hx

    • COMMIT the modifications to the remote.

      • You need to do this every time you change the ldtk-haxe-api .

    • Run LDtk - Fetch Schema .

      • Runs this in the background: haxelib git ldtk-haxe-api https://github.com/caioraphael1/ldtk-haxe-api.git caio

      • You need to do this every time you change the ldtk-haxe-api .

  • Finally :

    • Run LDtk - Compile & Run .

  • My post:

      1. I figured it out: I had to fork https://github.com/deepnight/ldtk , make my changes in the src/ldtk/Json.hx  file, push to remote, and run inside the ldtk root folder haxelib git ldtk-haxe-api https://github.com/caioraphael1/ldtk-haxe-api.git caio , which refers to my github fork and branch caio .

    • I have no idea if this is the "right way" to do it, but it works.

    • I didn't have to alter the setup.hxml  file, but I had to make sure to run the haxelib  with the correct path to my fork. Placing a reference to my fork inside the setup.hxml  file and running haxe setup.hxml  didn't work, for some reason, so I ended up just ignoring the setup.hxml  file.