diff --git a/Agent/Services/UpdaterMac.cs b/Agent/Services/UpdaterMac.cs index 7f295d47..38e803c0 100644 --- a/Agent/Services/UpdaterMac.cs +++ b/Agent/Services/UpdaterMac.cs @@ -16,6 +16,7 @@ namespace Remotely.Agent.Services { public class UpdaterMac : IUpdater { + private readonly string _achitecture = RuntimeInformation.OSArchitecture.ToString().ToLower(); private readonly SemaphoreSlim _checkForUpdatesLock = new SemaphoreSlim(1, 1); private readonly ConfigService _configService; private readonly IWebClientEx _webClientEx; @@ -64,7 +65,7 @@ namespace Remotely.Agent.Services var connectionInfo = _configService.GetConnectionInfo(); var serverUrl = _configService.GetConnectionInfo().Host; - var fileUrl = serverUrl + $"/Content/Remotely-MacOS-x64.zip"; + var fileUrl = serverUrl + $"/Content/Remotely-MacOS-{_achitecture}.zip"; var lastEtag = string.Empty; @@ -128,11 +129,11 @@ namespace Remotely.Agent.Services var installerPath = Path.Combine(Path.GetTempPath(), "RemotelyUpdate.sh"); await _webClientEx.DownloadFileTaskAsync( - serverUrl + $"/API/ClientDownloads/{connectionInfo.OrganizationID}/MacOSInstaller-x64", + serverUrl + $"/API/ClientDownloads/{connectionInfo.OrganizationID}/MacOSInstaller-{_achitecture}", installerPath); await _webClientEx.DownloadFileTaskAsync( - serverUrl + $"/API/AgentUpdate/DownloadPackage/macos-x64/{downloadId}", + serverUrl + $"/API/AgentUpdate/DownloadPackage/macos-{_achitecture}/{downloadId}", zipPath); (await WebRequest.CreateHttp(serverUrl + $"/api/AgentUpdate/ClearDownload/{downloadId}").GetResponseAsync()).Dispose(); diff --git a/Server/API/ClientDownloadsController.cs b/Server/API/ClientDownloadsController.cs index adee4185..86e51f6f 100644 --- a/Server/API/ClientDownloadsController.cs +++ b/Server/API/ClientDownloadsController.cs @@ -55,6 +55,11 @@ namespace Remotely.Server.API var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "MacOS-x64", "Remotely_Desktop"); return await GetDesktopFile(filePath); } + case "MacOS-arm64": + { + var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "MacOS-arm64", "Remotely_Desktop"); + return await GetDesktopFile(filePath); + } default: return NotFound(); } @@ -86,6 +91,11 @@ namespace Remotely.Server.API var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "MacOS-x64", "Remotely_Desktop"); return await GetDesktopFile(filePath); } + case "MacOS-arm64": + { + var filePath = Path.Combine(_hostEnv.WebRootPath, "Content", "MacOS-arm64", "Remotely_Desktop"); + return await GetDesktopFile(filePath); + } default: return NotFound(); } @@ -186,6 +196,12 @@ namespace Remotely.Server.API { var fileName = "Install-MacOS-x64.sh"; + return await GetBashInstaller(fileName, organizationId); + } + case "MacOSInstaller-arm64": + { + var fileName = "Install-MacOS-arm64.sh"; + return await GetBashInstaller(fileName, organizationId); } default: diff --git a/Server/Pages/Downloads.razor b/Server/Pages/Downloads.razor index 61cc8208..b6f31d86 100644 --- a/Server/Pages/Downloads.razor +++ b/Server/Pages/Downloads.razor @@ -35,7 +35,8 @@
- macOS Executable + macOS x64 Executable + macOS arm64 Executable
- macOS ZSH Installer
+ macOS x64 Bash Installer
- macOS Files Only
+ macOS x64 Files Only
+
+ macOS arm64 Bash Installer
+
+ macOS arm64 Files Only