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
11 changes: 6 additions & 5 deletions .github/actions/build-windows-x64/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@ runs:
- name: Setup .NET
uses: actions/setup-dotnet@v4
with:
dotnet-version: '8.0.x'
dotnet-version: '10.0.x'

- name: Restore
shell: cmd
run: dotnet restore MetahookInstaller.sln
run: dotnet restore MetahookInstaller.slnx

- name: Build
shell: cmd
run: dotnet build MetahookInstaller.sln -c Release --no-restore
run: dotnet build MetahookInstaller.slnx -c Release --no-restore

- name: Test
shell: cmd
Expand All @@ -30,13 +30,14 @@ runs:
shell: cmd
run: dotnet publish src\MetahookInstallerAvalonia.Desktop\MetahookInstallerAvalonia.Desktop.csproj -p:PublishProfile=FolderProfile -o MetahookInstaller-Output

- name: Publish CLI (single file)
- name: Publish CLI (Native AOT)
shell: cmd
run: dotnet publish src\MetahookInstallerCLI\MetahookInstallerCLI.csproj -c Release -r win-x64 --self-contained true -p:PublishSingleFile=true -p:IncludeNativeLibrariesForSelfExtract=true -p:EnableCompressionInSingleFile=false -p:PublishTrimmed=true -p:DebugType=None -p:DebugSymbols=false -o build\cli-publish
run: dotnet publish src\MetahookInstallerCLI\MetahookInstallerCLI.csproj -c Release -r win-x64 -o build\cli-publish

- name: Prepare output
shell: pwsh
run: |
Get-ChildItem -LiteralPath 'build\cli-publish' -Filter *.pdb -Recurse | Remove-Item -Force
Move-Item -LiteralPath 'MetahookInstaller-Output\MetahookInstallerAvalonia.Desktop.exe' -Destination 'MetahookInstaller-Output\MetahookInstaller.exe' -Force
$cliFiles = @(Get-ChildItem -LiteralPath 'build\cli-publish' -Recurse -File)
if ($cliFiles.Count -ne 1 -or $cliFiles[0].Name -ne 'MetahookInstallerCLI.exe') {
Expand Down
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,5 @@
/*.lnk
/MetahookInstallerAvalonia/
/MetahookInstallerAvalonia.Desktop/
/MetahookInstallerAvalonia/Installation/
/MetahookInstallerAvalonia/Installation/
/publish/
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<Project>
<PropertyGroup>
<Nullable>enable</Nullable>
<AvaloniaVersion>11.3.8</AvaloniaVersion>
<AvaloniaVersion>12.1.3</AvaloniaVersion>
</PropertyGroup>
</Project>
98 changes: 0 additions & 98 deletions MetahookInstaller.sln

This file was deleted.

14 changes: 14 additions & 0 deletions MetahookInstaller.slnx
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
<Solution>
<Configurations>
<Platform Name="Any CPU" />
<Platform Name="x64" />
<Platform Name="x86" />
</Configurations>
<Folder Name="/src/">
<Project Path="src/MetahookInstallerAvalonia.Desktop/MetahookInstallerAvalonia.Desktop.csproj" />
<Project Path="src/MetahookInstallerAvalonia/MetahookInstallerAvalonia.csproj" />
<Project Path="src/MetahookInstallerCLI/MetahookInstallerCLI.csproj" />
<Project Path="src/MetahookInstallerCore/MetahookInstallerCore.csproj" />
<Project Path="tests/MetahookInstaller.FileTests/MetahookInstaller.FileTests.csproj" />
</Folder>
</Solution>
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,9 +103,9 @@ Use Windows x64 with the .NET 8 SDK. NativeAOT publishing also requires the Visu
From the repository root:

```powershell
dotnet restore MetahookInstaller.sln
dotnet build MetahookInstaller.sln -c Debug --no-restore
dotnet build MetahookInstaller.sln -c Release --no-restore
dotnet restore MetahookInstaller.slnx
dotnet build MetahookInstaller.slnx -c Debug --no-restore
dotnet build MetahookInstaller.slnx -c Release --no-restore
dotnet run --project src\MetahookInstallerAvalonia.Desktop
dotnet run --project src\MetahookInstallerCLI -- -appid 225840
```
Expand Down
6 changes: 6 additions & 0 deletions global.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"sdk": {
"version": "10.0.100",
"rollForward": "latestFeature"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,18 @@
<PropertyGroup>
<OutputType>WinExe</OutputType>
<!--If you are willing to use Windows/MacOS native APIs you will need to create 3 projects.
One for Windows with net8.0-windows TFM, one for MacOS with net8.0-macos and one with net8.0 TFM for Linux.-->
<TargetFramework>net8.0-windows10.0.17763.0</TargetFramework>
One for Windows with net10.0-windows TFM, one for MacOS with net10.0-macos and one with net10.0 TFM for Linux.-->
<TargetFramework>net10.0-windows10.0.17763.0</TargetFramework>
<Nullable>enable</Nullable>
<BuiltInComInteropSupport>true</BuiltInComInteropSupport>
<ApplicationManifest>app.manifest</ApplicationManifest>
<PublishTrimmed>True</PublishTrimmed>
<PublishAot>True</PublishAot>
<!--Native AOT size settings; kept here so they apply to every publish, profile or not.-->
<TrimMode>full</TrimMode>
<StripSymbols>true</StripSymbols>
<StackTraceSupport>false</StackTraceSupport>
<IsAotCompatible>true</IsAotCompatible>
</PropertyGroup>
<PropertyGroup Label="Avalonia">
<AvaloniaUseCompiledBindingsByDefault>True</AvaloniaUseCompiledBindingsByDefault>
Expand Down
9 changes: 7 additions & 2 deletions src/MetahookInstallerAvalonia.Desktop/Program.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
using Avalonia;
using Optris.Icons.Avalonia;
using Optris.Icons.Avalonia.MaterialDesign;
using ReactiveUI.Avalonia;
using System;
using System.Runtime.Versioning;
Expand All @@ -17,9 +19,12 @@ public static void Main(string[] args) => BuildAvaloniaApp()

// Avalonia configuration, don't remove; also used by visual designer.
public static AppBuilder BuildAvaloniaApp()
=> AppBuilder.Configure<App>()
{
IconProvider.Current.Register<MaterialDesignIconProvider>();
return AppBuilder.Configure<App>()
.UsePlatformDetect()
.WithInterFont()
.LogToTrace()
.UseReactiveUI();
.UseReactiveUI(_ => { });
}
}
Original file line number Diff line number Diff line change
@@ -1,21 +1,15 @@
<?xml version="1.0" encoding="utf-8"?>
<!-- https://go.microsoft.com/fwlink/?LinkID=208121. -->
<!--AOT/trimming settings live in the csproj so they apply to every publish, profile or not.-->
<Project>
<PropertyGroup>
<Configuration>Release</Configuration>
<Platform>Any CPU</Platform>
<PublishDir>bin\Release\net8.0\publish\win-x64\</PublishDir>
<PublishDir>bin\Release\net10.0\publish\win-x64\</PublishDir>
<PublishProtocol>FileSystem</PublishProtocol>
<_TargetId>Folder</_TargetId>
<TrimMode>full</TrimMode>
<IlcTrimMetadata>true</IlcTrimMetadata>
<IlcGenerateStackTraceData>false</IlcGenerateStackTraceData>
<TargetFramework>net8.0</TargetFramework>
<TargetFramework>net10.0</TargetFramework>
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
<SelfContained>true</SelfContained>
<PublishAot>true</PublishAot>
<PublishTrimmed>true</PublishTrimmed>
<IsAotCompatible>true</IsAotCompatible>
<StripSymbols>true</StripSymbols>
</PropertyGroup>
</Project>
</Project>
Loading