Installing CORE
The safe route
Step 1: Downloading the CORE Manager
Before we install CORE, we first have to download the CORE Manager. It is responsible for installing CORE and downloading updates.
Windows: CORE-Manager.exe
Linux: CORE-Manager.elf
macOS: Use wine
to run CORE-Manager.exe
Step 2: Using the CORE Manager
Launch CORE-Manager.exe
or CORE-Manager.elf
and type in the path to your Godot project (replace backslashes with regular slashes on Windows). Click on Install
and wait until it's finished.
Note: If you are updating CORE, click on Update
instead.
Step 3: Configuring your project
Launch your project in the Godot Editor and go to your project settings. You now need to set your startup scene to res://CORE/coreinit.tscn
.
Step 4: Write your init script
Create a new GDScript file at res://init.gd
(can be anything else, but you need to change the core_initscript
variable accordingly!) and write this into it:
extends Node
@onready
var core = get_node("/root/CORE") #(1)!
@onready
var logger = core.get_module("Logger") #(2)!
func _ready() -> void:
core.welcome() #(3)!
config.logger_diagnostic = true #(4)!
core.reload_config() #(5)!
logger.diag("<your_script_name>","This is a diagnostic message. I can only be seen if diagnostic log messages are enabled.")
logger.info("<your_script_name>","This is a informational message.")
logger.warn("<your_script_name>","This is a warning message.")
logger.error("<your_script_name>","This is a error message.")
core.exit_safely() #(6)!
- Imports the CORE "module" aka. /root/CORE
- Imports the CORE's logger implementation
- Makes CORE say hello :)
- Overwrites the logger_diagnostic setting temporarily (in memory)
- Applies all modified settings
- Tells CORE to shutdown your application safely. Has to do with CORE's logger and Godot.
Now replace <your_script_name>
with the file path of your script (preferably with .gd
and without res://
) and save it under the path you specified in the core_initscript
variable.
Step 5: Start your project
Start your project and wait at least 500ms. You should see this output in your Godot console (with a few variations, of course):
coreinit -> "Fixing" busy setting up children issue #(1)!
coreinit -> Bootstrapping CORE
coreinit -> Checking CORE requirements
coreinit -> Loading modules
coreinit -> Constructing modules
coreinit -> Injecting modules
coreinit -> Updating dependency references
coreinit -> Applying configuration to base modules
coreinit -> Initializing base modules
(CORE/core.gd) [INFO] CORE (source 0) welcomes you! #(2)!
It seems like everything is working :)
(init.gd) [DIAG] This is a diagnostic message. I can only be seen if diagnostic log messages are enabled.
(init.gd) [INFO] This is a informational message.
(init.gd) [WARN] This is a warning message.
(init.gd) [ERR!] This is a error message.
(CORE/coreinit.gd) [DIAG] Bootstrapped CORE, exiting. #(3)!
- These messages are printed anyway as CORE's logger implementation is not loaded at that point in time
- That log messages comes from your init.gd!
- tldr we enabled diagnostic messages "too fast". if we delayed the config reload by half a second, we wouldn't have seen that message.
If your project returns about the same output then CORE has been successfully installed. If not, look for your error here. For a quick start guide, click here
YOLOing the install
Do you want to play with fire? Do you like to live at the edge of what's possible? Or are you just a Arch Linux or Gentoo user? If yes, here's a guide on how to manually install and update CORE.
Note
This install method is only recommended for devs experienced with CORE, Godot 4 and Git. We are not responsible if you mess up something and break your project!
Installing CORE
- Create your Godot Project and open the project folder in a terminal
- Execute
git clone https://git.staropensource.de/StarOpenSource/core.git CORE
(even if you're planning/using a git repository already! Do NOT use git submodules!) cd
into the CORE folder and copyconfig.gd.example
and rename it toconfig.gd
. You may edit it to your liking now.- Create your init script at
[project root]/init.gd
(or some other path, update it inconfig.gd
accordingly) and write this into it: - Go back to Godot and set your startup scene to
res://CORE/coreinit.tscn
- Launch your project, you should see something like this in your console:
coreinit -> "Fixing" busy setting up children issue coreinit -> Bootstrapping CORE coreinit -> Checking CORE requirements coreinit -> Loading modules coreinit -> Constructing modules coreinit -> Injecting modules coreinit -> Updating dependency references coreinit -> Applying configuration to base modules coreinit -> Initializing base modules (init.gd) [INFO] init.gd loaded. (CORE/core.gd) [INFO] CORE (source 0) welcomes you! It seems like everything is working :) (CORE/coreinit.gd) [DIAG] Bootstrapped CORE, exiting.
- Congrats, you're not a idiot.
Updating CORE
- Open your Godot project folder in a terminal
cd
into the CORE folder and create a backup of yourconfig.gd
file- Run
git pull
- Check the breaking commits documentation page for breaking changes and update your code accordingly
- Launch your project and look for any issues. If any arise re-check your code for any breaking commits or contact us.
Reverting a update
Reverting an update is unsupported and should only be used in special cases.
- Open your Godot project folder in a terminal
cd
into the CORE folder and create a backup of yourconfig.gd
file- Run
git fetch && git checkout <COMMIT>
(replace<COMMIT>
with whatever commit you want to revert to) - Revert all changes made in all commits after. Checking the breaking commits page might be useful.
Created: July 8, 2023 22:16:15