Open main menu

Difference between revisions of "HOWTO-Engine Inclusion"

Added commands for process out-of-tree engines
(→‎Preparing your engine: fixed wording)
(Added commands for process out-of-tree engines)
 
Line 31: Line 31:


Please, also look at our Wiki or ask around on Discord, perhaps we already have someone working on this engine, so you could rather join your efforts.
Please, also look at our Wiki or ask around on Discord, perhaps we already have someone working on this engine, so you could rather join your efforts.
==Processing out-of-tree engines==
The modern way of engine development is keeping it in a separate repo with contents only of the `engines/<engine>` directory. This, however, leads to history starting from the root commit and in wrong directory. To fix the history, use the following commands:
  git filter-branch --index-filter \
        'git ls-files -s | sed "s-\t\"*-&engines/bagel/-" |
                GIT_INDEX_FILE=$GIT_INDEX_FILE.new \
                        git update-index --index-info &&
        mv "$GIT_INDEX_FILE.new" "$GIT_INDEX_FILE"' HEAD
Replace `bagel` with name of your engine. This will rewrite history and make it look like it was always developed in `engines/bagel` directory.
Then do:
  git format-patch -o a --root
Then, in your scummvm fork:
  git checkout -b bagel
  git am <path-to-directory-where-you-have-the-repo/a/*>
This will create a set of commits of the engine as it was developed right in-tree. Then push and create a PR.
 


==Starting the pull request==
==Starting the pull request==