Skip to content

Commit

Permalink
Added html standalone
Browse files Browse the repository at this point in the history
  • Loading branch information
Aragas committed Dec 16, 2024
1 parent 93acc77 commit 5bd51a8
Show file tree
Hide file tree
Showing 3 changed files with 99 additions and 8 deletions.
38 changes: 30 additions & 8 deletions .github/workflows/publish-standalone.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,17 +57,28 @@ jobs:

- name: Run _build
run: >-
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./pub";
Compress-Archive -Path pub/* -Destination "native-${{ matrix.data.rid }}.zip"
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./imgui";
Compress-Archive -Path imgui/* -Destination "imgui-native-${{ matrix.data.rid }}.zip"
dotnet publish src/BUTR.CrashReport.Renderer.Html.Standalone/BUTR.CrashReport.Renderer.Html.Standalone.csproj --configuration Release -f net9.0 -r "${{ matrix.data.rid }}" -o "./html";
Compress-Archive -Path html/* -Destination "html-native-${{ matrix.data.rid }}.zip"
shell: pwsh

- name: Upload Release Assets
- name: Upload Release Assets (ImGui)
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "imgui-native-${{ matrix.data.rid }}.zip"

- name: Upload Release Assets (Html)
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "native-${{ matrix.data.rid }}.zip"
assets_path: "html-native-${{ matrix.data.rid }}.zip"

publish-universal:
strategy:
Expand All @@ -93,14 +104,25 @@ jobs:

- name: Run _build
run: >-
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./pub";
Compress-Archive -Path pub/* -Destination "net6-${{ matrix.data.rid }}.zip"
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./imgui";
Compress-Archive -Path pub/* -Destination "imgui-net6-${{ matrix.data.rid }}.zip"
dotnet publish src/BUTR.CrashReport.Renderer.ImGui.Standalone/BUTR.CrashReport.Renderer.ImGui.Standalone.csproj --configuration Release -f net6.0 -p:RuntimeSingleFile=true -o "./html";
Compress-Archive -Path pub/* -Destination "html-net6-${{ matrix.data.rid }}.zip"
shell: pwsh

- name: Upload Release Assets
- name: Upload Release Assets (ImGui)
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "imgui-net6-${{ matrix.data.rid }}.zip"

- name: Upload Release Assets (Html)
uses: dwenegar/upload-release-assets@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
release_id: ${{ needs.create-release.outputs.release_id }}
assets_path: "net6-${{ matrix.data.rid }}.zip"
assets_path: "html-net6-${{ matrix.data.rid }}.zip"
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<OutputType>Exe</OutputType>
<TargetFrameworks>net6.0;net9.0</TargetFrameworks>
<Nullable>enable</Nullable>
<LangVersion>latest</LangVersion>
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>

<InvariantGlobalization>true</InvariantGlobalization>
<InvariantTimezone>true</InvariantTimezone>

<PublishTrimmed>true</PublishTrimmed>
<TrimMode>full</TrimMode>
<EnableAggressiveTrimming>true</EnableAggressiveTrimming>

<TrimmerRemoveSymbols>true</TrimmerRemoveSymbols>

<CopyOutputSymbolsToPublishDirectory>false</CopyOutputSymbolsToPublishDirectory>

<DefineConstants>$(DefineConstants);BUTRCRASHREPORT_DISABLE;BUTRCRASHREPORT_ENABLE_HTML_RENDERER;</DefineConstants>
</PropertyGroup>

<PropertyGroup Condition="$(TargetFramework) == 'net9.0' AND $(Runtime) == '' AND $(RuntimeSingleFile) == ''">
<PublishAot>true</PublishAot>
<OptimizationPreference>Size</OptimizationPreference>
</PropertyGroup>

<PropertyGroup Condition="$(Runtime) == 'true'">

</PropertyGroup>

<PropertyGroup Condition="$(RuntimeSingleFile) == 'true'">
<PublishSingleFile>true</PublishSingleFile>
<IncludeNativeLibrariesForSelfExtract>true</IncludeNativeLibrariesForSelfExtract>
<IncludeAllContentForSelfExtract>true</IncludeAllContentForSelfExtract>
</PropertyGroup>

<ItemGroup>
<PackageReference Include="CommandLineParser" Version="2.9.1" />

<PackageReference Include="Microsoft.Bcl.AsyncInterfaces" Version="9.0.0" />
<PackageReference Include="System.Buffers" Version="4.6.0" />
<PackageReference Include="System.IO.Pipelines" Version="9.0.0" />
<PackageReference Include="System.Memory" Version="4.6.0" />
<PackageReference Include="System.Runtime.CompilerServices.Unsafe" Version="6.1.0" />
<PackageReference Include="System.Text.Encodings.Web" Version="9.0.0" />
<PackageReference Include="System.Text.Json" Version="9.0.0" />
<PackageReference Include="System.Threading.Tasks.Extensions" Version="4.6.0" />
</ItemGroup>

<ItemGroup>
<ProjectReference Include="..\BUTR.CrashReport.Renderer.Html\BUTR.CrashReport.Renderer.Html.csproj" />
<ProjectReference Include="..\BUTR.CrashReport\BUTR.CrashReport.csproj" />
</ItemGroup>

<ItemGroup>
<Compile Include="..\BUTR.CrashReport.Renderer.Html.Tool\**\*.cs"
Exclude="..\BUTR.CrashReport.Renderer.Html.Tool\obj\**\*.cs" />
</ItemGroup>

</Project>
7 changes: 7 additions & 0 deletions src/BUTR.CrashReport.sln
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,8 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Standalone", "Standalone",
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BUTR.CrashReport.Renderer.ImGui.Standalone", "BUTR.CrashReport.Renderer.ImGui.Standalone\BUTR.CrashReport.Renderer.ImGui.Standalone.csproj", "{304D6A99-EF3B-45A1-AC3A-372C04E5842B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "BUTR.CrashReport.Renderer.Html.Standalone", "BUTR.CrashReport.Renderer.Html.Standalone\BUTR.CrashReport.Renderer.Html.Standalone.csproj", "{065FFD4D-BA4A-4F42-9359-43517CE7460E}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Expand Down Expand Up @@ -225,6 +227,10 @@ Global
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Debug|Any CPU.Build.0 = Debug|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Release|Any CPU.ActiveCfg = Release|Any CPU
{304D6A99-EF3B-45A1-AC3A-372C04E5842B}.Release|Any CPU.Build.0 = Release|Any CPU
{065FFD4D-BA4A-4F42-9359-43517CE7460E}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{065FFD4D-BA4A-4F42-9359-43517CE7460E}.Debug|Any CPU.Build.0 = Debug|Any CPU
{065FFD4D-BA4A-4F42-9359-43517CE7460E}.Release|Any CPU.ActiveCfg = Release|Any CPU
{065FFD4D-BA4A-4F42-9359-43517CE7460E}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down Expand Up @@ -266,5 +272,6 @@ Global
{36A642D2-9075-470D-B5B4-40EA20E0C16C} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{B2E732BE-17B2-4014-95A8-C588C6F624D4} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{304D6A99-EF3B-45A1-AC3A-372C04E5842B} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
{065FFD4D-BA4A-4F42-9359-43517CE7460E} = {F324D64B-B62F-440F-A766-A4EC343A5F17}
EndGlobalSection
EndGlobal

0 comments on commit 5bd51a8

Please sign in to comment.