Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
146 commits
Select commit Hold shift + click to select a range
7937212
WIP: Avalonia UI experiment, initial commit.
highbyte Oct 10, 2025
6a096de
Tweak styles
highbyte Oct 15, 2025
f2c7b13
Tweak layout
highbyte Oct 15, 2025
d80724a
Add more C64 UI controls. Most of them do nothing for now.
highbyte Oct 15, 2025
fe04295
Tweak layout
highbyte Oct 15, 2025
dae32fd
Fix attach/deattach C64 .d64 image button
highbyte Oct 16, 2025
74d0006
Reduce complexity by changing Avalonia commands to event handlers.
highbyte Oct 16, 2025
ed113c9
Fix logic for changing joystick settings while emulator is running
highbyte Oct 16, 2025
0b58122
Fix joystick config in MainView to be in sync with C64 config dialog
highbyte Oct 16, 2025
ab3f415
Fix download and run d64
highbyte Oct 16, 2025
22a3295
Tweak info-buttons
highbyte Oct 16, 2025
8f57f95
Tweak info button
highbyte Oct 16, 2025
c429b47
Tweak
highbyte Oct 16, 2025
472bda6
Tweak layout and minor fixes
highbyte Oct 17, 2025
342ad41
Set focus on emulator after start
highbyte Oct 17, 2025
037bcb0
Tweak focus
highbyte Oct 17, 2025
7f843e8
Tweak focus
highbyte Oct 17, 2025
ee167ba
Refactor to use DI for ViewModels.
highbyte Oct 23, 2025
553583b
Tweak expand/collapse sections
highbyte Oct 24, 2025
16135de
Create a custom color palette and use it in styles
highbyte Oct 24, 2025
be5e633
Tweak layout
highbyte Oct 24, 2025
adaee01
Tweak layout
highbyte Oct 24, 2025
f6d017a
Improve stats display.
highbyte Oct 25, 2025
2c293d1
Some tooltips
highbyte Oct 25, 2025
71a0765
Add Avalonia Monitor, WIP
highbyte Oct 25, 2025
7baac4b
Rebind Avalonia DevTools from F12 to Ctrl-F12.
highbyte Oct 25, 2025
9690c10
Fix for browser
highbyte Oct 25, 2025
92bc985
Tweak monitor status register info layout
highbyte Oct 25, 2025
6531da3
Tweak monitor dialog: Focus input textbox, moveable, remember size an…
highbyte Oct 25, 2025
1013c7b
Tweak layout
highbyte Oct 25, 2025
3daeec4
Fix closing monitor dialog in Browser not getting focus back on emula…
highbyte Oct 25, 2025
5f8d70f
Make the scale slider functional
highbyte Oct 25, 2025
c6eea8f
Implement missing load save buttons.
highbyte Oct 25, 2025
47463ca
Publish the beta test app using the Avalonia WASM app.
highbyte Oct 25, 2025
ee5221b
Tweak config layout
highbyte Oct 26, 2025
fe397ad
Tweak layout
highbyte Oct 26, 2025
e9a90ae
Improve layout of C64ConfigDialog and C64ConfigUserControl
highbyte Oct 26, 2025
43e0f31
Fix C64ConfigUserControl not being able to be opened from Browser.
highbyte Oct 26, 2025
7a3abba
Fix show C64 Config section is validation errors.
highbyte Oct 26, 2025
181e956
Fix publish website workflow names
highbyte Oct 26, 2025
7a3c3fc
Tweak C64 Config button
highbyte Oct 26, 2025
34d43b2
Tweak C64MenuView
highbyte Oct 26, 2025
b653472
Tweak layout
highbyte Oct 26, 2025
3cde142
WIP: Improve setting scale initially
highbyte Oct 27, 2025
68d0ca1
Improve smart scale calculation.
highbyte Oct 27, 2025
1c6e3b3
Split up scale calculation a bit.
highbyte Oct 27, 2025
5b47128
Tweak scale calc
highbyte Oct 27, 2025
0c5d7c6
Tweak ErrorDialog layout
highbyte Oct 28, 2025
6838c46
WIP: Start implementation of loading exampels via embedded resources …
highbyte Oct 28, 2025
fc9bd59
Move logic from C64MenuView code-behind to C64MenuViewModel
highbyte Oct 29, 2025
dad7d51
Minor cleanup
highbyte Oct 29, 2025
1397ab3
Move View logic from C64MenuViewModel to C64MenuView code-behind. Kee…
highbyte Oct 29, 2025
0d2e00e
Cleanup
highbyte Oct 29, 2025
a679309
Comment
highbyte Oct 29, 2025
f9fc8e0
Fix stop/start instrumentation and show stats panel.
highbyte Oct 29, 2025
8b478e0
Fix compiler bug
highbyte Oct 30, 2025
e135546
Fix compiler bug
highbyte Oct 30, 2025
7279cbf
Add GenericComputer example programs as embedded resources in Avaloni…
highbyte Oct 30, 2025
c1052d2
Add rudimentary input handling for Generic computer on Avalonia
highbyte Oct 30, 2025
cac5870
Disable Avalonia rendering when emulator is not running
highbyte Oct 31, 2025
33f54bc
Disable Avalonia rendering when emulator is not running
highbyte Oct 31, 2025
956ceeb
Only log if exception occurs during rendering (according to best prac…
highbyte Oct 31, 2025
f275301
Capture Avalonia logs into ILogger.
highbyte Oct 31, 2025
0557350
Add tabs to information area.
highbyte Oct 31, 2025
b047e80
Reference tab items via name instead of index
highbyte Oct 31, 2025
eeb6959
Add rudimentary log viewer
highbyte Oct 31, 2025
9f0e124
Tweak log display
highbyte Oct 31, 2025
7fdb761
Fix log scroll
highbyte Oct 31, 2025
51a4a86
WIP: Start refactor to use property notification instead of direct de…
highbyte Nov 1, 2025
086555c
Change selection of default system to be after Avalonia MainView has …
highbyte Nov 1, 2025
f7ac4a0
TODO
highbyte Nov 1, 2025
c2bd32c
Fix issue with emulator update frequency increasing after each pause/…
highbyte Nov 2, 2025
bac9cfa
Fix closing monitor not always working
highbyte Nov 2, 2025
1cc9def
Fix focus on emulator
highbyte Nov 2, 2025
da1ec88
Fix EmulatorPlaceholderView to always be same size as selected emulator.
highbyte Nov 2, 2025
38792b7
Remove indirect dependency from AvaloniaHostApp to EmulatorView.
highbyte Nov 2, 2025
4761cfd
Fix bug selecting RenderProvider and RenderTarget
highbyte Nov 2, 2025
b62c7ef
Move logic from MainView code-behind to MainViewModel where they belong.
highbyte Nov 2, 2025
a7325d0
Remove direct dependency from MainView to AvaloniaHostApp.
highbyte Nov 2, 2025
1e8a53f
Comments
highbyte Nov 2, 2025
a8aa678
Add some startup logging
highbyte Nov 2, 2025
c7cf759
Fix for ReactiveUI usage for it to work in Browser (as well as Desktop).
highbyte Nov 2, 2025
755fea7
Trigger Avalonia monitor on breakpoints
highbyte Nov 3, 2025
35f67c2
Try to fix occasional Avalonia update timer multiple events
highbyte Nov 3, 2025
80e764b
Move non-ui logic from C64MenuView code-behind to C64MenuViewModel, a…
highbyte Nov 3, 2025
ebcc608
Fix C64MenuView UI refresh for config after auto download & run.
highbyte Nov 3, 2025
3f9bd3f
Move non-ui logic from C64UserControl code-behind to C64ConfigDialogV…
highbyte Nov 3, 2025
643e4f7
Fix showing C64 Config via Window work again after previous refactor.
highbyte Nov 3, 2025
4f84bf6
In MonitorUserControl use Reactive commands in ViewModel instead of b…
highbyte Nov 3, 2025
621926f
Update todo
highbyte Nov 3, 2025
3b0f91e
Update todo
highbyte Nov 3, 2025
81a5ab1
Fix monitor open/close under Browser
highbyte Nov 4, 2025
daf4a37
Fix issue with browser
highbyte Nov 4, 2025
d3c6c8e
Merge branch 'feature/avalonia' of https://github.com/highbyte/dotnet…
highbyte Nov 4, 2025
ecd210a
Fix some more issues with browser
highbyte Nov 4, 2025
f778ad7
Titles and favicon
highbyte Nov 4, 2025
96f0c52
Tweak splash screen
highbyte Nov 4, 2025
cbbc5c2
Fade in MainView
highbyte Nov 4, 2025
48c36a4
Update todo
highbyte Nov 4, 2025
4d0e273
Let emulatorview width decide the width of the information area.
highbyte Nov 4, 2025
f045492
Fix sync problem between MainViewModel and AvaloniaHostApp for seprat…
highbyte Nov 4, 2025
6f20a9f
Fix validation error sync with views
highbyte Nov 4, 2025
71a6028
todo
highbyte Nov 4, 2025
b136d09
Add LogLevel to DotNet6502InMemLogStore, not just the log message
highbyte Nov 5, 2025
37ccbf6
Better log layout and formatting
highbyte Nov 5, 2025
58518b8
Make the log tab work on large amount of log messages received under …
highbyte Nov 5, 2025
d424755
Update todo
highbyte Nov 5, 2025
76d9d9e
Add logo do placeholder view
highbyte Nov 5, 2025
bb50289
Remove unnecessart style
highbyte Nov 5, 2025
74ee149
Improve C64ConfigUserControl
highbyte Nov 5, 2025
0c85dc9
Align the main emulator view and info screen to left instead of cente…
highbyte Nov 6, 2025
a412eb0
Fix classes derived from HostApp to use renamed method override.
highbyte Nov 6, 2025
4919917
Make a ICommandTarget be able to get configuration on if/how to conve…
highbyte Nov 6, 2025
1c5ee9c
Add Safari detection and notice for non-compatibility.
highbyte Nov 6, 2025
0451ece
Update todo
highbyte Nov 6, 2025
ca80355
Update todo
highbyte Nov 6, 2025
f7ff646
Update todo
highbyte Nov 6, 2025
e944488
Update todo
highbyte Nov 6, 2025
f0a33b4
Update todo
highbyte Nov 6, 2025
4413fc8
Testing caching in Avalonia Browser app
highbyte Nov 7, 2025
24a4033
Fix layout
highbyte Nov 7, 2025
14dcea5
Update todo
highbyte Nov 7, 2025
df18b08
Merge branch 'feature/avalonia' into feature/avalonia-browser-caching
highbyte Nov 7, 2025
eb344f9
Bump hardcoded version to test browser cache reload
highbyte Nov 7, 2025
b32f9b6
Automatically set GitHub workflow run number in version number for te…
highbyte Nov 7, 2025
7667da4
Remove file
highbyte Nov 7, 2025
bde4748
WIP: Add C64 coding assistant to Avalonia app
highbyte Nov 8, 2025
81e97ae
WIP: CodingAssistant in Avalonia
highbyte Nov 8, 2025
c328da3
WIP: CodingAssistant config (not complete)
highbyte Nov 8, 2025
06764d3
Unify config loading for desktop and browser app to both use IConfigu…
highbyte Nov 8, 2025
7535482
CodeAssistant should now work in Avalonia from both Desktop and Browser.
highbyte Nov 9, 2025
6524c2f
Update todo
highbyte Nov 9, 2025
34671d8
Separate workflows for Blazor and Avalonia web apps.
highbyte Nov 9, 2025
bdf5d6f
Fix regressions after Avalonia code has been added.
highbyte Nov 9, 2025
5c78989
Prepare separates support library for Avalonia.
highbyte Nov 9, 2025
c5033e4
Better handling of default code assistant endpoint
highbyte Nov 10, 2025
10f7a58
Move Avalonia non-ui stuff from Highbyte.DotNet6502.App.Avalonia.Core…
highbyte Nov 10, 2025
f791b96
Tweak layout
highbyte Nov 10, 2025
d94ec6a
Add bindings to Audio checkbox
highbyte Nov 10, 2025
af11386
Update docs with info about Avalonia
highbyte Nov 10, 2025
a8e67e8
Update doc
highbyte Nov 10, 2025
2655bfd
Set specific commit for 3rd party GitHub actions used.
highbyte Nov 10, 2025
87cd31b
Add unit test
highbyte Nov 10, 2025
c1069b7
New test
highbyte Nov 10, 2025
491683f
Tweak layout
highbyte Nov 10, 2025
a0e6141
Tweak layout
highbyte Nov 10, 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
83 changes: 83 additions & 0 deletions .github/workflows/dotnet-avalonia-app-publish-to-gh-pages-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Publish Test Avalonia browser app to GitHub Pages (separate url)

on:
# push:
# branches:
# - master
workflow_dispatch:

#Trigger when tag is created
# push:
# tags:
# - 'v*.*.*'

env:
CONFIGURATION: "Release"

PROJECT_FILE: "src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Browser/Highbyte.DotNet6502.App.Avalonia.Browser.csproj"
PROJECT_GH_PAGES_DIR: "app2-test"
BUILD_OUTPUT_WORKING_DIR: "build"
GH_PAGES_WORKING_DIR: "ghpages"
GH_PAGES_BRANCH_NAME: "gh-pages"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4

# Generate auto-incrementing version number for test builds
- name: Generate version number
run: echo "VERSION=0.1.${{ github.run_number }}-test" >> $GITHUB_ENV

# Get version from tag
# - name: Get version from tag with 'v' prefix
# run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV

# Install .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Install DotNet workload - WASM tools
run: |
dotnet workload install wasm-tools

# Create GitHub Pages root folder contents
- name: Create GH root folder and add .nojekyll file do disable built-in Jekyll CMS
run: |
mkdir ${{ env.GH_PAGES_WORKING_DIR }}
echo '' > ${{ env.GH_PAGES_WORKING_DIR }}/.nojekyll

# Publish the static website to a build working folder
- name: Publish
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work with Blazor. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
run: dotnet publish ${{ env.PROJECT_FILE }} -p:Version=${{ env.VERSION }} -c:${{ env.CONFIGURATION }} -p:GHPages=true -p:GHPagesBase="/${{ github.event.repository.name }}/${{ env.PROJECT_GH_PAGES_DIR }}/" -p:GHPagesInjectBrotliLoader=false -o:${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}

# Replace version placeholders in HTML files
- name: Replace version placeholders
run: |
find ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot -name "*.html" -exec sed -i 's/{{APP_VERSION}}/${{ env.VERSION }}/g' {} \;
find ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot -name "*.js" -exec sed -i 's/{{APP_VERSION}}/${{ env.VERSION }}/g' {} \;

# Copy the published static website from wwwroot folder in publish output dir
- name: Copy published wwwroot contents to a subdirectory in GH pages working dir root
run: |
cp -r ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot/ ${{ env.GH_PAGES_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/

# Deploy the static website to GitHub Pages
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23
with:
# token: ${{ secrets.ACCESS_TOKEN }} # Use if custom token needed to another repo
branch: ${{ env.GH_PAGES_BRANCH_NAME }} # The branch the action should deploy to.
folder: ${{ env.GH_PAGES_WORKING_DIR }} # The folder the action should deploy.
#target-folder: app #If not specified, the contents for folder above is copied to the root of the GH pages branch.
single-commit: true
clean: false
clean-exclude: | # If clean: true, keep the live app folder in the gh-pages branch (where non lab/test builds are deployed to)
app/**/*
app-test/**/*
app2/**/*
78 changes: 78 additions & 0 deletions .github/workflows/dotnet-avalonia-app-publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,78 @@
name: Publish Avalonia browser app to GitHub Pages (separate url)

on:
# push:
# branches:
# - master
workflow_dispatch:

#Trigger when tag is created
push:
tags:
- 'v*.*.*'

env:
CONFIGURATION: "Release"

PROJECT_FILE: "src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Browser/Highbyte.DotNet6502.App.Avalonia.Browser.csproj"
PROJECT_GH_PAGES_DIR: "app2"
BUILD_OUTPUT_WORKING_DIR: "build"
GH_PAGES_WORKING_DIR: "ghpages"
GH_PAGES_BRANCH_NAME: "gh-pages"

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4

# Get version from tag or set fallback version for manual dispatch
- name: Set version from tag or fallback
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
else
echo "VERSION=0.1.${{ github.run_number }}-test" >> $GITHUB_ENV
fi

# Install .NET Core SDK
- name: Setup .NET Core
uses: actions/setup-dotnet@v4
with:
dotnet-version: 9.0.x

- name: Install DotNet workload - WASM tools
run: |
dotnet workload install wasm-tools

# Create GitHub Pages root folder contents
- name: Create GH root folder and add .nojekyll file do disable built-in Jekyll CMS
run: |
mkdir ${{ env.GH_PAGES_WORKING_DIR }}
echo '' > ${{ env.GH_PAGES_WORKING_DIR }}/.nojekyll

# Publish the static website to a build working folder
- name: Publish
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work with Blazor. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
run: dotnet publish ${{ env.PROJECT_FILE }} -p:Version=${{ env.VERSION }} -c:${{ env.CONFIGURATION }} -p:GHPages=true -p:GHPagesBase="/${{ github.event.repository.name }}/${{ env.PROJECT_GH_PAGES_DIR }}/" -p:GHPagesInjectBrotliLoader=false -o:${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}

# Copy the published static website from wwwroot folder in publish output dir
- name: Copy published wwwroot contents to a subdirectory in GH pages working dir root
run: |
cp -r ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot/ ${{ env.GH_PAGES_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/

# Deploy the static website to GitHub Pages
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23
with:
# token: ${{ secrets.ACCESS_TOKEN }} # Use if custom token needed to another repo
branch: ${{ env.GH_PAGES_BRANCH_NAME }} # The branch the action should deploy to.
folder: ${{ env.GH_PAGES_WORKING_DIR }} # The folder the action should deploy.
#target-folder: app #If not specified, the contents for folder above is copied to the root of the GH pages branch.
single-commit: true
clean: false
clean-exclude: | # If clean: true, keep the live app folder in the gh-pages branch (where non lab/test builds are deployed to)
app/**/*
app-test/**/*
app2-test/**/*
29 changes: 20 additions & 9 deletions .github/workflows/dotnet-blazor-app-publish-to-gh-pages-beta.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Publish Test .NET Blazor WASM app to GitHub Pages (separate url)
name: Publish Test Browser app to GitHub Pages (separate url)

on:
# push:
Expand All @@ -20,15 +20,17 @@ env:
GH_PAGES_WORKING_DIR: "ghpages"
GH_PAGES_BRANCH_NAME: "gh-pages"

VERSION: "0.0.1-test" # Hardcoded version for test/lab builds

jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Checkout the code
- uses: actions/checkout@v4

# Generate auto-incrementing version number for test builds
- name: Generate version number
run: echo "VERSION=0.1.${{ github.run_number }}-test" >> $GITHUB_ENV

# Get version from tag
# - name: Get version from tag with 'v' prefix
# run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
Expand All @@ -49,24 +51,33 @@ jobs:
mkdir ${{ env.GH_PAGES_WORKING_DIR }}
echo '' > ${{ env.GH_PAGES_WORKING_DIR }}/.nojekyll

# Publish the Blazor WASM site to a build working folder
# Publish the static website to a build working folder
- name: Publish
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work with Blazor. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
run: dotnet publish ${{ env.PROJECT_FILE }} -p:Version=${{ env.VERSION }} -c:${{ env.CONFIGURATION }} -p:GHPages=true -p:GHPagesBase="/${{ github.event.repository.name }}/${{ env.PROJECT_GH_PAGES_DIR }}/" -p:GHPagesInjectBrotliLoader=false -o:${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}

# Copy the published Blazor WASM site from wwwroot folder in publish output dir
# Replace version placeholders in HTML files
- name: Replace version placeholders
run: |
find ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot -name "*.html" -exec sed -i 's/{{APP_VERSION}}/${{ env.VERSION }}/g' {} \;
find ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot -name "*.js" -exec sed -i 's/{{APP_VERSION}}/${{ env.VERSION }}/g' {} \;

# Copy the published static website from wwwroot folder in publish output dir
- name: Copy published wwwroot contents to a subdirectory in GH pages working dir root
run: |
cp -r ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot/ ${{ env.GH_PAGES_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/

# Deploy the Blazor WASM site
# Deploy the static website to GitHub Pages
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23
with:
# token: ${{ secrets.ACCESS_TOKEN }} # Use if custom token needed to another repo
branch: ${{ env.GH_PAGES_BRANCH_NAME }} # The branch the action should deploy to.
folder: ${{ env.GH_PAGES_WORKING_DIR }} # The folder the action should deploy.
#target-folder: app #If not specified, the contents for folder above is copied to the root of the GH pages branch.
single-commit: true
clean: false
clean-exclude: app/**/* # If clean: true, keep the live app folder in the gh-pages branch (where non lab/test builds are deployed to)
clean-exclude: | # If clean: true, keep the live app folder in the gh-pages branch (where non lab/test builds are deployed to)
app/**/*
app2/**/*
app2-test/**/*
31 changes: 19 additions & 12 deletions .github/workflows/dotnet-blazor-app-publish-to-gh-pages.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
name: Publish .NET Blazor WASM app to GitHub Pages
name: Publish Browser app to GitHub Pages

on:
# push:
# branches:
# - master
# workflow_dispatch:
workflow_dispatch:

#Trigger when tag is created
push:
Expand All @@ -27,9 +27,14 @@ jobs:
# Checkout the code
- uses: actions/checkout@v4

# Get version from tag
- name: Get version from tag with 'v' prefix
run: echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
# Get version from tag or set fallback version for manual dispatch
- name: Set version from tag or fallback
run: |
if [[ "${{ github.event_name }}" == "push" && "${{ github.ref }}" == refs/tags/* ]]; then
echo "VERSION=${GITHUB_REF_NAME#v}" >> $GITHUB_ENV
else
echo "VERSION=0.1.${{ github.run_number }}-test" >> $GITHUB_ENV
fi

# Install .NET Core SDK
- name: Setup .NET Core
Expand All @@ -47,25 +52,27 @@ jobs:
mkdir ${{ env.GH_PAGES_WORKING_DIR }}
echo '' > ${{ env.GH_PAGES_WORKING_DIR }}/.nojekyll

# Publish the Blazor WASM site to a build working folder
# Publish the static website to a build working folder
- name: Publish
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
# Note: Could not get -p:GHPagesInjectBrotliLoader=true to work with Blazor. Gets error "Uncaught ReferenceError: Blazor is not defined" from "brotliloader.min.js"
run: dotnet publish ${{ env.PROJECT_FILE }} -p:Version=${{ env.VERSION }} -c:${{ env.CONFIGURATION }} -p:GHPages=true -p:GHPagesBase="/${{ github.event.repository.name }}/${{ env.PROJECT_GH_PAGES_DIR }}/" -p:GHPagesInjectBrotliLoader=false -o:${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}

# Copy the published Blazor WASM site from wwwroot folder in publish output dir
# Copy the published static website from wwwroot folder in publish output dir
- name: Copy published wwwroot contents to a subdirectory in GH pages working dir root
run: |
cp -r ${{ env.BUILD_OUTPUT_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/wwwroot/ ${{ env.GH_PAGES_WORKING_DIR }}/${{ env.PROJECT_GH_PAGES_DIR }}/

# Deploy the Blazor WASM site
# Deploy the static website to GitHub Pages
- name: Deploy to Github Pages
uses: JamesIves/github-pages-deploy-action@v4
uses: JamesIves/github-pages-deploy-action@4a3abc783e1a24aeb44c16e869ad83caf6b4cc23
with:
# token: ${{ secrets.ACCESS_TOKEN }} # Use if custom token needed to another repo
branch: ${{ env.GH_PAGES_BRANCH_NAME }} # The branch the action should deploy to.
folder: ${{ env.GH_PAGES_WORKING_DIR }} # The folder the action should deploy.
#target-folder: app #If not specified, the contents for folder above is copied to the root of the GH pages branch.
single-commit: true
clean: false
clean-exclude: app-test/**/* # If clean: true, keep the lab/test app folder in the gh-pages branch

clean-exclude: | # If clean: true, keep the live app folder in the gh-pages branch (where non lab/test builds are deployed to)
app-test/**/*
app2/**/*
app2-test/**/*
5 changes: 3 additions & 2 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -282,5 +282,6 @@ __pycache__/

BenchmarkDotNet.Artifacts/

/src/apps/Highbyte.DotNet6502.App.SadConsole/appsettings.Development.json
/src/apps/Highbyte.DotNet6502.App.SilkNetNative/appsettings.Development.json
src/apps/Highbyte.DotNet6502.App.SadConsole/appsettings.Development.json
src/apps/Highbyte.DotNet6502.App.SilkNetNative/appsettings.Development.json
src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Desktop/appsettings.Development.json
26 changes: 23 additions & 3 deletions .vscode/launch.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,8 +22,8 @@
"type": "blazorwasm",
"request": "launch",
"cwd": "${workspaceFolder}/src/apps/Highbyte.DotNet6502.App.WASM",
"url": "http://localhost:5000",
"browser": "edge"
"url": "http://localhost:5000"
//"browser": "chrome"
},
{
"name": "SadConsole app - .NET Core Launch",
Expand All @@ -50,7 +50,27 @@
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "externalTerminal",
"stopAtEntry": false
},
},
{
"name": "Avalonia desktop app - .NET Core Launch",
"type": "coreclr",
"request": "launch",
"preLaunchTask": "build avalonia desktop app",
// If you have changed target frameworks, make sure to update the program path.
"program": "${workspaceFolder}/src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Desktop/bin/Debug/net9.0/Highbyte.DotNet6502.App.Avalonia.Desktop.dll",
"args": [],
"cwd": "${workspaceFolder}/src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Desktop/bin/Debug/net9.0",
// For more information about the 'console' field, see https://aka.ms/VSCode-CS-LaunchJson-Console
"console": "integratedTerminal",
"stopAtEntry": false
},
{
"name": "C#: Highbyte.DotNet6502.App.Avalonia.Browser",
"type": "dotnet",
"request": "launch",
"projectPath": "${workspaceFolder}/src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Browser/Highbyte.DotNet6502.App.Avalonia.Browser.csproj",
"launchConfigurationId": "TargetFramework=;Avalonia.Browser"
},
{
"name": ".NET Core Attach",
"type": "coreclr",
Expand Down
16 changes: 16 additions & 0 deletions .vscode/tasks.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,6 +81,22 @@
"isDefault": true
}
},
{
"label": "build avalonia desktop app",
"command": "dotnet",
"type": "process",
"args": [
"build",
"${workspaceFolder}/src/apps/Avalonia/Highbyte.DotNet6502.App.Avalonia.Desktop/Highbyte.DotNet6502.App.Avalonia.Desktop.csproj",
"/property:GenerateFullPaths=true",
"/consoleloggerparameters:NoSummary"
],
"problemMatcher": "$msCompile",
"group": {
"kind": "build",
"isDefault": true
}
},
{
"label": "test",
"command": "dotnet",
Expand Down
11 changes: 11 additions & 0 deletions NuGet.Config
Original file line number Diff line number Diff line change
Expand Up @@ -4,4 +4,15 @@
<add key="nuget.org" value="https://api.nuget.org/v3/index.json" protocolVersion="3" />
<add key="SkiaSharp nightly" value="https://aka.ms/skiasharp-eap/index.json" />
</packageSources>

<!-- Define mappings by adding package patterns beneath the target source. -->
<packageSourceMapping>
<!-- key value for <packageSource> should match key values from <packageSources> element -->
<packageSource key="nuget.org">
<package pattern="*" />
</packageSource>
<!--<packageSource key="SkiaSharp nightly">
<package pattern="SkiaSharp*" />
</packageSource>-->
</packageSourceMapping>
</configuration>
Loading
Loading