Skip to content

Commit

Permalink
Merge pull request #3 from dotnet-campus/t/lindexi/CI
Browse files Browse the repository at this point in the history
  • Loading branch information
walterlv authored Jun 15, 2024
2 parents ce2b798 + 0145fde commit c4b18c0
Show file tree
Hide file tree
Showing 10 changed files with 31 additions and 241 deletions.
20 changes: 7 additions & 13 deletions .github/workflows/dotnet-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,22 +21,16 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: RestoreWorkload
run: dotnet workload restore UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
- name: RestoreGtk
run: dotnet restore -p:TargetFramework=net8.0 -r linux-x64 UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
- name: BuildGtk
run: dotnet build -c release -r linux-x64 -p:TargetFramework=net8.0 --no-restore UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
- name: RestoreFrameBuffer
run: dotnet restore -p:TargetFramework=net8.0 -r linux-x64 UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Linux.FrameBuffer/UnoSpySnoopDebugger.Skia.Linux.FrameBuffer.csproj
- name: BuildFrameBuffer
run: dotnet build -c release -r linux-x64 -p:TargetFramework=net8.0 --no-restore UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Linux.FrameBuffer/UnoSpySnoopDebugger.Skia.Linux.FrameBuffer.csproj
# - name: RestoreWorkload
# run: dotnet workload restore UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
- name: Build
run: dotnet build -c release -p:TargetFramework=net8.0-desktop -r linux-x64 samples/SampleUnoApp/SampleUnoApp.csproj

BuildOnMac:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
- name: Restore
run: dotnet workload restore UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
- name: BuildGtk
run: dotnet build UnoSpySnoop/UI/UnoSpySnoopDebugger.Skia.Gtk/UnoSpySnoopDebugger.Skia.Gtk.csproj
run: dotnet workload restore samples/SampleUnoApp/SampleUnoApp.csproj
- name: Build
run: dotnet build -c release -p:TargetFramework=net8.0 -r linux-x64 samples/SampleUnoApp/SampleUnoApp.csproj
4 changes: 2 additions & 2 deletions .github/workflows/nuget-tag-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,5 +39,5 @@ jobs:
- name: Push generated package to GitHub registry
run: |
nuget push .\bin\Release\*.nupkg -Source github -SkipDuplicate
nuget push .\bin\Release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}
nuget push .\artifacts\package\release\*.nupkg -Source github -SkipDuplicate
nuget push .\artifacts\package\release\*.nupkg -Source https://api.nuget.org/v3/index.json -SkipDuplicate -ApiKey ${{ secrets.NugetKey }}
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -259,4 +259,4 @@ paket-files/
# Python Tools for Visual Studio (PTVS)
__pycache__/
*.pyc
/src/dotnetCampus.SourceYard/Properties/launchSettings.json
**/*/PublishProfiles/FolderProfile.pubxml
9 changes: 9 additions & 0 deletions Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,15 @@
<ThisYear>$([System.DateTime]::Now.ToString(`yyyy`))</ThisYear>
</PropertyGroup>

<PropertyGroup>
<IsPackable>false</IsPackable>
<!-- 输出符号文件 -->
<IncludeSymbols>true</IncludeSymbols>
<SymbolPackageFormat>snupkg</SymbolPackageFormat>
<!-- 嵌入源代码到符号文件,方便调试 -->
<EmbedAllSources>true</EmbedAllSources>
</PropertyGroup>

<PropertyGroup>
<Authors>dotnet-campus</Authors>
<RepositoryUrl>https://github.com/dotnet-campus/dotnetCampus.UISpy.Uno</RepositoryUrl>
Expand Down
Binary file removed Docs/Images/SelectDebugProcess.png
Binary file not shown.
Binary file added Docs/Images/SpySampleUnoApp.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ dotnetCampus.UISpy.Uno is a tool for inspecting the runtime visual tree of a Ski

## Why This Tool is Needed

The reason for needing this tool is that on the Skia platform, both WPF and GTK use a Surface to render the interface. This results in the original WPF UI debugging tools, such as SnoopWpf, only being able to see an image and not being able to obtain the correct interface structure. dotnetCampus.UISpy.Uno can effectively assist in interface development debugging on Skia-based desktop platforms, such as Skia.Wpf and Skia.Gtk, enhancing the efficiency of developers' interface development, especially when debugging Skia.Gtk applications on the Linux desktop.
The reason for needing this tool is that on the Skia platform, both WPF and GTK and X11 uses a Surface to render the interface. This results in the original WPF UI debugging tools, such as SnoopWpf, only being able to see an image and not being able to obtain the correct interface structure. dotnetCampus.UISpy.Uno can effectively assist in interface development debugging on Skia-based desktop platforms, such as Skia.Wpf and Skia.Gtk and Skia.X11 and so on, enhancing the efficiency of developers' interface development, especially when debugging Skia.Gtk or Skia.X11 applications on the Linux desktop.

## Usage

Expand All @@ -36,7 +36,7 @@ public sealed partial class MainPage : Page

After completing the above preparation work, you can run the project, press F12 to debug the UI interface.

![](./Docs/Images/SelectDebugProcess.png)
![](./Docs/Images/SpySampleUnoApp.png)

## Thanks

Expand Down
4 changes: 2 additions & 2 deletions README_zh-cn.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ dotnetCampus.UISpy.Uno 是一款用来辅助调试 Skia 平台下的 UNO 应用

## 为什么需要此工具

因为在 Skia 平台下,无论是 WPF 还是 GTK 都采用一个 Surface 来渲染界面。这就导致了原本的 WPF 的 UI 调试工具,如 SnoopWpf 等工具,将只能看到一张图片而不能获取正确的界面结构。通过 UnoSpySnoop 可以很好的在基于 Skia 的桌面平台,如 Skia.Wpf 和 Skia.Gtk 上,进行辅助界面开发调试,提高开发者的界面开发效率,特别是调试在 Linux 桌面上的 Skia.Gtk 应用的时候
因为在 Skia 平台下,无论是 WPF 还是 GTK 或 X11 都采用一个 Surface 来渲染界面。这就导致了原本的 WPF 的 UI 调试工具,如 SnoopWpf 等工具,将只能看到一张图片而不能获取正确的界面结构。通过 UnoSpySnoop 可以很好的在基于 Skia 的桌面平台,如 Skia.Wpf 和 Skia.Gtk 和 Skia.X11 上,进行辅助界面开发调试,提高开发者的界面开发效率,特别是调试在 Linux 桌面上的 Skia.Gtk 或 Skia.X11 应用的时候

## 使用方法

Expand All @@ -29,4 +29,4 @@ public sealed partial class MainPage : Page

完成以上准备工作之后,即可运行项目,随后在窗口获得焦点时按 F12 即可进行调试 UI 的界面

![](./Docs/Images/SelectDebugProcess.png)
![](./Docs/Images/SpySampleUnoApp.png)
Loading

0 comments on commit c4b18c0

Please sign in to comment.