removed rider plugin
This commit is contained in:
parent
6e0c935946
commit
f0ec206483
26 changed files with 1 additions and 663 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
<Project Sdk="Godot.NET.Sdk/4.7.1">
|
<Project Sdk="Godot.NET.Sdk/4.7.2">
|
||||||
<PropertyGroup>
|
<PropertyGroup>
|
||||||
<TargetFramework>net10.0</TargetFramework>
|
<TargetFramework>net10.0</TargetFramework>
|
||||||
<EnableDynamicLoading>true</EnableDynamicLoading>
|
<EnableDynamicLoading>true</EnableDynamicLoading>
|
||||||
|
|
|
||||||
|
|
@ -1,33 +0,0 @@
|
||||||
# Contribution
|
|
||||||
|
|
||||||
Hello, thanks for taking time and helping out with the addon!
|
|
||||||
|
|
||||||
Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. Please sign the CLA before sending the PR: https://www.jetbrains.com/agreements/cla/.
|
|
||||||
|
|
||||||
#### Local setup
|
|
||||||
|
|
||||||
Open the `godot-editor-addon/CMakeLists.txt` in Rider 2026.1+, select `rider-gdextension` target in the run configuration selector.
|
|
||||||
There are some more fixes coming in 2026.2, which will allow working on gdscript and cpp files within the same workspace.
|
|
||||||
|
|
||||||
#### Signing the binaries
|
|
||||||
|
|
||||||
Plugin binaries need to be signed to comply with modern operating system security requirements. Unsigned dynamic libraries may fail to load or trigger security warnings:
|
|
||||||
|
|
||||||
- **macOS**: Requires code signing (and often notarization) for `.dylib` files. Unsigned libraries may simply fail to load.
|
|
||||||
- **Windows**: SmartScreen may block unsigned binaries, and corporate environments often enforce signed code only.
|
|
||||||
- **Linux**: Generally allows unsigned `.so` files, but some sandboxed environments (Flatpak, Snap) impose restrictions.
|
|
||||||
|
|
||||||
**How signing is implemented:**
|
|
||||||
|
|
||||||
1. **TeamCity Configuration**: [ijplatform_master_Net_Deploy_Plugins_Public_Godot](https://buildserver.labs.intellij.net/buildConfiguration/ijplatform_master_Net_Deploy_Plugins_Public_Godot) (internal JetBrains link)
|
|
||||||
- Note: The automatic trigger on new tags is currently not working, so manual triggering is required.
|
|
||||||
|
|
||||||
2. **Release Process**:
|
|
||||||
- First, use your GitHub Action to prepare a **pre-release** with a tag
|
|
||||||
- Manually trigger the TeamCity configuration on the necessary branch/tag
|
|
||||||
- The configuration will download assets, sign them, and upload them back (removing the pre-release flag)
|
|
||||||
- The pre-release flag is required at the start; otherwise, the signing configuration will skip the release (protection against double signing)
|
|
||||||
|
|
||||||
3. **Signing existing releases**:
|
|
||||||
- You can run signing on already existing old releases/tags
|
|
||||||
- Mark them as pre-release first, then run the configuration on the necessary tag
|
|
||||||
|
|
@ -1,21 +0,0 @@
|
||||||
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.
|
|
||||||
|
|
@ -1,51 +0,0 @@
|
||||||
# JetBrains Rider Integration – Godot addon
|
|
||||||
|
|
||||||
This addon currently provides two features:
|
|
||||||
1. Finds all Rider installations in the system and provides a selector on the `Text Editor` -> `External` tab in the settings to select one.
|
|
||||||
2. Provides the "Use Rider" toggle in the Godot toolbar and, when enabled, applies a set of editor settings recommended for working with JetBrains Rider. 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.5+
|
|
||||||
|
|
||||||
Install:
|
|
||||||
1. Inside the Godot editor, it can be installed from the AssetLib view or [downloaded](https://godotengine.org/asset-library/asset/4576)
|
|
||||||
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:
|
|
||||||

|
|
||||||
|
|
||||||
## 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
|
|
||||||
BIN
addons/rider-plugin/bin/linux/librider-gdextension.linux.editor.arm64.so
(Stored with Git LFS)
BIN
addons/rider-plugin/bin/linux/librider-gdextension.linux.editor.arm64.so
(Stored with Git LFS)
Binary file not shown.
BIN
addons/rider-plugin/bin/linux/librider-gdextension.linux.editor.x86_64.so
(Stored with Git LFS)
BIN
addons/rider-plugin/bin/linux/librider-gdextension.linux.editor.x86_64.so
(Stored with Git LFS)
Binary file not shown.
Binary file not shown.
|
|
@ -1,16 +0,0 @@
|
||||||
[configuration]
|
|
||||||
|
|
||||||
entry_symbol = "rider_library_init"
|
|
||||||
compatibility_minimum = "4.5.0"
|
|
||||||
|
|
||||||
[libraries]
|
|
||||||
|
|
||||||
macos.single.debug = "./macos/librider-gdextension.macos.editor.dylib"
|
|
||||||
|
|
||||||
windows.arm64.single.debug = "./windows/rider-gdextension.windows.editor.arm64.dll"
|
|
||||||
|
|
||||||
windows.x86_64.single.debug = "./windows/rider-gdextension.windows.editor.x86_64.dll"
|
|
||||||
|
|
||||||
linux.x86_64.single.debug = "./linux/librider-gdextension.linux.editor.x86_64.so"
|
|
||||||
|
|
||||||
linux.arm64.single.debug = "./linux/librider-gdextension.linux.editor.arm64.so"
|
|
||||||
BIN
addons/rider-plugin/bin/windows/rider-gdextension.windows.editor.x86_64.dll
(Stored with Git LFS)
BIN
addons/rider-plugin/bin/windows/rider-gdextension.windows.editor.x86_64.dll
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,144 +0,0 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
|
||||||
<!-- Generator: Adobe Illustrator 25.4.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
|
||||||
|
|
||||||
<svg
|
|
||||||
version="1.0"
|
|
||||||
id="katman_1"
|
|
||||||
x="0px"
|
|
||||||
y="0px"
|
|
||||||
viewBox="0 0 512 512"
|
|
||||||
xml:space="preserve"
|
|
||||||
sodipodi:docname="JetBrains Rider Icon.svg"
|
|
||||||
width="512"
|
|
||||||
height="512"
|
|
||||||
inkscape:version="1.1.1 (3bf5ae0d25, 2021-09-20)"
|
|
||||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
|
||||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
|
||||||
xmlns:xlink="http://www.w3.org/1999/xlink"
|
|
||||||
xmlns="http://www.w3.org/2000/svg"
|
|
||||||
xmlns:svg="http://www.w3.org/2000/svg"><defs
|
|
||||||
id="defs43" /><sodipodi:namedview
|
|
||||||
id="namedview41"
|
|
||||||
pagecolor="#505050"
|
|
||||||
bordercolor="#ffffff"
|
|
||||||
borderopacity="1"
|
|
||||||
inkscape:pageshadow="0"
|
|
||||||
inkscape:pageopacity="0"
|
|
||||||
inkscape:pagecheckerboard="1"
|
|
||||||
showgrid="false"
|
|
||||||
inkscape:zoom="1.0980553"
|
|
||||||
inkscape:cx="256.36233"
|
|
||||||
inkscape:cy="212.19333"
|
|
||||||
inkscape:window-width="1920"
|
|
||||||
inkscape:window-height="1027"
|
|
||||||
inkscape:window-x="-8"
|
|
||||||
inkscape:window-y="22"
|
|
||||||
inkscape:window-maximized="1"
|
|
||||||
inkscape:current-layer="katman_1" />
|
|
||||||
<style
|
|
||||||
type="text/css"
|
|
||||||
id="style2">
|
|
||||||
.st0{fill:url(#SVGID_1_);}
|
|
||||||
.st1{fill:url(#SVGID_00000130622934180993703410000017420799098261276343_);}
|
|
||||||
.st2{fill:url(#SVGID_00000060739771362873723200000017991140373209755022_);}
|
|
||||||
.st3{fill:#FFFFFF;}
|
|
||||||
</style>
|
|
||||||
<symbol
|
|
||||||
id="rider"
|
|
||||||
viewBox="-35 -35 70 70">
|
|
||||||
<linearGradient
|
|
||||||
id="SVGID_1_"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="30.4897"
|
|
||||||
y1="5.1188998"
|
|
||||||
x2="-23.4683"
|
|
||||||
y2="-25.8451">
|
|
||||||
<stop
|
|
||||||
offset="0"
|
|
||||||
style="stop-color:#DD1265"
|
|
||||||
id="stop4" />
|
|
||||||
<stop
|
|
||||||
offset="0.483"
|
|
||||||
style="stop-color:#DD1265"
|
|
||||||
id="stop6" />
|
|
||||||
<stop
|
|
||||||
offset="0.942"
|
|
||||||
style="stop-color:#FDB60D"
|
|
||||||
id="stop8" />
|
|
||||||
</linearGradient>
|
|
||||||
<path
|
|
||||||
class="st0"
|
|
||||||
d="M 35,-7.7 -14.1,-35 18.8,13.9 25.5,9.5 Z"
|
|
||||||
id="path11" />
|
|
||||||
|
|
||||||
<linearGradient
|
|
||||||
id="SVGID_00000169517474296634577950000016895268102491994795_"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="-1.5839"
|
|
||||||
y1="-28.888"
|
|
||||||
x2="19.805099"
|
|
||||||
y2="30.174999">
|
|
||||||
<stop
|
|
||||||
offset="0.139"
|
|
||||||
style="stop-color:#087CFA"
|
|
||||||
id="stop13" />
|
|
||||||
<stop
|
|
||||||
offset="0.476"
|
|
||||||
style="stop-color:#DD1265"
|
|
||||||
id="stop15" />
|
|
||||||
<stop
|
|
||||||
offset="0.958"
|
|
||||||
style="stop-color:#087CFA"
|
|
||||||
id="stop17" />
|
|
||||||
</linearGradient>
|
|
||||||
<path
|
|
||||||
style="fill:url(#SVGID_00000169517474296634577950000016895268102491994795_)"
|
|
||||||
d="M 15.5,-18.9 9.3,-33.9 -4.3,-20.5 1.2,28.1 14.4,35 35,23 Z"
|
|
||||||
id="path20" />
|
|
||||||
|
|
||||||
<linearGradient
|
|
||||||
id="SVGID_00000135668350575375336630000014638141720088491653_"
|
|
||||||
gradientUnits="userSpaceOnUse"
|
|
||||||
x1="-17.5865"
|
|
||||||
y1="-27.071199"
|
|
||||||
x2="-1.7875"
|
|
||||||
y2="29.073799">
|
|
||||||
<stop
|
|
||||||
offset="0.278"
|
|
||||||
style="stop-color:#DD1265"
|
|
||||||
id="stop22" />
|
|
||||||
<stop
|
|
||||||
offset="0.968"
|
|
||||||
style="stop-color:#FDB60D"
|
|
||||||
id="stop24" />
|
|
||||||
</linearGradient>
|
|
||||||
<path
|
|
||||||
style="fill:url(#SVGID_00000135668350575375336630000014638141720088491653_)"
|
|
||||||
d="m -14.1,-35 -20.9,14.1 7.8,48.1 20.1,7.7 26,-21 z"
|
|
||||||
id="path27" />
|
|
||||||
<path
|
|
||||||
d="M 21,-21 H -21 V 21 H 21 Z"
|
|
||||||
id="path29" />
|
|
||||||
<path
|
|
||||||
class="st3"
|
|
||||||
d="m -0.6,13.6 h -15.8 v 2.7 h 15.8 z"
|
|
||||||
id="path31" />
|
|
||||||
<path
|
|
||||||
class="st3"
|
|
||||||
d="m 0.5,-15.8 h 6.2 c 5,0 8.4,3.4 8.4,7.7 0,4.4 -3.4,7.9 -8.4,7.9 L 0.5,0 Z m 3.5,3.2 v 9.5 h 2.7 c 2.8,0 4.8,-1.9 4.8,-4.6 0,-2.8 -1.9,-4.7 -4.8,-4.7 z"
|
|
||||||
id="path33" />
|
|
||||||
<path
|
|
||||||
class="st3"
|
|
||||||
d="m -15.7,-15.8 h 7.2 c 2,0 3.5,0.6 4.6,1.6 0.9,0.9 1.3,2.1 1.3,3.6 v 0.1 c 0,1.3 -0.3,2.3 -0.9,3.1 -0.6,0.8 -1.4,1.4 -2.4,1.8 L -2,0 h -4.1 l -3.3,-4.8 h -2.9 V 0 h -3.5 z m 7,7.7 c 0.8,0 1.5,-0.2 2,-0.6 0.5,-0.4 0.7,-1 0.7,-1.6 v -0.1 c 0,-0.8 -0.2,-1.3 -0.7,-1.7 -0.5,-0.3 -1.1,-0.6 -2,-0.6 h -3.4 v 4.5 h 3.4 z"
|
|
||||||
id="path35" />
|
|
||||||
</symbol>
|
|
||||||
<use
|
|
||||||
xlink:href="#rider"
|
|
||||||
width="70"
|
|
||||||
height="70"
|
|
||||||
x="-35"
|
|
||||||
y="-35"
|
|
||||||
transform="matrix(7.0682519,0,0,7.2481031,256,256)"
|
|
||||||
style="overflow:visible"
|
|
||||||
id="use38" />
|
|
||||||
</svg>
|
|
||||||
|
Before Width: | Height: | Size: 3.9 KiB |
|
|
@ -1,43 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://wrdrj6wednn8"
|
|
||||||
path="res://.godot/imported/icon.svg-45c914cff7482ba9564963fe65b548e4.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://addons/rider-plugin/icons/icon.svg"
|
|
||||||
dest_files=["res://.godot/imported/icon.svg-45c914cff7482ba9564963fe65b548e4.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
||||||
svg/scale=1.0
|
|
||||||
editor/scale_with_editor_scale=false
|
|
||||||
editor/convert_colors_with_editor_theme=false
|
|
||||||
|
|
@ -1,12 +0,0 @@
|
||||||
[plugin]
|
|
||||||
|
|
||||||
name="JetBrains Rider External Editor"
|
|
||||||
description="Provides a toolbar toggle, to switch a set of settings on and off. Default set of settings helps to enable/disable the following settings recommended by the Rider documentation https://www.jetbrains.com/help/rider/Godot.html#optimize-godot-editor-for-rider"
|
|
||||||
author="JetBrains"
|
|
||||||
version="v1.3.0"
|
|
||||||
script="rider-plugin.gd"
|
|
||||||
|
|
||||||
[presets]
|
|
||||||
|
|
||||||
active="off"
|
|
||||||
presets="presets.json"
|
|
||||||
|
|
@ -1,15 +0,0 @@
|
||||||
{
|
|
||||||
"on": {
|
|
||||||
"text_editor/external/use_external_editor": true,
|
|
||||||
"interface/editor/import_resources_when_unfocused": true,
|
|
||||||
"interface/editor/save_on_focus_loss": true,
|
|
||||||
"text_editor/behavior/files/auto_reload_scripts_on_external_change": true,
|
|
||||||
"run/window_placement/game_embed_mode": -1
|
|
||||||
},
|
|
||||||
"off": {
|
|
||||||
"text_editor/external/use_external_editor": false,
|
|
||||||
"interface/editor/import_resources_when_unfocused": false,
|
|
||||||
"interface/editor/save_on_focus_loss": false,
|
|
||||||
"text_editor/behavior/files/auto_reload_scripts_on_external_change": false
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -1,78 +0,0 @@
|
||||||
@tool
|
|
||||||
extends EditorPlugin
|
|
||||||
|
|
||||||
var editor_settings: EditorSettings
|
|
||||||
var checkbutton: CheckButton
|
|
||||||
var _preset_applier: PresetApplier
|
|
||||||
var _locator_service: RiderLocatorService
|
|
||||||
var _plugin_cfg_path: String
|
|
||||||
var _presets_json_path: String
|
|
||||||
|
|
||||||
func _enter_tree() -> void:
|
|
||||||
editor_settings = EditorInterface.get_editor_settings()
|
|
||||||
var script_path := (get_script() as Script).resource_path
|
|
||||||
var plugin_dir := script_path.get_base_dir()
|
|
||||||
_plugin_cfg_path = plugin_dir + "/plugin.cfg"
|
|
||||||
|
|
||||||
_write_godot_editor_cfg()
|
|
||||||
|
|
||||||
var cfg := ConfigFile.new()
|
|
||||||
var err := cfg.load(_plugin_cfg_path)
|
|
||||||
if err != OK:
|
|
||||||
push_warning("Failed to load plugin.cfg: %s" % [err])
|
|
||||||
return
|
|
||||||
var active_str := str(cfg.get_value("presets", "active", "on"))
|
|
||||||
var is_active := active_str == "on"
|
|
||||||
var presets_rel_path := str(cfg.get_value("presets", "presets", "presets.json"))
|
|
||||||
_presets_json_path = plugin_dir + "/" + presets_rel_path
|
|
||||||
|
|
||||||
# Build UI
|
|
||||||
checkbutton = CheckButton.new()
|
|
||||||
checkbutton.text = "Use Rider"
|
|
||||||
checkbutton.tooltip_text = "Shortcut for setting recommended settings"
|
|
||||||
checkbutton.button_pressed = is_active
|
|
||||||
checkbutton.pressed.connect(_on_checkbutton_pressed)
|
|
||||||
add_control_to_container(EditorPlugin.CONTAINER_TOOLBAR, checkbutton)
|
|
||||||
|
|
||||||
# Initialize services and panel
|
|
||||||
_locator_service = RiderLocatorService.new()
|
|
||||||
_preset_applier = PresetApplier.new(_presets_json_path)
|
|
||||||
|
|
||||||
_locator_service.start_search()
|
|
||||||
|
|
||||||
# Ensure settings reflect current state on startup
|
|
||||||
_preset_applier.apply_preset(editor_settings, is_active)
|
|
||||||
|
|
||||||
func _on_checkbutton_pressed() -> void:
|
|
||||||
var cfg := ConfigFile.new()
|
|
||||||
if cfg.load(_plugin_cfg_path) != OK:
|
|
||||||
push_warning("Failed to load plugin.cfg to update state")
|
|
||||||
return
|
|
||||||
var is_active := checkbutton.button_pressed
|
|
||||||
var key := _preset_applier.get_preset_key(is_active)
|
|
||||||
cfg.set_value("presets", "active", key)
|
|
||||||
var save_err := cfg.save(_plugin_cfg_path)
|
|
||||||
if save_err != OK:
|
|
||||||
push_warning("Failed to save plugin.cfg: %s" % [save_err])
|
|
||||||
# Apply selected preset to editor settings
|
|
||||||
_preset_applier.apply_preset(editor_settings, is_active)
|
|
||||||
|
|
||||||
func _exit_tree() -> void:
|
|
||||||
EditorSettingsUtil.erase_rider_external_editor_setting()
|
|
||||||
if checkbutton != null:
|
|
||||||
remove_control_from_container(EditorPlugin.CONTAINER_TOOLBAR, checkbutton)
|
|
||||||
checkbutton.queue_free()
|
|
||||||
|
|
||||||
var args := OS.get_cmdline_args()
|
|
||||||
if "--rider-addon-tests" in args:
|
|
||||||
print("==== rider-addon-tests finished ====")
|
|
||||||
|
|
||||||
func _write_godot_editor_cfg() -> void:
|
|
||||||
var settings_dir := EditorInterface.get_editor_paths().get_project_settings_dir()
|
|
||||||
var cfg_path := settings_dir.path_join("rider_addon_godot_editor.cfg")
|
|
||||||
var cfg := ConfigFile.new()
|
|
||||||
cfg.set_value("editor_metadata", "process_id", OS.get_process_id())
|
|
||||||
cfg.set_value("editor_metadata", "executable_path", OS.get_executable_path())
|
|
||||||
var err := cfg.save(cfg_path)
|
|
||||||
if err != OK:
|
|
||||||
push_warning("Failed to save rider_addon_godot_editor.cfg: %s" % [err])
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://c1x58xm2w1n20
|
|
||||||
BIN
addons/rider-plugin/screenshots/Toolbar.png
(Stored with Git LFS)
BIN
addons/rider-plugin/screenshots/Toolbar.png
(Stored with Git LFS)
Binary file not shown.
|
|
@ -1,40 +0,0 @@
|
||||||
[remap]
|
|
||||||
|
|
||||||
importer="texture"
|
|
||||||
type="CompressedTexture2D"
|
|
||||||
uid="uid://br0dr51k2irct"
|
|
||||||
path="res://.godot/imported/Toolbar.png-a521e2493bd3c08a829245b3129bb58f.ctex"
|
|
||||||
metadata={
|
|
||||||
"vram_texture": false
|
|
||||||
}
|
|
||||||
|
|
||||||
[deps]
|
|
||||||
|
|
||||||
source_file="res://addons/rider-plugin/screenshots/Toolbar.png"
|
|
||||||
dest_files=["res://.godot/imported/Toolbar.png-a521e2493bd3c08a829245b3129bb58f.ctex"]
|
|
||||||
|
|
||||||
[params]
|
|
||||||
|
|
||||||
compress/mode=0
|
|
||||||
compress/high_quality=false
|
|
||||||
compress/lossy_quality=0.7
|
|
||||||
compress/uastc_level=0
|
|
||||||
compress/rdo_quality_loss=0.0
|
|
||||||
compress/hdr_compression=1
|
|
||||||
compress/normal_map=0
|
|
||||||
compress/channel_pack=0
|
|
||||||
mipmaps/generate=false
|
|
||||||
mipmaps/limit=-1
|
|
||||||
roughness/mode=0
|
|
||||||
roughness/src_normal=""
|
|
||||||
process/channel_remap/red=0
|
|
||||||
process/channel_remap/green=1
|
|
||||||
process/channel_remap/blue=2
|
|
||||||
process/channel_remap/alpha=3
|
|
||||||
process/fix_alpha_border=true
|
|
||||||
process/premult_alpha=false
|
|
||||||
process/normal_map_invert_y=false
|
|
||||||
process/hdr_as_srgb=false
|
|
||||||
process/hdr_clamp_exposure=false
|
|
||||||
process/size_limit=0
|
|
||||||
detect_3d/compress_to=1
|
|
||||||
|
|
@ -1,66 +0,0 @@
|
||||||
@tool
|
|
||||||
class_name EditorSettingsUtil
|
|
||||||
|
|
||||||
# this is rider own setting, not a part of Godot settings
|
|
||||||
const EXTERNAL_EDITOR_SETTING: String = "text_editor/external/editor"
|
|
||||||
# this is Godot setting
|
|
||||||
const EXEC_PATH_SETTING: String = "text_editor/external/exec_path"
|
|
||||||
|
|
||||||
|
|
||||||
static func set_external_editor_path(path: String) -> void:
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
editor_settings.set_setting(EXEC_PATH_SETTING, path)
|
|
||||||
|
|
||||||
static func get_external_editor_path() -> String:
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
if editor_settings.has_setting(EXEC_PATH_SETTING):
|
|
||||||
return editor_settings.get_setting(EXEC_PATH_SETTING)
|
|
||||||
else:
|
|
||||||
return ""
|
|
||||||
|
|
||||||
# Returns the current dropdown index, 0 if the setting doesn't exist.
|
|
||||||
static func get_rider_selector_index() -> int:
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
if not editor_settings.has_setting(EXTERNAL_EDITOR_SETTING):
|
|
||||||
return 0
|
|
||||||
return editor_settings.get_setting(EXTERNAL_EDITOR_SETTING)
|
|
||||||
|
|
||||||
static func erase_rider_external_editor_setting() -> void:
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
if editor_settings.has_setting(EXTERNAL_EDITOR_SETTING):
|
|
||||||
editor_settings.erase(EXTERNAL_EDITOR_SETTING)
|
|
||||||
|
|
||||||
# Register a single-entry enum so the persisted int doesn't render as a raw
|
|
||||||
# number while async detection is in progress. register_rider_installations
|
|
||||||
# replaces this once detection finishes.
|
|
||||||
static func show_rider_searching_state() -> void:
|
|
||||||
# Order matters: `set` must come before `add_property_info` — the latter
|
|
||||||
# errors with `!props.has(pinfo.name)` if the property isn't in `props` yet.
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
editor_settings.set(EXTERNAL_EDITOR_SETTING, 0)
|
|
||||||
editor_settings.add_property_info({
|
|
||||||
"name": EXTERNAL_EDITOR_SETTING,
|
|
||||||
"type": TYPE_INT,
|
|
||||||
"hint": PROPERTY_HINT_ENUM,
|
|
||||||
"hint_string": "Searching — reopen Settings to see the update",
|
|
||||||
})
|
|
||||||
|
|
||||||
# Register the dropdown with one entry per detected installation (plus a "-"
|
|
||||||
# placeholder at index 0) and select the given index.
|
|
||||||
static func register_rider_installations(installations: Array, selected_index: int) -> void:
|
|
||||||
var editor_settings := EditorInterface.get_editor_settings()
|
|
||||||
var entries: Array = ["-"]
|
|
||||||
for element in installations:
|
|
||||||
var display_name: String = element.get("display", "")
|
|
||||||
entries.append(_escape_enum_label(display_name))
|
|
||||||
editor_settings.set(EXTERNAL_EDITOR_SETTING, selected_index)
|
|
||||||
editor_settings.add_property_info({
|
|
||||||
"name": EXTERNAL_EDITOR_SETTING,
|
|
||||||
"type": TYPE_INT,
|
|
||||||
"hint": PROPERTY_HINT_ENUM,
|
|
||||||
"hint_string": ",".join(entries),
|
|
||||||
})
|
|
||||||
|
|
||||||
# Comma is the enum delimiter, colon introduces explicit value assignment.
|
|
||||||
static func _escape_enum_label(s: String) -> String:
|
|
||||||
return s.replace(",", " •").replace(":", " -")
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bdiu78ot0rrkc
|
|
||||||
|
|
@ -1,23 +0,0 @@
|
||||||
@tool
|
|
||||||
## Simple JSON helpers for editor/runtime use.
|
|
||||||
## Keeps file and JSON parsing concerns out of feature code.
|
|
||||||
class_name JsonUtils
|
|
||||||
|
|
||||||
static func load_from_file(path: String) -> Variant:
|
|
||||||
# Returns parsed JSON value (Dictionary/Array/etc.) or null on error.
|
|
||||||
var file := FileAccess.open(path, FileAccess.READ)
|
|
||||||
if file == null:
|
|
||||||
push_warning("JsonUtils: Failed to open file: %s" % path)
|
|
||||||
return null
|
|
||||||
var text := file.get_as_text()
|
|
||||||
file.close()
|
|
||||||
var data: Variant = JSON.parse_string(text)
|
|
||||||
if data == null:
|
|
||||||
push_warning("JsonUtils: Invalid JSON in file: %s" % path)
|
|
||||||
return null
|
|
||||||
return data
|
|
||||||
|
|
||||||
static func load_dict_from_file(path: String) -> Dictionary:
|
|
||||||
# Returns Dictionary or empty {} on error.
|
|
||||||
var data := load_from_file(path) as Dictionary
|
|
||||||
return data
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bci4kmk7h4j6a
|
|
||||||
|
|
@ -1,68 +0,0 @@
|
||||||
@tool
|
|
||||||
extends RefCounted
|
|
||||||
class_name RiderLocatorService
|
|
||||||
|
|
||||||
var _installations_found: Array = []
|
|
||||||
# we can keep a reference, it will be freed automatically, when the editor is closed
|
|
||||||
var _rider_locator: RefCounted = null
|
|
||||||
|
|
||||||
# Last value we wrote to / observed for the Rider selector dropdown
|
|
||||||
var _last_selected_index: int = 0
|
|
||||||
|
|
||||||
func start_search() -> void:
|
|
||||||
# use ClassDB to somehow still work without GDExtension part (in older Godot versions)
|
|
||||||
if not ClassDB.class_exists("RiderLocator"):
|
|
||||||
return
|
|
||||||
|
|
||||||
EditorSettingsUtil.show_rider_searching_state()
|
|
||||||
if _rider_locator == null:
|
|
||||||
_rider_locator = ClassDB.instantiate("RiderLocator")
|
|
||||||
_rider_locator.connect("installations_loaded", _on_installations_loaded)
|
|
||||||
_rider_locator.start_search()
|
|
||||||
|
|
||||||
func _on_installations_loaded(array: Array) -> void:
|
|
||||||
_installations_found = array
|
|
||||||
_update_selector()
|
|
||||||
|
|
||||||
func _update_selector() -> void:
|
|
||||||
if _installations_found.is_empty():
|
|
||||||
EditorSettingsUtil.erase_rider_external_editor_setting()
|
|
||||||
return
|
|
||||||
|
|
||||||
var index := _index_for_exec_path(_installations_found)
|
|
||||||
# Set _last_selected_index BEFORE register_rider_installations so the
|
|
||||||
# synchronous settings_changed handler sees a match and skips its work.
|
|
||||||
_last_selected_index = index
|
|
||||||
EditorSettingsUtil.register_rider_installations(_installations_found, index)
|
|
||||||
|
|
||||||
var settings_changed := EditorInterface.get_editor_settings().settings_changed
|
|
||||||
if not settings_changed.is_connected(_on_selection_changed):
|
|
||||||
settings_changed.connect(_on_selection_changed)
|
|
||||||
|
|
||||||
func _index_for_exec_path(installations: Array) -> int:
|
|
||||||
var current := EditorSettingsUtil.get_external_editor_path()
|
|
||||||
if current.is_empty():
|
|
||||||
return 0
|
|
||||||
for i in installations.size():
|
|
||||||
if installations[i].get("path", "") == current:
|
|
||||||
return i + 1
|
|
||||||
return 0
|
|
||||||
|
|
||||||
func _on_selection_changed() -> void:
|
|
||||||
var selected_index := EditorSettingsUtil.get_rider_selector_index()
|
|
||||||
|
|
||||||
# settings_changed fires for every editor setting, this helps to avoid updating on every other changes
|
|
||||||
if selected_index == _last_selected_index:
|
|
||||||
return
|
|
||||||
_last_selected_index = selected_index
|
|
||||||
|
|
||||||
# Index 0 is the placeholder, so the path is left untouched.
|
|
||||||
if selected_index == 0:
|
|
||||||
return
|
|
||||||
|
|
||||||
var installation_index := selected_index - 1
|
|
||||||
if installation_index >= 0 and installation_index < _installations_found.size():
|
|
||||||
var installation = _installations_found[installation_index]
|
|
||||||
var new_path: String = installation.get("path", "")
|
|
||||||
if not new_path.is_empty():
|
|
||||||
EditorSettingsUtil.set_external_editor_path(new_path)
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://cfsu1rbg0ypem
|
|
||||||
|
|
@ -1,35 +0,0 @@
|
||||||
@tool
|
|
||||||
extends RefCounted
|
|
||||||
class_name PresetApplier
|
|
||||||
|
|
||||||
var presets_path: String
|
|
||||||
|
|
||||||
func _init(p_path: String) -> void:
|
|
||||||
presets_path = p_path
|
|
||||||
|
|
||||||
func get_preset_key(is_active: bool) -> String:
|
|
||||||
return "on" if is_active else "off"
|
|
||||||
|
|
||||||
func apply_preset(editor_settings: EditorSettings, is_active: bool) -> void:
|
|
||||||
var data: Dictionary = JsonUtils.load_dict_from_file(presets_path)
|
|
||||||
if data.is_empty():
|
|
||||||
push_warning("Failed to load presets: %s" % presets_path)
|
|
||||||
return
|
|
||||||
|
|
||||||
var new_preset_key := get_preset_key(is_active)
|
|
||||||
var previous_preset_key := get_preset_key(not is_active)
|
|
||||||
|
|
||||||
if not data.has(new_preset_key):
|
|
||||||
push_warning("Preset '%s' not found in presets.json" % new_preset_key)
|
|
||||||
return
|
|
||||||
|
|
||||||
var new_preset := data[new_preset_key] as Dictionary
|
|
||||||
# Reset keys from previous preset that are missing in the new preset
|
|
||||||
if data.has(previous_preset_key):
|
|
||||||
var previous_preset := data[previous_preset_key] as Dictionary
|
|
||||||
for key in previous_preset:
|
|
||||||
if not new_preset.has(key):
|
|
||||||
editor_settings.set_setting(str(key), editor_settings.property_get_revert(str(key)))
|
|
||||||
# Apply the new preset
|
|
||||||
for key in new_preset:
|
|
||||||
editor_settings.set_setting(str(key), new_preset[key])
|
|
||||||
|
|
@ -1 +0,0 @@
|
||||||
uid://bjiaycxso8h8u
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue