Skip to content
Merged
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
170 changes: 170 additions & 0 deletions .github/workflows/export.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,170 @@
name: export

on:
push:
tags:
- "v*.*.*"

jobs:
export:
runs-on: ubuntu-latest
permissions:
contents: write

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- name: Verify project version
shell: bash
run: |
TAG="${GITHUB_REF_NAME#v}"
PROJECT_VERSION=$(grep -oP '(?<=config/version=")[^"]+' project.godot)

if [ "$PROJECT_VERSION" != "$TAG" ]; then
echo "::error file=project.godot::expected version $TAG (from tag) but found $PROJECT_VERSION"
exit 1
fi

- name: Verify xmllint
shell: bash
run: |
command -v xmllint >/dev/null 2>&1 || {
sudo apt-get update
sudo apt-get install -y --no-install-recommends libxml2-utils
}

- name: Verify project
id: godot
shell: bash
env:
CSPROJ_PATH: "Rhythia.csproj"
VERSION_FILE: ".github/godot_version.txt"
run: |
if compgen -G "${CSPROJ_PATH}.old*" > /dev/null; then
echo "::error file=${CSPROJ_PATH}.old::${CSPROJ_PATH}.old migration exists"
exit 1
fi

if [ ! -f "$CSPROJ_PATH" ]; then
echo "::error::$CSPROJ_PATH not found"
exit 1
fi

if [ ! -f "$VERSION_FILE" ]; then
echo "::error::$VERSION_FILE not found"
exit 1
fi

EXPECTED_VERSION=$(tr -d '[:space:]' < "$VERSION_FILE")
EXPECTED_SDK="Godot.NET.Sdk/${EXPECTED_VERSION}"

ACTUAL_SDK=$(xmllint --xpath 'string(/Project/@Sdk)' "$CSPROJ_PATH")

if [ -z "$ACTUAL_SDK" ]; then
echo "::error file=$CSPROJ_PATH::no <Project Sdk=\"...\"> attribute found"
exit 1
fi

if [ "$ACTUAL_SDK" != "$EXPECTED_SDK" ]; then
echo "::error file=$CSPROJ_PATH::expected Sdk=\"$EXPECTED_SDK\" but found Sdk=\"$ACTUAL_SDK\""
exit 1
fi

echo "Godot SDK OK: $ACTUAL_SDK"

echo "version=$EXPECTED_VERSION" >> "$GITHUB_OUTPUT"
echo "base_url=https://github.com/godotengine/godot-builds/releases/download/${EXPECTED_VERSION}-stable" >> "$GITHUB_OUTPUT"

- name: Setup
uses: actions/setup-dotnet@67a3573c9a986a3f9c594539f4ab511d57bb3ce9 # Dotnet 4.0.2
with:
dotnet-version: 10.0.x
cache: true

- name: Restore dependencies
run: dotnet restore --locked-mode

- name: Detect build type
id: kind
run: |
if [[ "$GITHUB_REF_NAME" == *-* ]]; then
echo "prerelease=true" >> "$GITHUB_OUTPUT"
else
echo "prerelease=false" >> "$GITHUB_OUTPUT"
fi

- name: Export builds
id: export
uses: firebelley/godot-export@615a6f7afc22d6266bf55c17748fb07447e8bdab # v8.0.0
with:
godot_executable_download_url: ${{ steps.godot.outputs.base_url }}/Godot_v${{ steps.godot.outputs.version }}-stable_mono_linux_x86_64.zip
godot_export_templates_download_url: ${{ steps.godot.outputs.base_url }}/Godot_v${{ steps.godot.outputs.version }}-stable_mono_export_templates.tpz
export_debug: ${{ steps.kind.outputs.prerelease }}
relative_project_path: ./
relative_export_path: builds
cache: true

- name: Verify exports exist
shell: bash
run: |
test -f "builds/Windows Desktop/Rhythia.exe" || { echo "::error::Windows export missing"; exit 1; }
test -f "builds/Linux/Rhythia.x86_64" || { echo "::error::Linux export missing"; exit 1; }
test -f "builds/macOS/Rhythia.zip" || { echo "::error::macOS export missing"; exit 1; }

- name: Compress exports
run: |
mkdir -p dist
(cd "builds/Windows Desktop" && zip -r "$GITHUB_WORKSPACE/dist/windows.zip" .)
(cd "builds/Linux" && zip -r "$GITHUB_WORKSPACE/dist/linux.zip" .)
cp builds/macOS/Rhythia.zip dist/macos.zip

- name: Upload Windows build for installer
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
with:
name: rhythia-windows
path: builds/Windows Desktop/
if-no-files-found: error

- name: Create draft release
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PRERELEASE: ${{ steps.kind.outputs.prerelease }}
run: |
FLAGS=""
[[ "$PRERELEASE" == "true" ]] && FLAGS="--prerelease"
gh release view "$GITHUB_REF_NAME" > /dev/null 2>&1 || \
gh release create "$GITHUB_REF_NAME" --draft --title "$GITHUB_REF_NAME" $FLAGS

- name: Upload to GitHub Releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload "$GITHUB_REF_NAME" dist/* --clobber
installer:
needs: export
runs-on: windows-latest
permissions:
contents: write

steps:
- uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4

- uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
with:
name: rhythia-windows
path: builds/Windows Desktop/

- name: Build installer
run: |
$version = $env:GITHUB_REF_NAME.TrimStart('v')
& "${env:ProgramFiles(x86)}\Inno Setup 6\ISCC.exe" `
"/DAppVersion=$version" `
"/DSourceDir=$env:GITHUB_WORKSPACE\builds\Windows Desktop" `
"/DOutputDir=$env:GITHUB_WORKSPACE\dist" `
installer\rhythia.iss
if ($LASTEXITCODE -ne 0) { exit $LASTEXITCODE }

- name: Upload to GitHub Releases
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: gh release upload $env:GITHUB_REF_NAME dist\*.exe --clobber

8 changes: 4 additions & 4 deletions export_presets.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ custom_features=""
export_filter="all_resources"
include_filter="user/*"
exclude_filter=""
export_path="../../../Desktop/Windows/Rhythia.zip"
export_path="exports/Windows Desktop/Rhythia.exe"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
Expand Down Expand Up @@ -87,7 +87,7 @@ custom_features=""
export_filter="all_resources"
include_filter="user/*"
exclude_filter=""
export_path="../../../Desktop/Linux/Rhythia.zip"
export_path="exports/Linux/Rhythia.x86_64"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
Expand Down Expand Up @@ -136,7 +136,7 @@ custom_features=""
export_filter="all_resources"
include_filter="user/*"
exclude_filter=""
export_path=""
export_path="exports/macOS/Rhythia.zip"
patches=PackedStringArray()
patch_delta_encoding=false
patch_delta_compression_level_zstd=19
Expand All @@ -160,7 +160,7 @@ debug/export_console_wrapper=1
application/liquid_glass_icon=""
application/icon=""
application/icon_interpolation=4
application/bundle_identifier=""
application/bundle_identifier="net.rhythia.client"
application/signature=""
application/app_category="Games"
application/short_version=""
Expand Down
Binary file added installer/ReadMe.rtf
Binary file not shown.
53 changes: 53 additions & 0 deletions installer/rhythia.iss
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
; Script generated by the Inno Setup Script Wizard.
; SEE THE DOCUMENTATION FOR DETAILS ON CREATING INNO SETUP SCRIPT FILES!
; Non-commercial use only.

#define MyAppName "Rhythia"
#ifndef AppVersion
#define AppVersion "0.0.0"
#endif
#define MyAppVersion AppVersion
#define MyAppPublisher "Rhythia Org"
#define MyAppURL "https://github.com/Rhythia"
#define EscapeConstArgument(Value) StringChange(StringChange(StringChange(Value, "%", "%25"), ",", "%2c"), "}", "%7d")

[Setup]
; NOTE: The value of AppId uniquely identifies this application. Do not use the same AppId value in installers for other applications.
; (To generate a new GUID, click Tools | Generate GUID inside the IDE.)
AppId={{58B8F9FB-4F1F-4953-BEA4-C7FA437761D9}
AppName={#MyAppName}
AppVersion={#MyAppVersion}
;AppVerName={cm:NameAndVersion,{#EscapeConstArgument(MyAppName)},{#EscapeConstArgument(MyAppVersion)}}
AppPublisher={#MyAppPublisher}
AppPublisherURL={#MyAppURL}
AppSupportURL={#MyAppURL}
AppUpdatesURL={#MyAppURL}
DefaultDirName={autopf}\{#MyAppName}
DefaultGroupName={#MyAppName}
AllowNoIcons=yes
InfoAfterFile=ReadMe.rtf
; Remove the following line to run in administrative install mode (install for all users).
PrivilegesRequired=lowest
PrivilegesRequiredOverridesAllowed=dialog
OutputDir={#OutputDir}
OutputBaseFilename=Rhythia Installer
SetupIconFile=..\textures\icon.ico
SolidCompression=yes
WizardStyle=modern dark polar

[Languages]
Name: "english"; MessagesFile: "compiler:Default.isl"

[Tasks]
Name: "startmenuicon"; Description: "Create a &Start Menu shortcut"; GroupDescription: "{cm:AdditionalIcons}"
Name: "desktopicon"; Description: "{cm:CreateDesktopIcon}"; GroupDescription: "{cm:AdditionalIcons}"

[Files]
Source: "{#SourceDir}\*"; DestDir: "{app}"; Flags: ignoreversion recursesubdirs createallsubdirs
; NOTE: Don't use "Flags: ignoreversion" on any shared system files.

[Icons]
Name: "{group}\{#MyAppName}"; Filename: "{app}\Rhythia.exe"; Tasks: startmenuicon
Name: "{autodesktop}\{#MyAppName}"; Filename: "{app}\Rhythia.exe"; Tasks: desktopicon
Name: "{group}\{cm:ProgramOnTheWeb,{#MyAppName}}"; Filename: "{#MyAppURL}"

17 changes: 0 additions & 17 deletions prefabs/modifier_button.tscn

This file was deleted.

2 changes: 1 addition & 1 deletion scripts/game/Runner.cs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ public override void _Ready()

HudManager ??= GetNode<HudManager>("HUD");
Camera ??= GetNode<Camera3D>("Camera3D");
Renderers ??= new Godot.Collections.Array<Renderer>(GetNode<Node3D>("Renderers").GetChildren().OfType<Renderer>());
Renderers ??= GetNode<Godot.Collections.Array<Renderer>>("Renderers");
Grid ??= HudManager.GetNode<MeshInstance3D>("Grid");
Cursor ??= GetNode<MeshInstance3D>("Cursor");
// VideoStreamPlayer ??= GetNode<VideoStreamPlayer>("Video/VideoViewport/VideoStreamPlayer");
Expand Down
Loading