Skip to content

Commit

Permalink
update to .net 5.0.x and Avalonia 0.10.7
Browse files Browse the repository at this point in the history
  • Loading branch information
Yatao Li committed Sep 13, 2021
1 parent 27a28a2 commit dd66c8e
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 19 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ Cross platform Neovim front-end UI, built with [F#](https://fsharp.org/) + [Aval
- Arch Linux: [Install via AUR](https://aur.archlinux.org/packages/fvim/)
- RPM-based distributions: `rpm -ivh fvim_package_name.rpm`
- Fedora: `dnf install fvim_package_name.rpm`
- Compile from Source (having dotnet-sdk-3.1.404+ installed):
- Compile from Source (having dotnet-sdk-5.0.x installed):
```
git clone https://github.com/yatli/fvim && cd fvim && dotnet publish -f netcoreapp3.1 -c Release -r linux-x64 --self-contained
git clone https://github.com/yatli/fvim && cd fvim && dotnet publish -f net5.0 -c Release -r linux-x64 --self-contained
```
- Note, currently FVim will treat all keyboards as en-US so characters and symbols are mapped incorrectly if you use a non en-US layout. [The issue is tracked here](https://github.com/yatli/fvim/issues/36).

Expand Down Expand Up @@ -82,7 +82,7 @@ Detaching a window into an external OS window with `Ctrl-w ge`:
Detach as many and span them over your monitors!

### Building from source
We're now targeting `netcoreapp3.1` so make sure to install the latest preview SDK from the [.NET site](https://dotnet.microsoft.com/download/dotnet-core/3.1).
We're now targeting `net5.0` so make sure to install the latest preview SDK from the [.NET site](https://dotnet.microsoft.com/download/dotnet/5.0).
We're actively tracking the head of `Avalonia`, and fetch the nightly packages from myget (see `NuGet.config`).

Then, simply:
Expand Down
14 changes: 7 additions & 7 deletions fvim.fsproj
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<Project Sdk="Microsoft.NET.Sdk">

<PropertyGroup>
<TargetFramework>netcoreapp3.1</TargetFramework>
<TargetFramework>net5.0</TargetFramework>
<AssemblyName>FVim</AssemblyName>
<Prefer32Bit>false</Prefer32Bit>
<ApplicationIcon>Assets\fvim.ico</ApplicationIcon>
Expand Down Expand Up @@ -78,14 +78,14 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="Avalonia" Version="0.10.6" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.6" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.6" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.6" />
<PackageReference Include="Avalonia.Svg" Version="0.10.6.3" />
<PackageReference Include="Avalonia" Version="0.10.7" />
<PackageReference Include="Avalonia.Desktop" Version="0.10.7" />
<PackageReference Include="Avalonia.ReactiveUI" Version="0.10.7" />
<PackageReference Include="Avalonia.Diagnostics" Version="0.10.7" />
<PackageReference Include="Avalonia.Svg" Version="0.10.7.1" />

<PackageReference Include="FSharp.Control.Reactive" Version="5.0.2" />
<PackageReference Include="FSharp.Data" Version="4.1.1" />
<PackageReference Include="FSharp.Data" Version="4.2.2" />
<PackageReference Include="FSharp.Span.Utils" Version="1.1.3353.13900" />
<PackageReference Include="FSharp.SystemTextJson" Version="0.17.4" />
<PackageReference Include="MessagePack" Version="2.3.75" />
Expand Down
12 changes: 6 additions & 6 deletions pack.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,17 @@ Remove-Item -Recurse -Force bin\ -ErrorAction SilentlyContinue
Remove-Item publish\*

foreach($i in $plat) {
dotnet publish -f netcoreapp3.1 -c Release --self-contained -r $i fvim.fsproj
dotnet publish -f net5.0 -c Release --self-contained -r $i fvim.fsproj
if ($i -eq "win-x64") {
# replace the coreclr hosting exe with an icon-patched one
Copy-Item lib/fvim-win10.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
Copy-Item lib/fvim-win10.exe bin/Release/net5.0/$i/publish/FVim.exe
# Avalonia 0.10.0-preview6 fix: manually copy ANGLE from win7-x64
Copy-Item ~/.nuget/packages/avalonia.angle.windows.natives/2.1.0.2020091801/runtimes/win7-x64/native/av_libglesv2.dll bin/Release/netcoreapp3.1/$i/publish/
Copy-Item ~/.nuget/packages/avalonia.angle.windows.natives/2.1.0.2020091801/runtimes/win7-x64/native/av_libglesv2.dll bin/Release/net5.0/$i/publish/
} elseif ($i -eq "win7-x64") {
Copy-Item lib/fvim-win7.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
Copy-Item lib/fvim-win7.exe bin/Release/net5.0/$i/publish/FVim.exe
} elseif ($i -eq "win-arm") {
Copy-Item lib/fvim-win10-arm64.exe bin/Release/netcoreapp3.1/$i/publish/FVim.exe
Copy-Item lib/fvim-win10-arm64.exe bin/Release/net5.0/$i/publish/FVim.exe
}
Compress-Archive -Path bin/Release/netcoreapp3.1/$i/publish/* -DestinationPath publish/fvim-$i.zip -Force
Compress-Archive -Path bin/Release/net5.0/$i/publish/* -DestinationPath publish/fvim-$i.zip -Force
}

4 changes: 2 additions & 2 deletions pack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ rm -ir publish/*
PKG_TFM=$1
VERSION=$(git describe)
VERSION=${VERSION:1}
PKG_ROOT="bin/Release/netcoreapp3.1/$PKG_TFM/publish"
dotnet publish -f netcoreapp3.1 -c Release --self-contained -r $PKG_TFM fvim.fsproj
PKG_ROOT="bin/Release/net5.0/$PKG_TFM/publish"
dotnet publish -f net5.0 -c Release --self-contained -r $PKG_TFM fvim.fsproj

function pack-linux-x64()
{
Expand Down
2 changes: 1 addition & 1 deletion update.ps1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
Stop-Process -Name "fvim"
dotnet build -c Release fvim.fsproj
cp bin/Release/netcoreapp3.1/FVim* C:/tools/fvim/
cp bin/Release/net5.0/FVim* C:/tools/fvim/
cp lib/fvim-win10.exe C:/tools/fvim/FVim.exe
fvim

0 comments on commit dd66c8e

Please sign in to comment.