You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Provide a Makefile for integration in pret-based projects as a submodule (#80)
* Provide a Makefile for integration in pret-based projects as a submodule
Fixes: #78
* Override `TARGET` for native-Windows
Co-authored-by: Marcus Huderle <huderlem@gmail.com>
To automatically convert your Poryscript scripts when compiling a decomp project, perform these two steps:
85
88
1. Create a new `tools/poryscript/` directory, and add the `poryscript` command-line executable tool to it. Also copy `command_config.json` and `font_config.json` to the same location.
Users may wish to install Poryscript as a dependency of their project if they work with other collaborators and require all contributors to use the same version. To accomplish this, we can integrate the tool as a [Git submodule](https://git-scm.com/book/en/v2/Git-Tools-Submodules). This has an additional benefit of automatically rebuilding Poryscript from source when bumping to a new version.
125
+
126
+
1. Initialize the Git submodule. If you use a fork of Poryscript to implement custom features, replace the `https://github.com/huderlem/poryscript` URL with the appropriate URL for your fork.
4. Make the changes to `Makefile` as described above in [Basic Installation](#basic-installation).
150
+
151
+
5. Commit your changes and push to the remote.
152
+
153
+
This installation method necessitates some changes in your project's workflow. When cloning your project to a fresh local copy, you should specify the `--recursive` option, which will ensure that Poryscript is checked out alongside your repository:
After receiving the updates to integrate the submodule, existing local copies of the repository must do the following:
160
+
161
+
```bash
162
+
git submodule update --init
163
+
```
164
+
165
+
Finally, if/when new changes are pushed to Poryscript that you wish to receive, update the submodule like you would any other Git repository:
166
+
167
+
```bash
168
+
cd tools/poryscript
169
+
git fetch
170
+
git checkout REF # REF can be a version tag, a branch, or a commit hash
171
+
cd -
172
+
git add tools/poryscript
173
+
git commit
174
+
git push
175
+
```
176
+
120
177
## Convert Existing Scripts
121
178
If you're working on a large project, you may want to convert all of the existing `scripts.inc` files to their `scripts.pory` equivalents. Since there are a large number of script files in the Gen 3 projects, you can save yourself a lot of time by following these instructions. **Again, this is completely optional, and you would only want to perform this bulk conversion if you're emabarking on large project where it would be useful to have all the existing scripts setup as Poryscript files.**
0 commit comments