GromScript core repository https://vgorl.is/projects/gromscript
  • C++ 97.6%
  • GDScript 1.4%
  • Python 0.9%
Find a file
2026-06-01 03:06:52 +01:00
.forgejo Many edits, sorry i have not been good at keeping on top of da commits but refactoring for blocks and actors and stuff! 2025-07-31 15:37:39 +01:00
.vscode init 2025-03-17 15:31:40 +00:00
bin Bugfixed syntax highlighting 2025-10-10 03:34:43 +01:00
docs Set Controller token and Break token added, more updates on GromTime 2025-04-05 14:09:50 +01:00
godot-cpp@e83fd0904c Update godot-cpp into submodule and fix replace_chars call 2026-06-01 02:36:25 +01:00
project Start signal + lots of unknowns - woops 2026-05-31 15:48:11 +01:00
psuedo-scripts BROKEN: mid-refactor, psuedo scripts! 2025-07-12 01:29:32 +01:00
src Bugfix: expose GromScriptPersistentCache 2026-06-01 03:06:52 +01:00
.clang-format init 2025-03-17 15:31:40 +00:00
.dir-locals.el Bugfixed for clang compiler, setup emacs project files 2025-10-30 03:01:19 +00:00
.editorconfig init 2025-03-17 15:31:40 +00:00
.gdignore init 2025-03-17 15:31:40 +00:00
.gitattributes init 2025-03-17 15:31:40 +00:00
.gitignore Start signal + lots of unknowns - woops 2026-05-31 15:48:11 +01:00
.gitmodules init 2025-03-17 15:31:40 +00:00
.projectile Bugfixed for clang compiler, setup emacs project files 2025-10-30 03:01:19 +00:00
.rgignore RGIgnore for ripgrep project search 2025-11-02 23:26:30 +00:00
extension_api.json Bugfixed for clang compiler, setup emacs project files 2025-10-30 03:01:19 +00:00
GromScriptLarge.png Removed multithreading, other refactors, broken: saving scripts doesnt reload properly 2025-08-20 12:36:54 +01:00
GromScriptModule.png bugfix: inifinite loop on no marker token in stack 2025-06-16 18:03:45 +01:00
gromtime.png GSA load now validates, plus some debug 2025-04-02 22:32:43 +01:00
gromtime_debug.pdn Promise tokens, markers and returns, option reading logic and read_till_stop logic. +bugfixes 2025-06-02 15:10:54 +01:00
gromtime_debug.png Promise tokens, markers and returns, option reading logic and read_till_stop logic. +bugfixes 2025-06-02 15:10:54 +01:00
gromtime_debug_1.png Promise tokens, markers and returns, option reading logic and read_till_stop logic. +bugfixes 2025-06-02 15:10:54 +01:00
gromtime_icon.pdn bugfix: inifinite loop on no marker token in stack 2025-06-16 18:03:45 +01:00
icon.pdn BROKEN: Expression parsing updates. Currently getting Error 5 Access Denied errors, trying a revert 2025-03-28 12:08:50 +00:00
icon.png BROKEN: Expression parsing updates. Currently getting Error 5 Access Denied errors, trying a revert 2025-03-28 12:08:50 +00:00
methods.py init 2025-03-17 15:31:40 +00:00
minicon-warn.pdn Argument parsing includes escapes for attached args now, better GOTO handling 2025-09-23 14:59:59 +01:00
minicon.pdn Editor interface and icon, CAST bugfix with arg list -> meta interpretation, some GromTime work 2025-04-29 01:50:24 +01:00
minicon.png Editor interface and icon, CAST bugfix with arg list -> meta interpretation, some GromTime work 2025-04-29 01:50:24 +01:00
README.md init 2025-03-17 15:31:40 +00:00
SConstruct Work on implementing validation - and renamed everything to gromscript. didnt separate the refactor from the changes, sorry ;_; 2025-03-27 18:51:30 +00:00

godot-cpp template

This repository serves as a quickstart template for GDExtension development with Godot 4.0+.

Contents

  • An empty Godot project (demo/)
  • godot-cpp as a submodule (godot-cpp/)
  • GitHub Issues template (.github/ISSUE_TEMPLATE.yml)
  • GitHub CI/CD workflows to publish your library packages when creating a release (.github/workflows/builds.yml)
  • GitHub CI/CD actions to build (.github/actions/build/action.yml) and to sign Mac frameworks (.github/actions/build/sign.yml).
  • preconfigured source files for C++ development of the GDExtension (src/)
  • setup to automatically generate .xml files in a doc_classes/ directory to be parsed by Godot as GDExtension built-in documentation

Usage - Template

To use this template, log in to GitHub and click the green "Use this template" button at the top of the repository page. This will let you create a copy of this repository with a clean git history. Make sure you clone the correct branch as these are configured for development of their respective Godot development branches and differ from each other. Refer to the docs to see what changed between the versions.

For getting started after cloning your own copy to your local machine, you should:

  • initialize the godot-cpp git submodule via git submodule update --init
  • change the name of your library
    • change the name of the compiled library file inside the SConstruct file by modifying the libname string.
    • change the pathnames of the to be loaded library name inside the demo/bin/example.gdextension file. By replacing libgdexample to the name specified in your SConstruct file.
    • change the name of the demo/bin/example.gdextension file
  • change the entry_symbol string inside your demo/bin/your-extension.gdextension file to be configured for your GDExtension name. This should be the same as the GDExtensionBool GDE_EXPORT external C function. As the name suggests, this sets the entry function for your GDExtension to be loaded by the Godot editors C API.
  • register the classes you want Godot to interact with inside the register_types.cpp file in the initialization method (here initialize_gdextension_types) in the syntax GDREGISTER_CLASS(CLASS-NAME);.

Usage - Actions

This repository comes with a GitHub action that builds the GDExtension for cross-platform use. It triggers automatically for each pushed change. You can find and edit it in builds.yml. After a workflow run is complete, you can find the file godot-cpp-template.zip on the Actions tab on GitHub.

Note: for macos, you will have to build the binary as a .dylib in a EXTENSION-NAME.framework folder. The framework folder should also have a Resources folder with a file called Info.plist. Without this file, signing will fail.

Note: for iOS, the same should be as for MacOS, however the Info.plist file needs to be close to the .dylib, instead of in a Resources folder (If this is not done, the build will fail to upload to the App Store).

So, in our case, the builds should be:

bin/EXTENSION-NAME.macos.template_debug.framework/EXTENSION-NAME.macos.template_release
bin/EXTENSION-NAME.ios.template_debug.framework/EXTENSION-NAME.ios.template_release.arm64.dylib

Afterwards, you want to set in the `.gdextension` file the paths to the `.framework` folder, instead of the `.dylib` file (Note that for the `.dylib` binary, the extension is not needed, you could have a file without any extension and it would still work).

In the `name: Mac Sign` step, we are signing the generated mac binaries.
We are reusing the following action:
```yml
uses: godotengine/godot-cpp-template/.github/actions/sign@main
with:
  FRAMEWORK_PATH: bin/macos/macos.framework
  APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
  APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
  APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
  APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
  APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}
  APPLE_DEV_APP_ID: ${{ secrets.APPLE_DEV_APP_ID }}

As you can see, this action requires some secrets to be configured in order to run. Also, you need to tell it the path to the .framework folder, where you have both the binary (.dylib file) and the Resources folder with the Info.plist file.

Configuration - Mac Signing Secrets

In order to sign the Mac binary, you need to configure the following secrets: APPLE_CERT_BASE64, APPLE_CERT_PASSWORD, APPLE_DEV_PASSWORD, APPLE_DEV_ID, APPLE_DEV_TEAM_ID, APPLE_DEV_APP_ID. These secrets are stored in the example above in the Github secrets for repositories. The names of the secrets have to match the names of the secrets you use for your action. For more on this, read the Creating secrets for a repository article from Github.

These secrets are then passed down to the godotengine/godot-cpp-template/.github/actions/sign@main action that signs the binary.

In order to configure these secrets, you will need:

  • A Mac
  • An Apple ID enrolled in Apple Developer Program (99 USD per year)
  • A Resources/Info.plist in the framework folder. Take the one in this project as an example. Be careful to set CFBundleExecutable to the EXACT lib name, otherwise it won't work. Also, don't put strange names in the CFBundleName and other such places. Try to only use letters and spaces. Errors will be extremly vague if not impossible to debug.

For the actions you will need to set the following inputs. Store them as secrets in GitHub:

  • APPLE_CERT_BASE64
  • APPLE_CERT_PASSWORD
  • APPLE_DEV_ID
  • APPLE_DEV_TEAM_ID
  • APPLE_DEV_PASSWORD
  • APPLE_DEV_APP_ID

You will find here a guide on how to create all of them. Go to developer.apple.com:

  • Create an Apple ID if you dont have one already.
  • Use your Apple ID to register in the Apple Developer Program.
  • Accept all agreements from the Apple Developer Page.

APPLE_DEV_ID - Apple ID

APPLE_DEV_TEAM_ID - Apple Team ID

  • Go to developer.apple.com. Go to account.

  • Go to membership details. Copy Team ID.

  • APPLE_DEV_TEAM_ID = 1ABCD23EFG

APPLE_DEV_PASSWORD - Apple App-Specific Password

APPLE_CERT_BASE64 and APPLE_CERT_PASSWORD and APPLE_DEV_APP_ID

  • Go to developer.apple.com. Go to account.

  • Go to certificates.

  • Click on + at Certificates tab. Create Developer ID Application. Click Continue.

  • Leave profile type as is. Create a certificate signing request from a mac. You can use your own name and email address. Save the file to disk. You will get a file called CertificateSigningRequest.certSigningRequest. Upload it to the Developer ID Application request. Click Continue.

  • Download the certificate. You will get a file developerID_application.cer.

  • On a Mac, right click and select open. Add it to the login keychain. In the Keychain Access app that opened, login Keychain tab, go to Keys, sort by date modified, expand your key (the key should have name you entered at common name Common Name), right click the expanded certificate, get info, and copy the text at Details -> Subject Name -> Common Name. Eg.

  • APPLE_DEV_APP_ID = Developer ID Application: Common Name (1ABCD23EFG)

  • Then, select the certificate, right click and click export. At file format select p12. When exporting, set a password for the certificate. This will be APPLE_CERT_PASSWORD. You will get a Certificates.p12 file.

Eg.

  • APPLE_CERT_PASSWORD = <password_set_when_exporting_p12>

  • Then you need to make a base64 file out of it, by running:

base64 -i Certificates.p12 -o Certificates.base64
  • Copy the contents of the generated file: Eg.
  • APPLE_CERT_BASE64 = ...(A long text file)

After these secrets are obtained, all that remains is to set them in Github secrets and then use them in the Github action, eg. in the above Github action usage example, this part:

- name: Mac Sign
  if: ${{ matrix.platform == 'macos' && env.APPLE_CERT_BASE64 }}
  env:
    APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
  uses: godotengine/godot-cpp-template/.github/actions/sign@main
  with:
    FRAMEWORK_PATH: bin/macos/macos.framework
    APPLE_CERT_BASE64: ${{ secrets.APPLE_CERT_BASE64 }}
    APPLE_CERT_PASSWORD: ${{ secrets.APPLE_CERT_PASSWORD }}
    APPLE_DEV_PASSWORD: ${{ secrets.APPLE_DEV_PASSWORD }}
    APPLE_DEV_ID: ${{ secrets.APPLE_DEV_ID }}
    APPLE_DEV_TEAM_ID: ${{ secrets.APPLE_DEV_TEAM_ID }}