diff --git a/Knossos.NET/Assets/utils/linux-riscv64/7z.License.txt b/Knossos.NET/Assets/utils/linux-riscv64/7z.License.txt
new file mode 100644
index 00000000..b48ae526
--- /dev/null
+++ b/Knossos.NET/Assets/utils/linux-riscv64/7z.License.txt
@@ -0,0 +1,88 @@
+ 7-Zip
+ ~~~~~
+ License for use and distribution
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+ 7-Zip Copyright (C) 1999-2022 Igor Pavlov.
+
+ The licenses for 7zz file are:
+
+ - The "GNU LGPL" as main license for most of the code
+ - The "GNU LGPL" with "unRAR license restriction" for some code
+ - The "BSD 3-clause License" for some code
+
+ Redistributions in binary form must reproduce related license information from this file.
+
+ Note:
+ You can use 7-Zip on any computer, including a computer in a commercial
+ organization. You don't need to register or pay for 7-Zip.
+
+
+ GNU LGPL information
+ --------------------
+
+ This library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ This library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You can receive a copy of the GNU Lesser General Public License from
+ http://www.gnu.org/
+
+
+
+
+ BSD 3-clause License
+ --------------------
+
+ The "BSD 3-clause License" is used for the code in 7z.dll that implements LZFSE data decompression.
+ That code was derived from the code in the "LZFSE compression library" developed by Apple Inc,
+ that also uses the "BSD 3-clause License":
+
+ ----
+ Copyright (c) 2015-2016, Apple Inc. All rights reserved.
+
+ Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
+
+ 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
+
+ 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer
+ in the documentation and/or other materials provided with the distribution.
+
+ 3. Neither the name of the copyright holder(s) nor the names of any contributors may be used to endorse or promote products derived
+ from this software without specific prior written permission.
+
+ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
+ COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+ (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+ HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
+ ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ ----
+
+
+
+
+ unRAR license restriction
+ -------------------------
+
+ The decompression engine for RAR archives was developed using source
+ code of unRAR program.
+ All copyrights to original unRAR code are owned by Alexander Roshal.
+
+ The license for original unRAR code has the following restriction:
+
+ The unRAR sources cannot be used to re-create the RAR compression algorithm,
+ which is proprietary. Distribution of modified unRAR sources in separate form
+ or as a part of other software is permitted, provided that it is clearly
+ stated in the documentation and source comments that the code may
+ not be used to develop a RAR (WinRAR) compatible archiver.
+
+
+ --
+ Igor Pavlov
diff --git a/Knossos.NET/Assets/utils/linux-riscv64/7zzs b/Knossos.NET/Assets/utils/linux-riscv64/7zzs
new file mode 100644
index 00000000..05f66b27
Binary files /dev/null and b/Knossos.NET/Assets/utils/linux-riscv64/7zzs differ
diff --git a/Knossos.NET/Assets/utils/linux-riscv64/innoextract b/Knossos.NET/Assets/utils/linux-riscv64/innoextract
new file mode 100644
index 00000000..6f90a44d
Binary files /dev/null and b/Knossos.NET/Assets/utils/linux-riscv64/innoextract differ
diff --git a/Knossos.NET/Classes/FsoBuild.cs b/Knossos.NET/Classes/FsoBuild.cs
index 6a2c9f52..e8f47eed 100644
--- a/Knossos.NET/Classes/FsoBuild.cs
+++ b/Knossos.NET/Classes/FsoBuild.cs
@@ -32,6 +32,8 @@ public enum FsoExecArch
x64_avx2,
arm32,
arm64,
+ riscv32,
+ riscv64,
other
}
@@ -497,6 +499,16 @@ public static ModProperties FillProperties(string environment)
properties.arm32 = true;
return properties;
}
+ if (environment.ToLower().Contains("riscv64"))
+ {
+ properties.riscv64 = true;
+ return properties;
+ }
+ if (environment.ToLower().Contains("riscv32"))
+ {
+ properties.riscv32 = true;
+ return properties;
+ }
if (!environment.ToLower().Contains("avx"))
{
properties.sse2 = true;
@@ -554,6 +566,14 @@ public static bool IsEnviromentStringValidInstall(string? enviroment)
{
return true;
}
+ if (enviroment.ToLower().Contains("riscv64") && KnUtils.CpuArch == "RiscV64")
+ {
+ return true;
+ }
+ if (enviroment.ToLower().Contains("riscv32") && KnUtils.CpuArch == "RiscV32")
+ {
+ return true;
+ }
if (KnUtils.CpuArch == "X86" && !enviroment.ToLower().Contains("x86_64") && !enviroment.ToLower().Contains("arm64") && !enviroment.ToLower().Contains("arm32"))
{
return true;
@@ -614,6 +634,12 @@ public static FsoExecArch GetExecArch(ModProperties? properties)
if (properties.arm64)
return FsoExecArch.arm64;
+ if (properties.riscv32)
+ return FsoExecArch.riscv32;
+
+ if (properties.riscv64)
+ return FsoExecArch.riscv64;
+
if (properties.x64)
{
if (properties.avx2)
@@ -747,6 +773,8 @@ public static string GetEnviromentString(FsoExecArch arch, FsoExecEnvironment os
case FsoExecArch.x64_avx2: env += " && x86_64 && avx2"; break;
case FsoExecArch.arm32: env += " && arm32"; break;
case FsoExecArch.arm64: env += " && arm64"; break;
+ case FsoExecArch.riscv32: env += " && riscv32"; break;
+ case FsoExecArch.riscv64: env += " && riscv64"; break;
}
return env;
@@ -851,6 +879,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x64_avx:
@@ -867,6 +899,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x64:
@@ -885,6 +921,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86_avx2:
@@ -902,6 +942,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86_avx:
@@ -919,6 +963,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86:
@@ -940,6 +988,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.arm64:
@@ -955,6 +1007,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.arm32:
@@ -970,6 +1026,48 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Armv6":
score += 100;
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
+ }
+ break;
+ case FsoExecArch.riscv32:
+ switch (KnUtils.CpuArch)
+ {
+ case "X64":
+ break;
+ case "X86":
+ break;
+ case "RiscV64":
+ break;
+ case "RiscV32":
+ score += 100;
+ break;
+ case "Arm64":
+ break;
+ case "Arm":
+ case "Armv6":
+ break;
+ }
+ break;
+ case FsoExecArch.riscv64:
+ switch (KnUtils.CpuArch)
+ {
+ case "X64":
+ break;
+ case "X86":
+ break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ score += 100;
+ break;
+ case "Arm64":
+ break;
+ case "Arm":
+ case "Armv6":
+ break;
}
break;
default:
@@ -995,6 +1093,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x64_avx:
@@ -1010,6 +1112,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x64:
@@ -1025,6 +1131,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86_avx2:
@@ -1040,6 +1150,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86_avx:
@@ -1055,6 +1169,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.x86:
@@ -1070,6 +1188,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.arm64:
@@ -1085,6 +1207,10 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Arm":
case "Armv6":
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
}
break;
case FsoExecArch.arm32:
@@ -1100,6 +1226,48 @@ public static int DetermineScoreFromArch(FsoExecArch arch, bool checkForceSSE2 =
case "Armv6":
score += 100;
break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ break;
+ }
+ break;
+ case FsoExecArch.riscv32:
+ switch (KnUtils.CpuArch)
+ {
+ case "X64":
+ break;
+ case "X86":
+ break;
+ case "Arm64":
+ break;
+ case "Arm":
+ case "Armv6":
+ break;
+ case "RiscV32":
+ score += 100;
+ break;
+ case "RiscV64":
+ break;
+ }
+ break;
+ case FsoExecArch.riscv64:
+ switch (KnUtils.CpuArch)
+ {
+ case "X64":
+ break;
+ case "X86":
+ break;
+ case "Arm64":
+ break;
+ case "Arm":
+ case "Armv6":
+ break;
+ case "RiscV32":
+ break;
+ case "RiscV64":
+ score += 100;
+ break;
}
break;
default:
diff --git a/Knossos.NET/Classes/KnUtils.cs b/Knossos.NET/Classes/KnUtils.cs
index bcfa2777..5be60f95 100644
--- a/Knossos.NET/Classes/KnUtils.cs
+++ b/Knossos.NET/Classes/KnUtils.cs
@@ -58,6 +58,7 @@ static KnUtils()
private static readonly bool isLinux = RuntimeInformation.IsOSPlatform(OSPlatform.Linux);
private static readonly bool isMacOS = RuntimeInformation.IsOSPlatform(OSPlatform.OSX);
private static readonly bool isAppImage = isLinux && !string.IsNullOrEmpty(Environment.GetEnvironmentVariable("APPIMAGE"));
+ private static readonly string cpuArch = RuntimeInformation.OSArchitecture.ToString();
private static readonly bool cpuAVX = Avx.IsSupported;
private static readonly bool cpuAVX2 = Avx2.IsSupported;
private static string fsoPrefPath = string.Empty;
@@ -66,6 +67,16 @@ static KnUtils()
public static bool IsWindows => isWindows;
public static bool IsLinux => isLinux;
public static bool IsMacOS => isMacOS;
+ ///
+ /// Possible Values:
+ /// Arm //A 32-bit ARM processor architecture.
+ /// Armv6 //A 32-bit ARMv6 processor architecture.
+ /// Arm64 //A 64-bit ARM processor architecture.
+ /// X64 //An Intel-based 64-bit processor architecture.
+ /// X86 //An Intel-based 32-bit processor architecture.
+ /// RiscV64 //A 64 bits RISC-V processor
+ /// https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-9.0
+ ///
public static string CpuArch => cpuArch;
public static bool CpuAVX => cpuAVX;
public static bool CpuAVX2 => cpuAVX2;
@@ -95,17 +106,6 @@ public static string? KnetFolderPath
}
}
- ///
- /// Possible Values:
- /// Arm //A 32-bit ARM processor architecture.
- /// Armv6 //A 32-bit ARMv6 processor architecture.
- /// Arm64 //A 64-bit ARM processor architecture.
- /// X64 //An Intel-based 64-bit processor architecture.
- /// X86 //An Intel-based 32-bit processor architecture.
- /// https://learn.microsoft.com/en-us/dotnet/api/system.runtime.interopservices.architecture?view=net-6.0
- ///
- private static readonly string cpuArch = RuntimeInformation.OSArchitecture.ToString();
-
///
/// The full path to KNET data folder
///
diff --git a/Knossos.NET/Classes/Knossos.cs b/Knossos.NET/Classes/Knossos.cs
index 9ec507c3..ee048ae7 100644
--- a/Knossos.NET/Classes/Knossos.cs
+++ b/Knossos.NET/Classes/Knossos.cs
@@ -285,6 +285,11 @@ private static async Task CheckKnetUpdates()
releaseAsset = a;
break;
}
+ if ((KnUtils.CpuArch.ToLower() == "riscv32" && a.name.EndsWith("riscv32.AppImage")) || (KnUtils.CpuArch.ToLower() == "riscv64" && a.name.EndsWith("riscv64.AppImage")))
+ {
+ releaseAsset = a;
+ break;
+ }
}
}
else if (KnUtils.WasInstallerUsed())
diff --git a/Knossos.NET/Classes/SevenZipConsoleWrapper.cs b/Knossos.NET/Classes/SevenZipConsoleWrapper.cs
index 0712045f..f91e73c6 100644
--- a/Knossos.NET/Classes/SevenZipConsoleWrapper.cs
+++ b/Knossos.NET/Classes/SevenZipConsoleWrapper.cs
@@ -245,6 +245,24 @@ private string UnpackExec()
}
}
}
+ if (KnUtils.CpuArch == "RiscV64")
+ {
+ execPath += "7zzs";
+ if (!File.Exists(execPath) || new FileInfo(execPath).Length == 0)
+ {
+ using (var fileStream = File.Create(execPath))
+ {
+ AssetLoader.Open(new Uri("avares://Knossos.NET/Assets/utils/linux-riscv64/7zzs")).CopyTo(fileStream);
+ fileStream.Close();
+ KnUtils.Chmod(execPath, "+x");
+ }
+ using (var fileStream = File.Create(KnUtils.GetKnossosDataFolderPath() + Path.DirectorySeparatorChar + "7z.License.txt"))
+ {
+ AssetLoader.Open(new Uri("avares://Knossos.NET/Assets/utils/linux-riscv64/7z.License.txt")).CopyTo(fileStream);
+ fileStream.Close();
+ }
+ }
+ }
}
else
{
diff --git a/Knossos.NET/Classes/Tool.cs b/Knossos.NET/Classes/Tool.cs
index c45f8688..6402625b 100644
--- a/Knossos.NET/Classes/Tool.cs
+++ b/Knossos.NET/Classes/Tool.cs
@@ -227,7 +227,12 @@ private void SetPkgScores()
{
foreach(var arch in archs)
{
- if(arch == "x64" && KnUtils.CpuArch == "X64" || arch == "x86" && KnUtils.CpuArch == "X86" || arch == "arm64" && KnUtils.CpuArch == "Arm64")
+ if(arch == "x64" && KnUtils.CpuArch == "X64" ||
+ arch == "x86" && KnUtils.CpuArch == "X86" ||
+ arch == "arm64" && KnUtils.CpuArch == "Arm64" ||
+ arch == "arm32" && KnUtils.CpuArch != "Arm64" && (KnUtils.CpuArch == "Arm" || KnUtils.CpuArch == "Armv6") ||
+ arch == "riscv64" && KnUtils.CpuArch == "RiscV64" ||
+ arch == "riscv32" && KnUtils.CpuArch == "RiscV32")
{
pkg.score = 100;
continue;
@@ -239,12 +244,12 @@ private void SetPkgScores()
pkg.score = 50;
continue;
}
- if (arch == "x86" && KnUtils.CpuArch == "Arm64")
+ if (arch == "x86" && (KnUtils.CpuArch == "Arm64" || KnUtils.CpuArch == "RiscV64"))
{
pkg.score = 20;
continue;
}
- if (arch == "x64" && KnUtils.CpuArch == "Arm64")
+ if (arch == "x64" && (KnUtils.CpuArch == "Arm64" || KnUtils.CpuArch == "RiscV64"))
{
pkg.score = 70;
continue;
diff --git a/Knossos.NET/Classes/Wine.cs b/Knossos.NET/Classes/Wine.cs
index b78d9d8e..23283deb 100644
--- a/Knossos.NET/Classes/Wine.cs
+++ b/Knossos.NET/Classes/Wine.cs
@@ -148,11 +148,13 @@ private static async Task SetWinePrefixFred2(string wineArch)
case FsoExecArch.x86_avx:
case FsoExecArch.x86_avx2:
case FsoExecArch.arm32:
+ case FsoExecArch.riscv32:
return "win32";
case FsoExecArch.x64:
case FsoExecArch.x64_avx:
case FsoExecArch.x64_avx2:
case FsoExecArch.arm64:
+ case FsoExecArch.riscv64:
return "win64";
default:
return null;
diff --git a/Knossos.NET/Knossos.NET.csproj b/Knossos.NET/Knossos.NET.csproj
index cec9d8d6..d52930ff 100644
--- a/Knossos.NET/Knossos.NET.csproj
+++ b/Knossos.NET/Knossos.NET.csproj
@@ -50,6 +50,9 @@
+
+
+
diff --git a/Knossos.NET/Models/Mod.cs b/Knossos.NET/Models/Mod.cs
index 77c24543..bcbdffbf 100644
--- a/Knossos.NET/Models/Mod.cs
+++ b/Knossos.NET/Models/Mod.cs
@@ -1213,7 +1213,9 @@ public class ModProperties
/* Knossos.NET added */
public bool arm64 { get; set; }
- public bool arm32 { get; set; }
+ public bool arm32 { get; set; }
+ public bool riscv32 { get; set; }
+ public bool riscv64 { get; set; }
public bool other { get; set; }
}
}
diff --git a/Knossos.NET/ViewModels/Templates/FsoBuildItemViewModel.cs b/Knossos.NET/ViewModels/Templates/FsoBuildItemViewModel.cs
index 52bafab4..1da946ec 100644
--- a/Knossos.NET/ViewModels/Templates/FsoBuildItemViewModel.cs
+++ b/Knossos.NET/ViewModels/Templates/FsoBuildItemViewModel.cs
@@ -91,6 +91,8 @@ private void UpdateDisplayData(FsoBuild build, bool skipInstalledCheck = false)
case FsoExecArch.x64_avx: if (!CpuArch.Contains("X64")) CpuArch += "X64 "; if (!CpuArch.Contains("AVX ")) CpuArch += "AVX "; break;
case FsoExecArch.arm32: if (!CpuArch.Contains("ARM32")) CpuArch += "ARM32 "; break;
case FsoExecArch.arm64: if (!CpuArch.Contains("ARM64")) CpuArch += "ARM64 "; break;
+ case FsoExecArch.riscv32: if (!CpuArch.Contains("RISCV32")) CpuArch += "RISCV32 "; break;
+ case FsoExecArch.riscv64: if (!CpuArch.Contains("RISCV64")) CpuArch += "RISCV64 "; break;
}
if (!BuildType.Split(" ").Contains(exe.type.ToString()))
diff --git a/Knossos.NET/ViewModels/Windows/AddUserBuildViewModel.cs b/Knossos.NET/ViewModels/Windows/AddUserBuildViewModel.cs
index 4293e84b..1bbf5d74 100644
--- a/Knossos.NET/ViewModels/Windows/AddUserBuildViewModel.cs
+++ b/Knossos.NET/ViewModels/Windows/AddUserBuildViewModel.cs
@@ -51,6 +51,10 @@ public partial class AddUserBuildViewModel : ViewModelBase
[ObservableProperty]
internal bool arm64 = false;
[ObservableProperty]
+ internal bool riscv32 = false;
+ [ObservableProperty]
+ internal bool riscv64 = false;
+ [ObservableProperty]
internal bool modCreated = false;
[ObservableProperty]
internal int copyProgress = 0;
@@ -194,6 +198,14 @@ private void ParseArch(string filename)
{
Arm64 = true;
}
+ if (filename.ToLower().Contains("riscv64"))
+ {
+ Riscv64 = true;
+ }
+ if (filename.ToLower().Contains("riscv32"))
+ {
+ Riscv32 = true;
+ }
}
private void ParseVersion(string filename)
@@ -383,6 +395,14 @@ internal async void AddCommand()
{
package.environment += " && arm64";
}
+ if (Riscv32)
+ {
+ package.environment += " && riscv32";
+ }
+ if (Riscv64)
+ {
+ package.environment += " && riscv64";
+ }
package.folder = buildId;
package.isVp = false;
package.executables = new List();
@@ -390,6 +410,8 @@ internal async void AddCommand()
var properties = new ModProperties();
properties.arm64 = Arm64;
properties.arm32 = Arm32;
+ properties.riscv32 = Riscv32;
+ properties.riscv64 = Riscv64;
if (!Arm32 && !Arm64)
{
if (!AVX && !AVX2)
@@ -470,7 +492,7 @@ internal async void AddCommand()
private bool Verify()
{
- if(!X86 && !X64 && !AVX && !Arm32 && !Arm64)
+ if(!X86 && !X64 && !AVX && !Arm32 && !Arm64 && !Riscv32 && !Riscv64)
{
if(MainWindow.instance != null)
{
diff --git a/Knossos.NET/ViewModels/Windows/Fs2InstallerViewModel.cs b/Knossos.NET/ViewModels/Windows/Fs2InstallerViewModel.cs
index fb3e47bb..e8d2c2a6 100644
--- a/Knossos.NET/ViewModels/Windows/Fs2InstallerViewModel.cs
+++ b/Knossos.NET/ViewModels/Windows/Fs2InstallerViewModel.cs
@@ -57,7 +57,7 @@ public partial class Fs2InstallerViewModel : ViewModelBase
public Fs2InstallerViewModel()
{
- if(KnUtils.IsWindows || KnUtils.IsMacOS || KnUtils.IsLinux && ( KnUtils.CpuArch == "X64" || KnUtils.CpuArch == "X86" || KnUtils.CpuArch == "Arm64"))
+ if(KnUtils.IsWindows || KnUtils.IsMacOS || KnUtils.IsLinux && ( KnUtils.CpuArch == "X64" || KnUtils.CpuArch == "X86" || KnUtils.CpuArch == "Arm64" || KnUtils.CpuArch == "RiscV64"))
{
InnoExtractIsAvailable = true;
}
@@ -102,6 +102,10 @@ internal async void InstallFS2Command()
{
innoPath += "innoextract.arm64";
}
+ if (KnUtils.CpuArch == "RiscV64")
+ {
+ innoPath += "innoextract.riscv64";
+ }
}
else
{
@@ -382,6 +386,16 @@ internal async void LoadGoGExeCommand()
KnUtils.Chmod(innoPath, "+x");
}
}
+ if (KnUtils.CpuArch == "RiscV64")
+ {
+ innoPath += "innoextract.riscv64";
+ using (var fileStream = File.Create(innoPath))
+ {
+ AssetLoader.Open(new Uri("avares://Knossos.NET/Assets/utils/linux-riscv64/innoextract.riscv64")).CopyTo(fileStream);
+ fileStream.Close();
+ KnUtils.Chmod(innoPath, "+x");
+ }
+ }
}
else
{
diff --git a/Knossos.NET/Views/Windows/AddUserBuildView.axaml b/Knossos.NET/Views/Windows/AddUserBuildView.axaml
index b5fcc422..c3a3d367 100644
--- a/Knossos.NET/Views/Windows/AddUserBuildView.axaml
+++ b/Knossos.NET/Views/Windows/AddUserBuildView.axaml
@@ -33,6 +33,8 @@
AVX2ARM32ARM64
+ RISCV32
+ RISCV64