From a18167a0a4bb830d66f3169cedd92ed942688ff4 Mon Sep 17 00:00:00 2001 From: Jared Goodwin Date: Sun, 22 Dec 2019 14:43:06 -0800 Subject: [PATCH] Make Linux GUI single file. --- .gitignore | 1 + Desktop.Linux/Desktop.Linux.csproj | 2 ++ Server/Pages/Agents.cshtml | 2 +- Server/Startup.cs | 1 + Utilities/Publish.ps1 | 9 ++------- 5 files changed, 7 insertions(+), 8 deletions(-) diff --git a/.gitignore b/.gitignore index f78e1470..aa0e085c 100644 --- a/.gitignore +++ b/.gitignore @@ -274,3 +274,4 @@ __pycache__/ /Server/wwwroot/scripts/**/*.map /Server/Server.db-shm /Server/Server.db-wal +/Server/wwwroot/Downloads/Remotely_Desktop diff --git a/Desktop.Linux/Desktop.Linux.csproj b/Desktop.Linux/Desktop.Linux.csproj index 53b5bee8..efc3e6cc 100644 --- a/Desktop.Linux/Desktop.Linux.csproj +++ b/Desktop.Linux/Desktop.Linux.csproj @@ -6,6 +6,8 @@ Remotely_Desktop Remotely.Desktop.Linux AnyCPU;x64;x86 + true + linux-x64 diff --git a/Server/Pages/Agents.cshtml b/Server/Pages/Agents.cshtml index 45a7ebb9..2ad5bc35 100644 --- a/Server/Pages/Agents.cshtml +++ b/Server/Pages/Agents.cshtml @@ -30,7 +30,7 @@

Download:
- Linux Zipped + Linux Executable

diff --git a/Server/Startup.cs b/Server/Startup.cs index 0f8a8a24..4d405abb 100644 --- a/Server/Startup.cs +++ b/Server/Startup.cs @@ -259,6 +259,7 @@ namespace Remotely.Server app.UseStaticFiles(new StaticFileOptions() { FileProvider = new PhysicalFileProvider(Path.Combine(Directory.GetCurrentDirectory(), "wwwroot", "Downloads")), + ServeUnknownFileTypes = true, RequestPath = new PathString("/Downloads"), ContentTypeProvider = provider, DefaultContentType = "application/octet-stream" diff --git a/Utilities/Publish.ps1 b/Utilities/Publish.ps1 index e0ce0c84..ca6041c8 100644 --- a/Utilities/Publish.ps1 +++ b/Utilities/Publish.ps1 @@ -129,12 +129,7 @@ dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runti # Publish Linux GUI App $PublishDir = "$Root\Desktop.Linux\bin\Release\netcoreapp3.1\linux-x64\publish\" dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --configuration Release --output "$PublishDir" "$Root\Desktop.Linux\" -# Compress Linux GUI App -Compress-Archive -Path "$PublishDir\*" -DestinationPath "$PublishDir\Remotely_Desktop.Linux.zip" -CompressionLevel Optimal -Force -while ((Test-Path -Path "$PublishDir\Remotely_Desktop.Linux.zip") -eq $false){ - Start-Sleep -Seconds 1 -} -Move-Item -Path "$PublishDir\Remotely_Desktop.Linux.zip" -Destination "$Root\Server\wwwroot\Downloads\Remotely_Desktop.Linux.zip" -Force +Move-Item -Path "$PublishDir\Remotely_Desktop" -Destination "$Root\Server\wwwroot\Downloads\Remotely_Desktop" -Force # Build .NET Framework ScreenCaster (32-bit) @@ -153,7 +148,7 @@ Get-ChildItem -Path "$Root\ScreenCast.Win\bin\x64\Release\" -Exclude "*.xml" | C # Build Windows GUI App &"$MSBuildPath" "$Root\Desktop.Win" /t:Build /p:Configuration=Release /p:Platform=AnyCPU -Move-Item -Path "$Root\Desktop.Win\bin\Release\Remotely_Desktop.exe" -Destination "$Root\Server\wwwroot\Downloads\Remotely_Desktop.exe" +Move-Item -Path "$Root\Desktop.Win\bin\Release\Remotely_Desktop.exe" -Destination "$Root\Server\wwwroot\Downloads\Remotely_Desktop.exe" -Force if ($SignAssemblies) { &"$Root\Utilities\signtool.exe" sign /f "$CertificatePath" /p $CertificatePassword /t http://timestamp.digicert.com "$Root\Server\wwwroot\Downloads\Remotely_Desktop.exe" }