Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,8 @@ name: CI
on:
pull_request:
schedule:
- cron: '0 0 * * *' # every day at midnight
- cron: '0 0 * * 0' # every Sunday at midnight
workflow_dispatch: # manual trigger

jobs:
# Make sure we only invoke known gradle-wrapper.jar files
Expand Down Expand Up @@ -49,4 +50,4 @@ jobs:
- name: Test gdscript
shell: bash
working-directory: gdscript
run: ./gradlew -PBuildConfiguration=Release -PbuildNumber=${{ github.run_number }} test
run: ./gradlew -PBuildConfiguration=Release -PbuildNumber=${{ github.run_number }} test
65 changes: 65 additions & 0 deletions .github/workflows/editor-plugin-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
# For syntax, see https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# This workflow is automatically triggered for every push and pull request, to verify that everything still builds.

name: Editor Plugin CI
on:
workflow_call:
push:
pull_request:
merge_group:

defaults:
run:
working-directory: godot-editor-plugin/addons/rider-plugin/cpp

jobs:
build:
strategy:
fail-fast: false
matrix:
# Test a few selected combinations of parameters ("test case matrix").
include:
- target: { platform: linux, arch: x86_64, os: ubuntu-22.04 }
target-type: editor
float-precision: single
- target: { platform: windows, arch: x86_64, os: windows-latest }
target-type: editor
float-precision: single
- target: { platform: macos, arch: universal, os: macos-latest }
target-type: editor
float-precision: single

runs-on: ${{ matrix.target.os }}
steps:
# Clone this repository
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

# Setup dependencies
- name: Setup godot-cpp
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/setup-godot-cpp
with:
platform: ${{ matrix.target.platform }}
em-version: 3.1.62

# Build GDExtension (with caches)
- name: Restore .scons_cache
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/godot-cache-restore
with:
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}

- name: Build GDExtension Debug Build
shell: sh
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
run: |
scons target=${{ matrix.target-type }} platform=${{ matrix.target.platform }} arch=${{ matrix.target.arch }} precision=${{ matrix.float-precision }}

- name: Save .scons_cache
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/godot-cache-save
with:
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}
171 changes: 171 additions & 0 deletions .github/workflows/editor-plugin-make-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
# For syntax, see https://docs.github.com/en/actions/reference/workflows-and-actions/workflow-syntax
# This workflow is triggered manually on the "Actions" tab on GitHub, and can be used to create releases.

name: Editor Plugin Build
on:
workflow_dispatch:
inputs:
tag_name:
description: 'Tag to create for the GitHub Release (e.g., v1.2.3). Leave empty to auto-generate.'
required: false
type: string
release_name:
description: 'Release title. Defaults to tag name or an auto-generated name.'
required: false
type: string
draft:
description: 'Create as a draft release'
required: false
type: boolean
default: true
prerelease:
description: 'Mark release as prerelease'
required: false
type: boolean
default: false

jobs:
build:
defaults:
run:
working-directory: godot-editor-plugin/addons/rider-plugin/cpp
strategy:
fail-fast: false
matrix:
target:
[
{ platform: linux, arch: x86_64, os: ubuntu-22.04 },
{ platform: linux, arch: arm64, os: ubuntu-22.04-arm },
{ platform: windows, arch: x86_64, os: windows-latest },
{ platform: windows, arch: arm64, os: windows-latest },
{ platform: macos, arch: universal, os: macos-latest },
]
target-type: [editor]
float-precision: [single, double]

runs-on: ${{ matrix.target.os }}
steps:
# Clone this repository
- name: Checkout
uses: actions/checkout@v4
with:
submodules: true

# Setup dependencies
- name: Setup godot-cpp
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/setup-godot-cpp
with:
platform: ${{ matrix.target.platform }}
em-version: 3.1.62

# Build GDExtension (with caches)
- name: Restore .scons_cache
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/godot-cache-restore
with:
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}

- name: Build GDExtension
shell: sh
env:
SCONS_CACHE: ${{ github.workspace }}/.scons-cache/
run: |
scons target=${{ matrix.target-type }} platform=${{ matrix.target.platform }} arch=${{ matrix.target.arch }} precision=${{ matrix.float-precision }}

- name: Save .scons_cache
uses: ./godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp/.github/actions/godot-cache-save
with:
scons-cache: ${{ github.workspace }}/.scons-cache/
cache-name: ${{ matrix.target.platform }}_${{ matrix.target.arch }}_${{ matrix.float-precision }}_${{ matrix.target-type }}

# Clean up compilation files
- name: Windows - Delete compilation files
if: ${{ matrix.target.platform == 'windows' }}
shell: pwsh
run: |
Remove-Item bin/* -Include *.exp,*.lib,*.pdb -Force

# Upload the build
- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: rider-plugin-addons-${{ matrix.target.platform }}-${{ matrix.target.arch }}-${{ matrix.float-precision }}-${{ matrix.target-type }}
path: |
godot-editor-plugin
!godot-editor-plugin/main.tscn
!godot-editor-plugin/project.godot
!godot-editor-plugin/addons/rider-plugin/cpp/**
!**/.git/**
!**/.idea/**
!**/.godot/**
!**/.import/**
!**/.scons*/**
!**/*.exp
!**/*.lib
!**/*.pdb
!**/.gitignore

# Merges all the build artifacts together into a single artifact
merge:
runs-on: ubuntu-22.04
needs: build
defaults:
run:
working-directory: .
steps:
- name: Merge Artifacts
uses: actions/upload-artifact/merge@v4
with:
name: rider-plugin-addons
pattern: rider-plugin-addons-*
delete-merged: true

release:
name: Create GitHub Release
runs-on: ubuntu-22.04
needs: merge
permissions:
contents: write
steps:
- name: Download merged artifact
uses: actions/download-artifact@v6
with:
name: rider-plugin-addons
path: rider-plugin-addons

- name: Prepare archive
run: |
cd rider-plugin-addons
zip -r ../rider-plugin-addons.zip .
cd ..

- name: Compute release params
id: rel
shell: bash
run: |
TAG_INPUT="${{ github.event.inputs.tag_name }}"
NAME_INPUT="${{ github.event.inputs.release_name }}"
if [ -z "$TAG_INPUT" ]; then
TAG="manual-${GITHUB_RUN_NUMBER}"
else
TAG="$TAG_INPUT"
fi
if [ -z "$NAME_INPUT" ]; then
NAME="$TAG"
else
NAME="$NAME_INPUT"
fi
echo "tag=$TAG" >> "$GITHUB_OUTPUT"
echo "name=$NAME" >> "$GITHUB_OUTPUT"

- name: Create GitHub Release and upload asset
uses: softprops/action-gh-release@v2
with:
tag_name: ${{ steps.rel.outputs.tag }}
name: ${{ steps.rel.outputs.name }}
files: rider-plugin-addons.zip
draft: ${{ github.event.inputs.draft }}
prerelease: ${{ github.event.inputs.prerelease }}
generate_release_notes: true
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
8 changes: 8 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
[submodule "godot-editor-plugin/addons/rider-plugin/cpp/rider-cpp-msbuild"]
path = godot-editor-plugin/addons/rider-plugin/cpp/rider-cpp-msbuild
url = https://github.com/JetBrains/rider-cpp-msbuild.git
branch = main
[submodule "godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp"]
path = godot-editor-plugin/addons/rider-plugin/cpp/godot-cpp
url = https://github.com/godotengine/godot-cpp.git
branch = 4.2
3 changes: 3 additions & 0 deletions godot-editor-plugin/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
**/.idea
**/.DS_Store
**/.godot
21 changes: 21 additions & 0 deletions godot-editor-plugin/addons/rider-plugin/LICENCE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2025 JetBrains

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
51 changes: 51 additions & 0 deletions godot-editor-plugin/addons/rider-plugin/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
# JetBrains Rider External Editor – Godot Plugin

A Godot Editor plugin that adds a "Use Rider" toggle to the Godot toolbar and, when enabled, applies a set of editor settings recommended for working with JetBrains Rider as your external script editor.

The goal is to make it trivial to switch between Rider‑optimized settings and stock Godot settings with a single click.

## Quick start

Requirements:
- Godot 4.2.2

Install:
1. Copy the `addons/rider-plugin` folder into your project (keep the path as is).
2. [Optional] Change the initial value of `active` in the plugin.cfg
3. [Optional] Change the initial values in the presets.json file.
4. Enable "JetBrains Rider External Editor" plugin in the Project → Project Settings… → Plugins tab.

Use:
- A toolbar toggle named "Use Rider" will appear. Click it to turn the preset On/Off.

Screenshot:
![Toolbar toggle](screenshots/Toolbar.png)

## What the toggle changes

The preset values live in `presets.json`.

When ON:
- Write the values from the "on" preset into the Editor Settings.

When OFF:
- Write the values from the "off" preset into the Editor Settings.

Note: The plugin does not currently auto‑set Rider’s executable path or flags. See Plans below.

## Setting Rider to be the external editor

The plugin automatically detects installed Rider versions on your system and provides a convenient dropdown menu to
select which installation to use as your external editor.

- The plugin scans common installation locations for Rider on Windows, macOS, and Linux.
- Detected installations appear in the "Select Rider" dropdown in the toolbar.
- When you select a Rider installation, the plugin automatically updates the `dotnet/editor/external_editor_path` editor
setting.

## License
See `addons/rider-plugin/LICENCE`.

## Acknowledgements
Created by JetBrains to streamline using Rider with Godot.
Initial idea https://github.com/sszigeti/toggle_external_editor
Loading