Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
d4d6046
Refactor Core and enhance game management features
NoobNotFound Sep 24, 2025
c894356
Refactor to use IBaseSettingsService interface
NoobNotFound Sep 26, 2025
6a11e52
Merge branch 'main' into noobnotfound/corexmain
NoobNotFound Sep 26, 2025
bef51cf
[CodeFactor] Apply fixes
code-factor Sep 26, 2025
c047c56
Refactor and enhance Minecraft settings UI
NoobNotFound Sep 26, 2025
a703880
Refactor localization keys to avoid a bug
NoobNotFound Sep 27, 2025
79752e0
[CodeFactor] Apply fixes
code-factor Sep 28, 2025
af7840e
Add GamesPage feature and enhance account management
NoobNotFound Sep 29, 2025
62ad618
Refactor and enhance "Add Game" wizard and GamesPage
NoobNotFound Sep 29, 2025
7634b40
Refactor Add Game Wizard for modularity and simplicity
NoobNotFound Sep 29, 2025
7206bbe
Update Windows target framework and paths in CI config
NoobNotFound Nov 19, 2025
1675a51
Update CI configuration for macOS and Linux targets
NoobNotFound Nov 19, 2025
4fd79b1
Update action.yml
NoobNotFound Nov 19, 2025
1e6942c
Enhance uno-check tool installation and logging
NoobNotFound Nov 19, 2025
1e081cd
Refactor Install Dependencies action.yml
NoobNotFound Nov 19, 2025
f9e8359
Refactor CI workflow and dependency installation
NoobNotFound Nov 19, 2025
5fad438
Update target framework for Windows platform
NoobNotFound Nov 19, 2025
e686fa7
Update target frameworks and CI dependencies
NoobNotFound Nov 19, 2025
889196d
Set window icon in WindowManager for Windows
NoobNotFound Nov 19, 2025
d68ed5a
Merge branch 'noobnotfound/corexmain' of https://github.com/Riverside…
NoobNotFound Nov 19, 2025
3674753
Update CsWin32 version and refactor window icon logic
NoobNotFound Nov 19, 2025
511786c
[CodeFactor] Apply fixes
code-factor Nov 19, 2025
99c4ce9
Update CI to fix uno-check and NETSDK1152 issues
NoobNotFound Nov 20, 2025
a016675
Remove redundant GTK dependencies installation
NoobNotFound Nov 20, 2025
bf82818
Update Windows SDK default version and ISO URL
NoobNotFound Nov 20, 2025
894905e
Add platform check for workload installation step
NoobNotFound Nov 20, 2025
0c87337
Fix CI build issues and improve cross-platform publishing
NoobNotFound Nov 20, 2025
6e0704d
Update CI job labels and improve PowerShell argument handling
NoobNotFound Nov 20, 2025
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
4 changes: 2 additions & 2 deletions .github/Install-WindowsSdkISO.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ if ($InstallWindowsSDK)
if($buildNumber -eq 19041)
{
# Workaround for missing SDK
$uri = "https://software-download.microsoft.com/download/pr/19041.1.191206-1406.vb_release_WindowsSDK.iso";
$uri = "https://go.microsoft.com/fwlink/?linkid=2120735";
}

if ($env:TEMP -eq $null)
Expand Down Expand Up @@ -311,4 +311,4 @@ if ($StrongNameHijack)
}

Write-Host "Done"
}
}
80 changes: 34 additions & 46 deletions .github/steps/install_dependencies/action.yml
Original file line number Diff line number Diff line change
@@ -1,83 +1,71 @@
# .github/steps/install_dependencies/action.yml
name: Install Dependencies
description: "Installs .NET SDK, OS-specific SDKs/dependencies, and Uno workloads"
description: "Installs .NET SDK and OS-specific dependencies"

inputs:
job-platform:
description: 'The target platform for the current job (windows, macos, linux)'
description: 'The target platform (windows, macos, linux)'
required: true
dotnet-version:
description: 'Installs and sets the .NET SDK Version'
required: false
# UPDATED: Default to .NET 9.x based on project requirements
default: '9.0.x'
windows-sdk-version:
description: 'The version of the Windows SDK to install (Windows only)'
description: 'Windows SDK version (Windows only)'
required: false
# UPDATED: Default to match the project's Windows target framework (22621)
default: '22621'
default: '19041'

runs:
using: "composite"
steps:
# Install .NET SDK
# 1. Install .NET 9 SDK
- name: Setup .NET ${{ inputs.dotnet-version }}
uses: actions/setup-dotnet@v4
with:
dotnet-version: '${{ inputs.dotnet-version }}'

# Install Windows SDK (Windows Runner Only)
# 2. Install Windows SDK (Windows Only)
- name: Install Windows SDK ${{ inputs.windows-sdk-version }}
shell: pwsh
if: runner.os == 'Windows' && inputs.job-platform == 'windows'
run: |
Write-Host "Attempting to install Windows SDK version: ${{ inputs.windows-sdk-version }}"
Write-Host "Installing Windows SDK version: ${{ inputs.windows-sdk-version }}"
$sdkIsoScript = Join-Path $env:GITHUB_WORKSPACE ".github\Install-WindowsSdkISO.ps1"
if (Test-Path $sdkIsoScript) {
# Ensure your script can handle the specified version
& $sdkIsoScript ${{ inputs.windows-sdk-version }}
} else {
Write-Warning "Windows SDK ISO installation script not found at $sdkIsoScript. Skipping SDK installation. Build might fail if required SDK components are missing."
Write-Warning "Script not found at $sdkIsoScript. Skipping."
}

# Install GTK Dependencies (Linux Runner Only - for Skia.Gtk/Desktop)
# 3. Install GTK Dependencies (Linux Only - Required for Skia.Gtk)
- name: Install GTK Dependencies
shell: bash
if: runner.os == 'Linux' && inputs.job-platform == 'linux'
run: |
echo "Installing GTK dependencies for Skia.Gtk/Desktop..."
echo "Installing GTK dependencies..."
sudo apt-get update
sudo apt-get install -y snapd
sudo snap install core24
sudo snap install multipass
sudo snap install lxd
sudo snap install snapcraft --classic
lxd init --minimal
sudo usermod --append --groups lxd $USER # In order for the current user to use LXD


# Install Uno Check Tool and Run Check for the target platform
- name: Install Uno Platform Workloads via uno-check for ${{ inputs.job-platform }}
shell: pwsh

# 4. Run Uno.Check
# FIXED: Changed ${{ inputs.target-platform }} to ${{ inputs.job-platform }}
- name: Install ${{ inputs.job-platform }} Workloads
shell: pwsh
if: runner.os != 'Windows' && inputs.job-platform != 'windows'
run: |
echo "Installing/Updating uno-check tool..."
# Consider using a specific version if needed, otherwise install latest stable
dotnet tool update -g uno.check # Use update instead of install to get latest patch within major.minor

$unoTarget = "${{ inputs.job-platform }}"
# Map simple platform names to potential uno-check target names if needed
# Example: if uno-check needs 'desktop' instead of 'linux'
if ($unoTarget -eq 'linux') { $unoTarget = 'desktop' } # Adjust if uno-check uses 'desktop' for linux GTK head

echo "Running uno-check for target: $unoTarget"
# Run uno-check for the specific platform of this job runner
# Adjust skips as needed for your project
uno-check --ci --non-interactive --fix --target $unoTarget --skip vswin --skip vsmac --skip xcode --skip vswinworkloads --skip androidemulator --skip dotnetnewunotemplates --skip mauiinstallationcheck

# Optional: Check exit code if needed, though continue-on-error is handled at job level
if ($LASTEXITCODE -ne 0) {
Write-Warning "uno-check completed with errors (Exit Code: $LASTEXITCODE) for target $unoTarget. Build might fail."
} else {
echo "uno-check finished successfully for target: $unoTarget"
}

dotnet tool install -g uno.check

# We use inputs.job-platform here
$platforms = "${{ inputs.job-platform }}"

$platforms.Split(' ') | ForEach-Object {
$target = $_.Replace("_win", "").Replace("_macos", "")

# Map 'linux' to 'skia' or 'linux' as expected by uno-check if needed
if ($target -eq 'linux') { $target = 'linux' }

if (![string]::IsNullOrEmpty($target)) {
echo "Running uno-check for target: $target"
# Added --continue-on-error logic implicitly by not failing script on exit code
uno-check -v --ci --non-interactive --fix --target $target --skip vswin --skip vsmac --skip xcode --skip vswinworkloads --skip androidemulator --skip dotnetnewunotemplates
echo "uno-check finished for target: $target"
}
}
170 changes: 68 additions & 102 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,157 +1,123 @@
# .github/workflows/CI.yml
name: CI Build & Artifacts

# Workflow triggers
on:
push:
branches:
- main
- release/**
branches: [ main, release/** ]
pull_request:
types: [opened, synchronize, reopened]
branches:
- main
- release/**
branches: [ main, release/** ]

# Concurrency control to cancel older runs on the same branch/PR
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
# Job name includes the OS from the matrix
name: Build (${{ matrix.os }})
# Runner OS defined by the matrix
runs-on: ${{ matrix.os }}
# Allow macOS and Linux builds to fail without failing the entire workflow run
continue-on-error: ${{ matrix.os != 'windows-latest' }}

strategy:
# Don't cancel other matrix jobs if one fails
fail-fast: false
matrix:
# Define the operating systems to run on
os: [windows-latest, macos-latest, ubuntu-latest]
# Include specific configurations for each OS
include:
# == WINDOWS CONFIGURATION ==
# == WINDOWS (WinUI 3 Unpackaged) ==
- os: windows-latest
platform: windows
# UPDATED: Use the correct .NET 9 Windows target framework from your project
target_framework: 'net9.0-windows10.0.22621'
# UPDATED: Adjust publish path for the new framework
# IMPORTANT: Verify this path matches your actual build output structure and Runtime Identifier (RID)
publish_path: './bin/Release/net9.0-windows10.0.22621/win-x64/publish/'
artifact_name: 'Emerald-Windows'

artifact_Path: './Emerald/bin/Release/net9.0-windows10.0.22621/win-x64/publish/'
# IMPORTANT: Define the path to your Windows/Shared project file
project_path: './Emerald/Emerald.csproj'
target_framework: 'net9.0-windows10.0.26100'
project_path: './Emerald/Emerald.csproj'
publish_output: 'Emerald_Windows'
artifact_name: 'Emerald-Windows-Release'

# == MACOS CONFIGURATION ==
# == MACOS (Skia Desktop) ==
- os: macos-latest
platform: macos
# UPDATED: Use the correct .NET 9 macOS target framework from your project
target_framework: 'net9.0-maccatalyst'
# UPDATED: Adjust publish path for the new framework
# IMPORTANT: Verify this path matches your actual build output structure and RID
publish_path: './Emerald/bin/Release/net9.0-maccatalyst/maccatalyst-x64/publish/'

artifact_Path: './Emerald/bin/Release/net9.0-maccatalyst/maccatalyst-x64/publish/'

artifact_name: 'Emerald-macOS'
# IMPORTANT: Define the path to your macOS/Shared project file
project_path: './Emerald/Emerald.csproj'
target_framework: 'net9.0-desktop'
project_path: './Emerald/Emerald.csproj'
publish_output: 'Emerald_macOS'
artifact_name: 'Emerald-macOS-Release'

# == LINUX CONFIGURATION ==
- os: ubuntu-24.04
# == LINUX (Skia Gtk) ==
- os: ubuntu-latest
platform: linux
# UPDATED: Use the correct .NET 9 Linux target framework from your project
target_framework: 'net9.0-desktop'
# UPDATED: Point to the main project since 'net9.0-desktop' is likely defined there
project_path: './Emerald/Emerald.csproj'
# UPDATED: Adjust publish path for the new framework and project
# IMPORTANT: Verify this path matches your actual build output structure.
publish_path: './Emerald/bin/Release/net9.0-desktop/publish/'

artifact_Path: './Emerald/bin/Release/net9.0-desktop/'

artifact_name: 'Emerald-Linux'
project_path: './Emerald/Emerald.csproj'
publish_output: 'Emerald_Linux'
artifact_name: 'Emerald-Linux-Release'

# Steps to execute for each job in the matrix
steps:
# Step 1: Check out the repository code
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

# Step 2: Install dependencies using the composite action
- name: Install Dependencies for ${{ matrix.platform }}
timeout-minutes: 15
- name: Install Dependencies
uses: ./.github/steps/install_dependencies
with:
job-platform: ${{ matrix.platform }}
# Ensure correct .NET 9 SDK is used (default in action.yml)
# Ensure correct Windows SDK is used (default in action.yml)

# Step 2.5: Setup MSBuild (Windows Only) - ADDED BACK
- name: Setup MSBuild
- name: Setup MSBuild (Windows Only)
uses: microsoft/setup-msbuild@v1.3.1
if: matrix.os == 'windows-latest' # Only run this step on Windows runners
if: matrix.os == 'windows-latest'

# Step 3: Build and publish the application
- name: Build and Publish Emerald (${{ matrix.platform }})
timeout-minutes: 20
# == BUILD STEP ==
- name: Build and Publish (${{ matrix.platform }})
shell: pwsh
run: |
Write-Host "Publishing project: ${{ matrix.project_path }} for framework: ${{ matrix.target_framework }}"

# UPDATED: Use msbuild /t:publish for Windows based on Uno documentation for unpackaged apps
$project = "${{ matrix.project_path }}"
$output = Join-Path $env:GITHUB_WORKSPACE "${{ matrix.publish_output }}"
Write-Host "Building $project to $output..."

# FIXED: Use an Array @() to pass multiple arguments correctly
# This ensures PowerShell passes them as separate flags, not one long string.
$commonArgs = @("/p:PublishTrimmed=false", "/p:PublishSingleFile=false")

if ('${{ matrix.platform }}' -eq 'windows') {
# Navigate to project directory - Made mandatory as requested
cd (Split-Path -Path "${{ matrix.project_path }}" -Parent) # Navigate to the directory containing the csproj

Write-Host "Using msbuild /t:publish for Windows (x64)..."
# Use msbuild with specified parameters. MSBuild should now be in the PATH thanks to the setup-msbuild step.
# /r: Restore dependencies
# /t:publish: Execute the publish target
# /p:TargetFramework: Set the target framework from the matrix
# /p:Configuration: Set the build configuration
# /p:Platform: Set the target platform (x64 for standard windows-latest runner)
# /p:PublishDir: Set the output directory using the path from the matrix
# Pass only the project file name since we changed directory
msbuild /r /t:publish `
# Windows WinUI 3 (Unpackaged & Self-Contained)
msbuild $project /r /t:publish `
/p:TargetFramework=${{ matrix.target_framework }} `
/p:Configuration=Release `
/p:Platform=x64 `
/p:PublishDir=${{ matrix.publish_path }} `
(Split-Path -Path "${{ matrix.project_path }}" -Leaf) # Pass only the project file name

# Note: Building for x86/arm64 would require additional msbuild calls with different /p:Platform values
# and potentially different PublishDir paths, or separate matrix jobs.
}
# Use dotnet publish for macOS and Linux
/p:PublishDir="$output" `
/p:WindowsPackageType=None `
/p:WindowsAppSDKSelfContained=true `
/p:SelfContained=true `
/p:ErrorOnDuplicatePublishOutputFiles=false `
$commonArgs
}
elseif ('${{ matrix.platform }}' -eq 'macos') {
# macOS (App Bundle)
dotnet publish $project -c Release -f "${{ matrix.target_framework }}" `
-r osx-x64 --self-contained true `
-p:PackageFormat=app `
-o "$output" `
$commonArgs
}
else {

Write-Host "Using dotnet publish for ${{ matrix.platform }}..."
if ('${{ matrix.platform }}' -eq 'linux') {
dotnet publish "${{ matrix.project_path }}" -c Release -f "${{ matrix.target_framework }}" -p:SelfContained=true -p:PackageFormat=snap -p:UnoSnapcraftAdditionalParameters=--destructive-mode

}
else {
dotnet publish "${{ matrix.project_path }}" -c Release -f "${{ matrix.target_framework }}" --no-self-contained
}
# Linux (Standard Binary)
dotnet publish $project -c Release -f "${{ matrix.target_framework }}" `
-r linux-x64 --self-contained true `
-o "$output" `
$commonArgs
}

Write-Host "Publish completed for ${{ matrix.platform }}."

# Step 4: Upload the build artifact
- name: Upload Artifact (${{ matrix.artifact_name }})
if: success() && github.event_name == 'push' && (github.ref == 'refs/heads/main' || startsWith(github.ref, 'refs/heads/release/'))
# == ZIP STEP ==
- name: Zip Release Artifact
shell: pwsh
run: |
$source = Join-Path $env:GITHUB_WORKSPACE "${{ matrix.publish_output }}"
$zipName = "${{ matrix.artifact_name }}.zip"
$destination = Join-Path $env:GITHUB_WORKSPACE $zipName

Write-Host "Zipping $source to $destination"

# NOTE: Zips the folder itself, not the contents inside, preserving structure.
Compress-Archive -Path "$source" -DestinationPath $destination

- name: Upload Artifact
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact_name }}
path: ${{ matrix.artifact_Path }}
retention-days: 7
path: ${{ github.workspace }}/${{ matrix.artifact_name }}.zip
retention-days: 5
3 changes: 2 additions & 1 deletion .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
// For further information visit https://github.com/OmniSharp/omnisharp-vscode/blob/master/debugger-launchjson.md
"version": "0.2.0",
"configurations": [

{
"name": "Uno Platform Mobile",
"type": "Uno",
Expand All @@ -20,7 +21,7 @@
"request": "launch",
"preLaunchTask": "build-desktop",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/Emerald/bin/Debug/net8.0-desktop/Emerald.dll",
"program": "${workspaceFolder}/Emerald/bin/Debug/net9.0-desktop/Emerald.dll",
"args": [],
"launchSettingsProfile": "Emerald (Desktop)",
"env": {
Expand Down
4 changes: 2 additions & 2 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"build",
"${workspaceFolder}/Emerald/Emerald.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand All @@ -22,7 +22,7 @@
"publish",
"${workspaceFolder}/Emerald/Emerald.csproj",
"/property:GenerateFullPaths=true",
"/property:TargetFramework=net8.0-desktop",
"/property:TargetFramework=net9.0-desktop",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile"
Expand Down
Loading
Loading