mirror of
https://github.com/immense/Remotely.git
synced 2025-10-26 11:27:15 +00:00
Merge pull request #67 from Jay-Rad/desktop_win_netcore3_migration
.NET Core 3 migration for Windows Desktop applications.
This commit is contained in:
commit
dfdeaea34b
2
.gitignore
vendored
2
.gitignore
vendored
@ -273,3 +273,5 @@ __pycache__/
|
||||
/Server/Server.db-shm
|
||||
/Server/Server.db-wal
|
||||
/Server/wwwroot/Downloads/Remotely_Desktop
|
||||
Server/wwwroot/Downloads/Win-x64/Remotely_Desktop.exe
|
||||
Server/wwwroot/Downloads/Win-x86/Remotely_Desktop.exe
|
||||
|
||||
@ -6,8 +6,6 @@
|
||||
<AssemblyName>Remotely_Desktop</AssemblyName>
|
||||
<RootNamespace>Remotely.Desktop.Linux</RootNamespace>
|
||||
<Platforms>AnyCPU;x64;x86</Platforms>
|
||||
<PublishSingleFile>true</PublishSingleFile>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Folder Include="Models\" />
|
||||
|
||||
17
Desktop.Linux/Properties/PublishProfiles/linux-x64.pubxml
Normal file
17
Desktop.Linux/Properties/PublishProfiles/linux-x64.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Downloads</PublishDir>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,82 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<configuration>
|
||||
<startup>
|
||||
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8" />
|
||||
</startup>
|
||||
<runtime>
|
||||
<assemblyBinding xmlns="urn:schemas-microsoft-com:asm.v1">
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Threading.Tasks.Extensions" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.2.0.1" newVersion="4.2.0.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Newtonsoft.Json" publicKeyToken="30ad4fe6b2a6aeed" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-12.0.0.0" newVersion="12.0.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Buffers" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Runtime.CompilerServices.Unsafe" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.6.0" newVersion="4.0.6.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Numerics.Vectors" publicKeyToken="b03f5f7f11d50a3a" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.1.4.0" newVersion="4.1.4.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Memory" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.1" newVersion="4.0.1.1" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.ValueTuple" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.3.0" newVersion="4.0.3.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.AspNetCore.Http.Features" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Options" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.Logging" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.Extensions.DependencyInjection" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.0.1.0" newVersion="3.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="MessagePack" publicKeyToken="b4a0369545f0a1be" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-1.8.0.0" newVersion="1.8.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Json" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.1.0" newVersion="4.0.1.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="System.Text.Encodings.Web" publicKeyToken="cc7b13ffcd2ddd51" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-4.0.5.0" newVersion="4.0.5.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.AspNetCore.SignalR.Common" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
<dependentAssembly>
|
||||
<assemblyIdentity name="Microsoft.AspNetCore.Connections.Abstractions" publicKeyToken="adb9793829ddae60" culture="neutral" />
|
||||
<bindingRedirect oldVersion="0.0.0.0-3.1.0.0" newVersion="3.1.0.0" />
|
||||
</dependentAssembly>
|
||||
</assemblyBinding>
|
||||
</runtime>
|
||||
</configuration>
|
||||
10
Desktop.Win/AssemblyInfo.cs
Normal file
10
Desktop.Win/AssemblyInfo.cs
Normal file
@ -0,0 +1,10 @@
|
||||
using System.Windows;
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
@ -1,12 +1,13 @@
|
||||
<Window
|
||||
x:Class="Remotely.Desktop.Win.Controls.HostNamePrompt"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Remotely.Desktop.Win.Controls"
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels" x:Name="PromptWindow" x:Class="Remotely.Desktop.Win.Controls.HostNamePrompt"
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels" x:Name="PromptWindow"
|
||||
mc:Ignorable="d"
|
||||
Title="Remotely Host Name" Height="150" Width="350" WindowStartupLocation="CenterOwner" Icon="/Remotely_Desktop;component/favicon.ico">
|
||||
Title="Remotely Host Name" Height="150" Width="350" WindowStartupLocation="CenterOwner" Icon="/Remotely_Icon.png">
|
||||
<Window.DataContext>
|
||||
<ViewModels:HostNamePromptViewModel/>
|
||||
</Window.DataContext>
|
||||
|
||||
@ -1,336 +1,26 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props" Condition="Exists('..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" />
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{486A238C-387B-49C5-A361-B86ACDB2572A}</ProjectGuid>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWPF>true</UseWPF>
|
||||
<RootNamespace>Remotely.Desktop.Win</RootNamespace>
|
||||
<AssemblyName>Remotely_Desktop</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<ProjectTypeGuids>{60dc8134-eba5-43b8-bcc9-bb4bc16c2548};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}</ProjectTypeGuids>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<TargetFrameworkProfile />
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Background</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>false</MapFileExtensions>
|
||||
<SupportUrl>https://lucency.co/Contact</SupportUrl>
|
||||
<ErrorReportUrl>https://lucency.co/Contact</ErrorReportUrl>
|
||||
<ProductName>Remotely Desktop</ProductName>
|
||||
<PublisherName>Translucency Software</PublisherName>
|
||||
<SuiteName>Remotely</SuiteName>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.0</ApplicationVersion>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<CreateDesktopShortcut>true</CreateDesktopShortcut>
|
||||
<PublishWizardCompleted>true</PublishWizardCompleted>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationIcon>favicon.ico</ApplicationIcon>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup />
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DefineConstants>TRACE;DEBUG</DefineConstants>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<SignManifests>false</SignManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ManifestCertificateThumbprint>0A723650D9A0A3D7D0E4A15299984A95177F9DBD</ManifestCertificateThumbprint>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="Costura, Version=4.1.0.0, Culture=neutral, PublicKeyToken=9919ef960d84173d, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Costura.Fody.4.1.0\lib\net40\Costura.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="MessagePack, Version=1.8.0.0, Culture=neutral, PublicKeyToken=b4a0369545f0a1be, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MessagePack.1.8.80\lib\net47\MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Connections.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Features.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.Core.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.Json, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.Json.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.3.1.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Configuration" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Common.4.7.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.4.7.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.4.7.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.4.7.0\lib\net461\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.4.7.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Xml" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xaml">
|
||||
<RequiredTargetFramework>4.0</RequiredTargetFramework>
|
||||
</Reference>
|
||||
<Reference Include="WindowsBase" />
|
||||
<Reference Include="PresentationCore" />
|
||||
<Reference Include="PresentationFramework" />
|
||||
<None Remove="favicon.ico" />
|
||||
<None Remove="Remotely_Icon.png" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ApplicationDefinition Include="App.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</ApplicationDefinition>
|
||||
<Compile Include="Controls\HostNamePrompt.xaml.cs">
|
||||
<DependentUpon>HostNamePrompt.xaml</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Services\Config.cs" />
|
||||
<Compile Include="Services\Executor.cs" />
|
||||
<Compile Include="ViewModels\HostNamePromptViewModel.cs" />
|
||||
<Compile Include="ViewModels\MainWindowViewModel.cs" />
|
||||
<Compile Include="ViewModels\ViewModelBase.cs" />
|
||||
<Page Include="Controls\HostNamePrompt.xaml">
|
||||
<SubType>Designer</SubType>
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
</Page>
|
||||
<Page Include="MainWindow.xaml">
|
||||
<Generator>MSBuild:Compile</Generator>
|
||||
<SubType>Designer</SubType>
|
||||
</Page>
|
||||
<Compile Include="App.xaml.cs">
|
||||
<DependentUpon>App.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="MainWindow.xaml.cs">
|
||||
<DependentUpon>MainWindow.xaml</DependentUpon>
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Properties\AssemblyInfo.cs">
|
||||
<SubType>Code</SubType>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Resources.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DesignTime>True</DesignTime>
|
||||
<DependentUpon>Resources.resx</DependentUpon>
|
||||
</Compile>
|
||||
<Compile Include="Properties\Settings.Designer.cs">
|
||||
<AutoGen>True</AutoGen>
|
||||
<DependentUpon>Settings.settings</DependentUpon>
|
||||
<DesignTimeSharedInput>True</DesignTimeSharedInput>
|
||||
</Compile>
|
||||
<EmbeddedResource Include="Properties\Resources.resx">
|
||||
<Generator>ResXFileCodeGenerator</Generator>
|
||||
<LastGenOutput>Resources.Designer.cs</LastGenOutput>
|
||||
</EmbeddedResource>
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\Settings.settings">
|
||||
<Generator>SettingsSingleFileGenerator</Generator>
|
||||
<LastGenOutput>Settings.Designer.cs</LastGenOutput>
|
||||
</None>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<ProjectReference Include="..\ScreenCast.Win\ScreenCast.Win.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Resource Include="favicon.ico" />
|
||||
<Resource Include="Remotely_Icon.png" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ScreenCast.Core\ScreenCast.Core.csproj">
|
||||
<Project>{b04a1728-2e87-491e-bc7f-f575a1754def}</Project>
|
||||
<Name>ScreenCast.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\ScreenCast.Win\ScreenCast.Win.csproj">
|
||||
<Project>{2dcea1f5-9b64-4edb-9cd0-4d6675d96709}</Project>
|
||||
<Name>ScreenCast.Win</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{3b1b36ae-7a60-4974-a868-1e24894d4149}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.8">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.8 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Resource Include="FodyWeavers.xml" />
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>
|
||||
</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
<Target Name="EnsureNuGetPackageBuildImports" BeforeTargets="PrepareForBuild">
|
||||
<PropertyGroup>
|
||||
<ErrorText>This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}.</ErrorText>
|
||||
</PropertyGroup>
|
||||
<Error Condition="!Exists('..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Costura.Fody.4.1.0\build\Costura.Fody.props'))" />
|
||||
<Error Condition="!Exists('..\packages\Fody.6.0.5\build\Fody.targets')" Text="$([System.String]::Format('$(ErrorText)', '..\packages\Fody.6.0.5\build\Fody.targets'))" />
|
||||
</Target>
|
||||
<Import Project="..\packages\Fody.6.0.5\build\Fody.targets" Condition="Exists('..\packages\Fody.6.0.5\build\Fody.targets')" />
|
||||
|
||||
</Project>
|
||||
@ -1,4 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Weavers xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="FodyWeavers.xsd">
|
||||
<Costura />
|
||||
</Weavers>
|
||||
@ -1,111 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
|
||||
<!-- This file was generated by Fody. Manual changes to this file will be lost when your project is rebuilt. -->
|
||||
<xs:element name="Weavers">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element name="Costura" minOccurs="0" maxOccurs="1">
|
||||
<xs:complexType>
|
||||
<xs:all>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with line breaks</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
<xs:element minOccurs="0" maxOccurs="1" name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with line breaks.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="CreateTemporaryAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>This will copy embedded files to disk before loading them into memory. This is helpful for some scenarios that expected an assembly to be loaded from a physical file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeDebugSymbols" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Controls if .pdbs for reference assemblies are also embedded.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCompression" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Embedded assemblies are compressed by default, and uncompressed when they are loaded. You can turn compression off with this option.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="DisableCleanup" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>As part of Costura, embedded assemblies are no longer included as part of the build. This cleanup can be turned off.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="LoadAtModuleInit" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura by default will load as part of the module initialization. This flag disables that behavior. Make sure you call CosturaUtility.Initialize() somewhere in your code.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IgnoreSatelliteAssemblies" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>Costura will by default use assemblies with a name like 'resources.dll' as a satellite resource and prepend the output path. This flag disables that behavior.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="ExcludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to exclude from the default action of "embed all Copy Local references", delimited with |</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="IncludeAssemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of assembly names to include from the default action of "embed all Copy Local references", delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged32Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 32 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="Unmanaged64Assemblies" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A list of unmanaged 64 bit assembly names to include, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="PreloadOrder" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>The order of preloaded assemblies, delimited with |.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:all>
|
||||
<xs:attribute name="VerifyAssembly" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'true' to run assembly verification (PEVerify) on the target assembly after all weavers have been executed.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="VerifyIgnoreCodes" type="xs:string">
|
||||
<xs:annotation>
|
||||
<xs:documentation>A comma-separated list of error codes that can be safely ignored in assembly verification.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
<xs:attribute name="GenerateXsd" type="xs:boolean">
|
||||
<xs:annotation>
|
||||
<xs:documentation>'false' to turn off automatic generation of the XML Schema file.</xs:documentation>
|
||||
</xs:annotation>
|
||||
</xs:attribute>
|
||||
</xs:complexType>
|
||||
</xs:element>
|
||||
</xs:schema>
|
||||
@ -1,12 +1,16 @@
|
||||
<Window
|
||||
<Window x:Class="Remotely.Desktop.Win.MainWindow"
|
||||
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
|
||||
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
|
||||
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
|
||||
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
|
||||
xmlns:local="clr-namespace:Remotely.Desktop.Win"
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels" x:Class="Remotely.Desktop.Win.MainWindow"
|
||||
xmlns:ViewModels="clr-namespace:Remotely.Desktop.Win.ViewModels"
|
||||
mc:Ignorable="d"
|
||||
Title="Remotely" Height="250" Width="350" MouseLeftButtonDown="Window_MouseLeftButtonDown" WindowStyle="None" ResizeMode="NoResize" Icon="favicon.ico" Loaded="Window_Loaded">
|
||||
Title="Remotely" Height="250" Width="350"
|
||||
WindowStyle="None"
|
||||
ResizeMode="NoResize"
|
||||
MouseLeftButtonDown="Window_MouseLeftButtonDown"
|
||||
Loaded="Window_Loaded" Icon="Remotely_Icon.png" >
|
||||
<Window.Resources>
|
||||
<DrawingBrush x:Key="GearBrush">
|
||||
<DrawingBrush.Drawing>
|
||||
@ -31,7 +35,7 @@
|
||||
<TextBlock Foreground="DeepSkyBlue" FontWeight="Bold" FontSize="20" Margin="0,2,0,0">Remotely</TextBlock>
|
||||
<TextBlock Foreground="White" FontSize="10"><Run Text="Do IT Remotely"/></TextBlock>
|
||||
</StackPanel>
|
||||
<Button Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X"/>
|
||||
<Button Style="{StaticResource TitlebarButton}" Click="CloseButton_Click" Content="X" />
|
||||
<Button Style="{StaticResource TitlebarButton}" Click="MinimizeButton_Click" Content="_"/>
|
||||
</DockPanel>
|
||||
</Border>
|
||||
|
||||
@ -1,57 +0,0 @@
|
||||
using System.Reflection;
|
||||
using System.Resources;
|
||||
using System.Runtime.CompilerServices;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
|
||||
// General Information about an assembly is controlled through the following
|
||||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Remotely Desktop")]
|
||||
[assembly: AssemblyDescription("Desktop client for allowing remote control via the Remotely server.")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("Translucency Software")]
|
||||
[assembly: AssemblyProduct("Remotely Desktop")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2019 Translucency Software")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
// Setting ComVisible to false makes the types in this assembly not visible
|
||||
// to COM components. If you need to access a type in this assembly from
|
||||
// COM, set the ComVisible attribute to true on that type.
|
||||
[assembly: ComVisible(false)]
|
||||
|
||||
//In order to begin building localizable applications, set
|
||||
//<UICulture>CultureYouAreCodingWith</UICulture> in your .csproj file
|
||||
//inside a <PropertyGroup>. For example, if you are using US english
|
||||
//in your source files, set the <UICulture> to en-US. Then uncomment
|
||||
//the NeutralResourceLanguage attribute below. Update the "en-US" in
|
||||
//the line below to match the UICulture setting in the project file.
|
||||
|
||||
//[assembly: NeutralResourcesLanguage("en-US", UltimateResourceFallbackLocation.Satellite)]
|
||||
|
||||
|
||||
[assembly: ThemeInfo(
|
||||
ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located
|
||||
//(used if a resource is not found in the page,
|
||||
// or application resource dictionaries)
|
||||
ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located
|
||||
//(used if a resource is not found in the page,
|
||||
// app, or any theme specific resource dictionaries)
|
||||
)]
|
||||
|
||||
|
||||
// Version information for an assembly consists of the following four values:
|
||||
//
|
||||
// Major Version
|
||||
// Minor Version
|
||||
// Build Number
|
||||
// Revision
|
||||
//
|
||||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.0.0.0")]
|
||||
[assembly: AssemblyFileVersion("1.0.0.0")]
|
||||
[assembly: Guid("0f554d14-3bec-473a-80fc-3a52ff97065e")]
|
||||
|
||||
17
Desktop.Win/Properties/PublishProfiles/win-x64.pubxml
Normal file
17
Desktop.Win/Properties/PublishProfiles/win-x64.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Downloads\Win-x64\</PublishDir>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
17
Desktop.Win/Properties/PublishProfiles/win-x86.pubxml
Normal file
17
Desktop.Win/Properties/PublishProfiles/win-x86.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Server\wwwroot\Downloads\Win-x86\</PublishDir>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
63
Desktop.Win/Properties/Resources.Designer.cs
generated
63
Desktop.Win/Properties/Resources.Designer.cs
generated
@ -1,63 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Remotely.Desktop.Win.Properties {
|
||||
using System;
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// A strongly-typed resource class, for looking up localized strings, etc.
|
||||
/// </summary>
|
||||
// This class was auto-generated by the StronglyTypedResourceBuilder
|
||||
// class via a tool like ResGen or Visual Studio.
|
||||
// To add or remove a member, edit your .ResX file then rerun ResGen
|
||||
// with the /str option, or rebuild your VS project.
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "16.0.0.0")]
|
||||
[global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
internal class Resources {
|
||||
|
||||
private static global::System.Resources.ResourceManager resourceMan;
|
||||
|
||||
private static global::System.Globalization.CultureInfo resourceCulture;
|
||||
|
||||
[global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
|
||||
internal Resources() {
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the cached ResourceManager instance used by this class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Resources.ResourceManager ResourceManager {
|
||||
get {
|
||||
if (object.ReferenceEquals(resourceMan, null)) {
|
||||
global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("Remotely.Desktop.Win.Properties.Resources", typeof(Resources).Assembly);
|
||||
resourceMan = temp;
|
||||
}
|
||||
return resourceMan;
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Overrides the current thread's CurrentUICulture property for all
|
||||
/// resource lookups using this strongly typed resource class.
|
||||
/// </summary>
|
||||
[global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
|
||||
internal static global::System.Globalization.CultureInfo Culture {
|
||||
get {
|
||||
return resourceCulture;
|
||||
}
|
||||
set {
|
||||
resourceCulture = value;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,117 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<root>
|
||||
<!--
|
||||
Microsoft ResX Schema
|
||||
|
||||
Version 2.0
|
||||
|
||||
The primary goals of this format is to allow a simple XML format
|
||||
that is mostly human readable. The generation and parsing of the
|
||||
various data types are done through the TypeConverter classes
|
||||
associated with the data types.
|
||||
|
||||
Example:
|
||||
|
||||
... ado.net/XML headers & schema ...
|
||||
<resheader name="resmimetype">text/microsoft-resx</resheader>
|
||||
<resheader name="version">2.0</resheader>
|
||||
<resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader>
|
||||
<resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader>
|
||||
<data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data>
|
||||
<data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data>
|
||||
<data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64">
|
||||
<value>[base64 mime encoded serialized .NET Framework object]</value>
|
||||
</data>
|
||||
<data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64">
|
||||
<value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value>
|
||||
<comment>This is a comment</comment>
|
||||
</data>
|
||||
|
||||
There are any number of "resheader" rows that contain simple
|
||||
name/value pairs.
|
||||
|
||||
Each data row contains a name, and value. The row also contains a
|
||||
type or mimetype. Type corresponds to a .NET class that support
|
||||
text/value conversion through the TypeConverter architecture.
|
||||
Classes that don't support this are serialized and stored with the
|
||||
mimetype set.
|
||||
|
||||
The mimetype is used for serialized objects, and tells the
|
||||
ResXResourceReader how to depersist the object. This is currently not
|
||||
extensible. For a given mimetype the value must be set accordingly:
|
||||
|
||||
Note - application/x-microsoft.net.object.binary.base64 is the format
|
||||
that the ResXResourceWriter will generate, however the reader can
|
||||
read any of the formats listed below.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.binary.base64
|
||||
value : The object must be serialized with
|
||||
: System.Serialization.Formatters.Binary.BinaryFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.soap.base64
|
||||
value : The object must be serialized with
|
||||
: System.Runtime.Serialization.Formatters.Soap.SoapFormatter
|
||||
: and then encoded with base64 encoding.
|
||||
|
||||
mimetype: application/x-microsoft.net.object.bytearray.base64
|
||||
value : The object must be serialized into a byte array
|
||||
: using a System.ComponentModel.TypeConverter
|
||||
: and then encoded with base64 encoding.
|
||||
-->
|
||||
<xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata">
|
||||
<xsd:element name="root" msdata:IsDataSet="true">
|
||||
<xsd:complexType>
|
||||
<xsd:choice maxOccurs="unbounded">
|
||||
<xsd:element name="metadata">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
<xsd:attribute name="type" type="xsd:string" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="assembly">
|
||||
<xsd:complexType>
|
||||
<xsd:attribute name="alias" type="xsd:string" />
|
||||
<xsd:attribute name="name" type="xsd:string" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="data">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
<xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" />
|
||||
<xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" />
|
||||
<xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
<xsd:element name="resheader">
|
||||
<xsd:complexType>
|
||||
<xsd:sequence>
|
||||
<xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" />
|
||||
</xsd:sequence>
|
||||
<xsd:attribute name="name" type="xsd:string" use="required" />
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:choice>
|
||||
</xsd:complexType>
|
||||
</xsd:element>
|
||||
</xsd:schema>
|
||||
<resheader name="resmimetype">
|
||||
<value>text/microsoft-resx</value>
|
||||
</resheader>
|
||||
<resheader name="version">
|
||||
<value>2.0</value>
|
||||
</resheader>
|
||||
<resheader name="reader">
|
||||
<value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
<resheader name="writer">
|
||||
<value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value>
|
||||
</resheader>
|
||||
</root>
|
||||
26
Desktop.Win/Properties/Settings.Designer.cs
generated
26
Desktop.Win/Properties/Settings.Designer.cs
generated
@ -1,26 +0,0 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was generated by a tool.
|
||||
// Runtime Version:4.0.30319.42000
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
// the code is regenerated.
|
||||
// </auto-generated>
|
||||
//------------------------------------------------------------------------------
|
||||
|
||||
namespace Remotely.Desktop.Win.Properties {
|
||||
|
||||
|
||||
[global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
|
||||
[global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "16.2.0.0")]
|
||||
internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase {
|
||||
|
||||
private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings())));
|
||||
|
||||
public static Settings Default {
|
||||
get {
|
||||
return defaultInstance;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1,7 +0,0 @@
|
||||
<?xml version='1.0' encoding='utf-8'?>
|
||||
<SettingsFile xmlns="uri:settings" CurrentProfile="(Default)">
|
||||
<Profiles>
|
||||
<Profile Name="(Default)" />
|
||||
</Profiles>
|
||||
<Settings />
|
||||
</SettingsFile>
|
||||
BIN
Desktop.Win/Remotely_Icon.png
Normal file
BIN
Desktop.Win/Remotely_Icon.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 4.4 KiB |
@ -131,7 +131,7 @@ namespace Remotely.Desktop.Win.ViewModels
|
||||
|
||||
public void CopyLink()
|
||||
{
|
||||
Clipboard.SetText($"{Host}/RemoteControl?sessionID={SessionID.Replace(" ", "")}");
|
||||
Clipboard.SetText($"{Host}/RemoteControl?sessionID={SessionID?.Replace(" ", "")}");
|
||||
}
|
||||
|
||||
public async Task Init()
|
||||
|
||||
@ -1,40 +0,0 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<packages>
|
||||
<package id="Costura.Fody" version="4.1.0" targetFramework="net48" />
|
||||
<package id="Fody" version="6.0.5" targetFramework="net48" developmentDependency="true" />
|
||||
<package id="MessagePack" version="1.8.80" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.Connections.Abstractions" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.Http.Connections.Client" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.Http.Connections.Common" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.Http.Features" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.SignalR.Client" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.SignalR.Client.Core" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.SignalR.Common" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.SignalR.Protocols.Json" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.AspNetCore.SignalR.Protocols.MessagePack" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Bcl.AsyncInterfaces" version="1.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration.Abstractions" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Configuration.Binder" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.DependencyInjection.Abstractions" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Logging.Abstractions" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Options" version="3.1.0" targetFramework="net48" />
|
||||
<package id="Microsoft.Extensions.Primitives" version="3.1.0" targetFramework="net48" />
|
||||
<package id="System.Buffers" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.ComponentModel.Annotations" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Drawing.Common" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.IO.Pipelines" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Memory" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.Numerics.Vectors" version="4.5.0" targetFramework="net48" />
|
||||
<package id="System.Reflection.Emit" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Reflection.Emit.Lightweight" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.CompilerServices.Unsafe" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Runtime.Serialization.Primitives" version="4.3.0" targetFramework="net48" />
|
||||
<package id="System.Text.Encodings.Web" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Text.Json" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Threading.Channels" version="4.7.0" targetFramework="net48" />
|
||||
<package id="System.Threading.Tasks.Extensions" version="4.5.3" targetFramework="net48" />
|
||||
<package id="System.ValueTuple" version="4.5.0" targetFramework="net48" />
|
||||
</packages>
|
||||
@ -8,6 +8,11 @@ Public Server: https://tryremotely.lucency.co (not intended for production use)
|
||||
|
||||
*Notice: Remotely is currently in maintenance mode and will likely stay in a more-or-less prototype state.*
|
||||
|
||||
## Client Prerequisites:
|
||||
* Endpoint devices require the .NET Core runtime to be installed.
|
||||
* For Windows, the Desktop Runtime is required.
|
||||
* Downlaod Link: https://dotnet.microsoft.com/download/dotnet-core/current/runtime
|
||||
|
||||
## Build Instructions (Windows 10)
|
||||
The following steps will configure your Windows 10 machine for building the Remotely server and clients.
|
||||
* Install Visual Studio 2019.
|
||||
|
||||
59
Remotely.sln
59
Remotely.sln
@ -27,13 +27,6 @@ Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Assets", "Assets", "{D96B47
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Server", "Server\Server.csproj", "{3E835099-C417-4D82-8D5C-13DC09AF48AC}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScreenCast.Win", "ScreenCast.Win\ScreenCast.Win.csproj", "{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{98A8DF30-0993-4B49-822E-244A70AB8C4D} = {98A8DF30-0993-4B49-822E-244A70AB8C4D}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Desktop.Win", "Desktop.Win\Desktop.Win.csproj", "{486A238C-387B-49C5-A361-B86ACDB2572A}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScreenCast.Linux", "ScreenCast.Linux\ScreenCast.Linux.csproj", "{E46F11D0-3C88-4D43-8CCC-EE7182CAD5C1}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ScreenCast.Core", "ScreenCast.Core\ScreenCast.Core.csproj", "{B04A1728-2E87-491E-BC7F-F575A1754DEF}"
|
||||
@ -42,6 +35,10 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Shared", "Shared\Shared.csp
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Desktop.Linux", "Desktop.Linux\Desktop.Linux.csproj", "{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Desktop.Win", "Desktop.Win\Desktop.Win.csproj", "{90530ADC-69C6-4230-A09B-376B34F66B45}"
|
||||
EndProject
|
||||
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScreenCast.Win", "ScreenCast.Win\ScreenCast.Win.csproj", "{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}"
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Any CPU = Debug|Any CPU
|
||||
@ -76,30 +73,6 @@ Global
|
||||
{3E835099-C417-4D82-8D5C-13DC09AF48AC}.Release|x64.Build.0 = Release|x64
|
||||
{3E835099-C417-4D82-8D5C-13DC09AF48AC}.Release|x86.ActiveCfg = Release|x86
|
||||
{3E835099-C417-4D82-8D5C-13DC09AF48AC}.Release|x86.Build.0 = Release|x86
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|x64.Build.0 = Debug|x64
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Debug|x86.Build.0 = Debug|x86
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|x64.ActiveCfg = Release|x64
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|x64.Build.0 = Release|x64
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|x86.ActiveCfg = Release|x86
|
||||
{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}.Release|x86.Build.0 = Release|x86
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|x64.ActiveCfg = Debug|x64
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|x64.Build.0 = Debug|x64
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|x86.ActiveCfg = Debug|x86
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Debug|x86.Build.0 = Debug|x86
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|x64.ActiveCfg = Release|x64
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|x64.Build.0 = Release|x64
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|x86.ActiveCfg = Release|x86
|
||||
{486A238C-387B-49C5-A361-B86ACDB2572A}.Release|x86.Build.0 = Release|x86
|
||||
{E46F11D0-3C88-4D43-8CCC-EE7182CAD5C1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{E46F11D0-3C88-4D43-8CCC-EE7182CAD5C1}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{E46F11D0-3C88-4D43-8CCC-EE7182CAD5C1}.Debug|x64.ActiveCfg = Debug|x64
|
||||
@ -148,6 +121,30 @@ Global
|
||||
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x64.Build.0 = Release|x64
|
||||
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x86.ActiveCfg = Release|x86
|
||||
{FF7FD66A-B3E2-4D39-A457-A00C94EDE9E6}.Release|x86.Build.0 = Release|x86
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|x64.Build.0 = Release|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{90530ADC-69C6-4230-A09B-376B34F66B45}.Release|x86.Build.0 = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|x64.Build.0 = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{D4DE7CAB-74BB-4565-98DF-67DEA2B735FB}.Release|x86.Build.0 = Release|Any CPU
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
||||
@ -47,13 +47,18 @@ namespace Remotely.ScreenCast.Core.Sockets
|
||||
|
||||
public async Task Connect(string host)
|
||||
{
|
||||
if (Connection != null)
|
||||
{
|
||||
await Connection.StopAsync();
|
||||
await Connection.DisposeAsync();
|
||||
}
|
||||
Connection = new HubConnectionBuilder()
|
||||
.WithUrl($"{host}/RCDeviceHub")
|
||||
.AddMessagePackProtocol()
|
||||
.Build();
|
||||
|
||||
ApplyConnectionHandlers();
|
||||
|
||||
|
||||
await Connection.StartAsync();
|
||||
}
|
||||
|
||||
@ -134,7 +139,6 @@ namespace Remotely.ScreenCast.Core.Sockets
|
||||
Connection.Closed += (ex) =>
|
||||
{
|
||||
Logger.Write($"Connection closed. Error: {ex?.Message}");
|
||||
Environment.Exit(0);
|
||||
return Task.CompletedTask;
|
||||
};
|
||||
|
||||
|
||||
17
ScreenCast.Linux/Properties/PublishProfiles/linux-x64.pubxml
Normal file
17
ScreenCast.Linux/Properties/PublishProfiles/linux-x64.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\netcoreapp3.1\linux-x64\publish\ScreenCast</PublishDir>
|
||||
<RuntimeIdentifier>linux-x64</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -54,12 +54,12 @@ namespace Remotely.ScreenCast.Win.Capture
|
||||
OutputDuplicateFrameInformation duplicateFrameInformation;
|
||||
|
||||
// Try to get duplicated frame within given time is ms
|
||||
duplicatedOutput.AcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
duplicatedOutput.TryAcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
|
||||
while (duplicateFrameInformation.AccumulatedFrames < 1)
|
||||
{
|
||||
duplicatedOutput.ReleaseFrame();
|
||||
duplicatedOutput.AcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
duplicatedOutput.TryAcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
}
|
||||
|
||||
// copy resource into memory that can be accessed by the CPU
|
||||
|
||||
17
ScreenCast.Win/Properties/PublishProfiles/win-x64.pubxml
Normal file
17
ScreenCast.Win/Properties/PublishProfiles/win-x64.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\netcoreapp3.1\win10-x64\publish\ScreenCast</PublishDir>
|
||||
<SelfContained>false</SelfContained>
|
||||
<RuntimeIdentifier>win-x64</RuntimeIdentifier>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
17
ScreenCast.Win/Properties/PublishProfiles/win-x86.pubxml
Normal file
17
ScreenCast.Win/Properties/PublishProfiles/win-x86.pubxml
Normal file
@ -0,0 +1,17 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!--
|
||||
https://go.microsoft.com/fwlink/?LinkID=208121.
|
||||
-->
|
||||
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<PropertyGroup>
|
||||
<PublishProtocol>FileSystem</PublishProtocol>
|
||||
<Configuration>Release</Configuration>
|
||||
<Platform>Any CPU</Platform>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<PublishDir>..\Agent\bin\Release\netcoreapp3.1\win10-x86\publish\ScreenCast</PublishDir>
|
||||
<RuntimeIdentifier>win-x86</RuntimeIdentifier>
|
||||
<SelfContained>false</SelfContained>
|
||||
<PublishSingleFile>True</PublishSingleFile>
|
||||
<PublishReadyToRun>False</PublishReadyToRun>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
@ -1,287 +1,25 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<Project Sdk="Microsoft.NET.Sdk.WindowsDesktop">
|
||||
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<OutputType>WinExe</OutputType>
|
||||
<TargetFramework>netcoreapp3.1</TargetFramework>
|
||||
<UseWindowsForms>true</UseWindowsForms>
|
||||
<RootNamespace>Remotely.ScreenCast.Win</RootNamespace>
|
||||
<AssemblyName>Remotely_ScreenCast</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Reference Include="MessagePack, Version=1.8.0.0, Culture=neutral, PublicKeyToken=b4a0369545f0a1be, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MessagePack.1.8.80\lib\net47\MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Connections.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Features.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.Core.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.Json, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.Json.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.3.1.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NAudio, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NAudio.1.9.0\lib\net35\NAudio.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.Direct3D11, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.Direct3D11.4.2.0\lib\net45\SharpDX.Direct3D11.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.DXGI, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.DXGI.4.2.0\lib\net45\SharpDX.DXGI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Common.4.7.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.4.7.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.4.7.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.4.7.0\lib\net461\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.4.7.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
<PackageReference Include="NAudio" Version="1.9.0" />
|
||||
<PackageReference Include="SharpDX.Direct3D11" Version="4.2.0" />
|
||||
<PackageReference Include="SharpDX.DXGI" Version="4.2.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Compile Include="Services\WinAudioCapturer.cs" />
|
||||
<Compile Include="Capture\BitBltCapture.cs" />
|
||||
<Compile Include="Services\WinClipboardService.cs" />
|
||||
<Compile Include="Services\CursorIconWatcher.cs" />
|
||||
<Compile Include="Capture\DXCapture.cs" />
|
||||
<Compile Include="Services\WinScreenCaster.cs" />
|
||||
<Compile Include="Services\WinInput.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
<ProjectReference Include="..\ScreenCast.Core\ScreenCast.Core.csproj" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ScreenCast.Core\ScreenCast.Core.csproj">
|
||||
<Project>{b04a1728-2e87-491e-bc7f-f575a1754def}</Project>
|
||||
<Name>ScreenCast.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{3b1b36ae-7a60-4974-a868-1e24894d4149}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if $(ConfigurationName) == Debug (
|
||||
if $(PlatformName) == Any CPU (
|
||||
md "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
|
||||
copy /y "$(TargetDir)\*" "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
|
||||
)
|
||||
)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
|
||||
<Target Name="PostBuild" AfterTargets="PostBuildEvent">
|
||||
<Exec Command="if $(ConfigurationName) == Debug (
 if $(PlatformName) == Any CPU (
 md "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
 copy /y "$(TargetDir)\*" "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
 )
)" />
|
||||
</Target>
|
||||
|
||||
</Project>
|
||||
100
ScreenCast.Win_Old/Capture/BitBltCapture.cs
Normal file
100
ScreenCast.Win_Old/Capture/BitBltCapture.cs
Normal file
@ -0,0 +1,100 @@
|
||||
using System;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Windows;
|
||||
using System.Windows.Forms;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
using System.Collections.Generic;
|
||||
using Remotely.ScreenCast.Core.Services;
|
||||
using System.Threading;
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Capture
|
||||
{
|
||||
public class BitBltCapture : ICapturer
|
||||
{
|
||||
public BitBltCapture()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public bool CaptureFullscreen { get; set; } = true;
|
||||
public Bitmap CurrentFrame { get; set; }
|
||||
public Rectangle CurrentScreenBounds { get; set; } = Screen.PrimaryScreen.Bounds;
|
||||
public bool IsCapturing { get; set; }
|
||||
public int PauseForMilliseconds { get; set; }
|
||||
public Bitmap PreviousFrame { get; set; }
|
||||
public event EventHandler<Rectangle> ScreenChanged;
|
||||
public int SelectedScreen { get; private set; } = Screen.AllScreens.ToList().IndexOf(Screen.PrimaryScreen);
|
||||
private Graphics Graphic { get; set; }
|
||||
|
||||
private object ScreenLock { get; } = new object();
|
||||
|
||||
public void Capture()
|
||||
{
|
||||
try
|
||||
{
|
||||
lock (ScreenLock)
|
||||
{
|
||||
PreviousFrame = (Bitmap)CurrentFrame.Clone();
|
||||
Graphic.CopyFromScreen(CurrentScreenBounds.Left, CurrentScreenBounds.Top, 0, 0, new Size(CurrentScreenBounds.Width, CurrentScreenBounds.Height));
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(ex);
|
||||
Init();
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
Graphic.Dispose();
|
||||
CurrentFrame.Dispose();
|
||||
PreviousFrame.Dispose();
|
||||
}
|
||||
|
||||
public int GetScreenCount()
|
||||
{
|
||||
return Screen.AllScreens.Length;
|
||||
}
|
||||
|
||||
public Rectangle GetVirtualScreenBounds()
|
||||
{
|
||||
return SystemInformation.VirtualScreen;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
CurrentFrame = new Bitmap(CurrentScreenBounds.Width, CurrentScreenBounds.Height, PixelFormat.Format32bppArgb);
|
||||
PreviousFrame = new Bitmap(CurrentScreenBounds.Width, CurrentScreenBounds.Height, PixelFormat.Format32bppArgb);
|
||||
Graphic = Graphics.FromImage(CurrentFrame);
|
||||
}
|
||||
|
||||
public void SetSelectedScreen(int screenNumber)
|
||||
{
|
||||
if (screenNumber == SelectedScreen)
|
||||
{
|
||||
return;
|
||||
}
|
||||
lock (ScreenLock)
|
||||
{
|
||||
if (GetScreenCount() >= screenNumber + 1)
|
||||
{
|
||||
SelectedScreen = screenNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedScreen = 0;
|
||||
}
|
||||
CurrentScreenBounds = Screen.AllScreens[SelectedScreen].Bounds;
|
||||
CaptureFullscreen = true;
|
||||
Init();
|
||||
ScreenChanged?.Invoke(this, CurrentScreenBounds);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
214
ScreenCast.Win_Old/Capture/DXCapture.cs
Normal file
214
ScreenCast.Win_Old/Capture/DXCapture.cs
Normal file
@ -0,0 +1,214 @@
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
using Remotely.ScreenCast.Core.Services;
|
||||
using SharpDX;
|
||||
using SharpDX.Direct3D11;
|
||||
using SharpDX.DXGI;
|
||||
using System;
|
||||
using System.Diagnostics;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.Linq;
|
||||
using System.Threading;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Capture
|
||||
{
|
||||
public class DXCapture : ICapturer
|
||||
{
|
||||
private Adapter1 adapter;
|
||||
private SharpDX.Direct3D11.Device device;
|
||||
private OutputDuplication duplicatedOutput;
|
||||
private Factory1 factory;
|
||||
private int height;
|
||||
private Output output;
|
||||
private Output1 output1;
|
||||
private Texture2D screenTexture;
|
||||
private Texture2DDescription textureDesc;
|
||||
private int width;
|
||||
public bool CaptureFullscreen { get; set; } = true;
|
||||
public Bitmap CurrentFrame { get; set; }
|
||||
public Rectangle CurrentScreenBounds { get; private set; }
|
||||
public bool NeedsInit { get; set; } = true;
|
||||
public Bitmap PreviousFrame { get; set; }
|
||||
public event EventHandler<Rectangle> ScreenChanged;
|
||||
public int SelectedScreen { get; private set; } = 0;
|
||||
|
||||
public DXCapture()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
|
||||
public void Capture()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (NeedsInit)
|
||||
{
|
||||
duplicatedOutput?.Dispose();
|
||||
Init();
|
||||
}
|
||||
|
||||
PreviousFrame = (Bitmap)CurrentFrame.Clone();
|
||||
|
||||
SharpDX.DXGI.Resource screenResource;
|
||||
OutputDuplicateFrameInformation duplicateFrameInformation;
|
||||
|
||||
// Try to get duplicated frame within given time is ms
|
||||
duplicatedOutput.AcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
|
||||
while (duplicateFrameInformation.AccumulatedFrames < 1)
|
||||
{
|
||||
duplicatedOutput.ReleaseFrame();
|
||||
duplicatedOutput.AcquireNextFrame(50, out duplicateFrameInformation, out screenResource);
|
||||
}
|
||||
|
||||
// copy resource into memory that can be accessed by the CPU
|
||||
using (var screenTexture2D = screenResource.QueryInterface<Texture2D>())
|
||||
device.ImmediateContext.CopyResource(screenTexture2D, screenTexture);
|
||||
|
||||
// Get the desktop capture texture
|
||||
var mapSource = device.ImmediateContext.MapSubresource(screenTexture, 0, MapMode.Read, SharpDX.Direct3D11.MapFlags.None);
|
||||
|
||||
// Create Drawing.Bitmap
|
||||
using (var bitmap = new Bitmap(width, height, PixelFormat.Format32bppArgb))
|
||||
{
|
||||
var boundsRect = new Rectangle(0, 0, width, height);
|
||||
|
||||
// Copy pixels from screen capture Texture to GDI bitmap
|
||||
var mapDest = bitmap.LockBits(boundsRect, ImageLockMode.WriteOnly, bitmap.PixelFormat);
|
||||
var sourcePtr = mapSource.DataPointer;
|
||||
var destPtr = mapDest.Scan0;
|
||||
for (int y = 0; y < height; y++)
|
||||
{
|
||||
// Copy a single line
|
||||
SharpDX.Utilities.CopyMemory(destPtr, sourcePtr, width * 4);
|
||||
|
||||
// Advance pointers
|
||||
sourcePtr = IntPtr.Add(sourcePtr, mapSource.RowPitch);
|
||||
destPtr = IntPtr.Add(destPtr, mapDest.Stride);
|
||||
}
|
||||
|
||||
// Release source and dest locks
|
||||
bitmap.UnlockBits(mapDest);
|
||||
device.ImmediateContext.UnmapSubresource(screenTexture, 0);
|
||||
|
||||
screenResource.Dispose();
|
||||
duplicatedOutput.ReleaseFrame();
|
||||
|
||||
CurrentFrame = (Bitmap)bitmap.Clone();
|
||||
}
|
||||
}
|
||||
catch (SharpDXException e)
|
||||
{
|
||||
if (e.ResultCode.Code != SharpDX.DXGI.ResultCode.WaitTimeout.Result.Code)
|
||||
{
|
||||
Logger.Write(e);
|
||||
NeedsInit = true;
|
||||
}
|
||||
}
|
||||
catch (Exception e)
|
||||
{
|
||||
Logger.Write(e);
|
||||
NeedsInit = true;
|
||||
}
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
duplicatedOutput?.Dispose();
|
||||
output1?.Dispose();
|
||||
output?.Dispose();
|
||||
device?.Dispose();
|
||||
adapter?.Dispose();
|
||||
factory?.Dispose();
|
||||
CurrentFrame?.Dispose();
|
||||
PreviousFrame?.Dispose();
|
||||
}
|
||||
|
||||
public int GetScreenCount()
|
||||
{
|
||||
return Screen.AllScreens.Length;
|
||||
}
|
||||
|
||||
public Rectangle GetVirtualScreenBounds()
|
||||
{
|
||||
return SystemInformation.VirtualScreen;
|
||||
}
|
||||
|
||||
public void Init()
|
||||
{
|
||||
factory = new Factory1();
|
||||
|
||||
//Get first adapter
|
||||
adapter = factory.Adapters1.FirstOrDefault(x => x.Outputs.Length > 0);
|
||||
//Get device from adapter
|
||||
device = new SharpDX.Direct3D11.Device(adapter);
|
||||
//Get front buffer of the adapter
|
||||
if (adapter.GetOutputCount() < SelectedScreen + 1)
|
||||
{
|
||||
SelectedScreen = 0;
|
||||
}
|
||||
output = adapter.GetOutput(SelectedScreen);
|
||||
output1 = output.QueryInterface<Output1>();
|
||||
|
||||
// Width/Height of desktop to capture
|
||||
var bounds = output1.Description.DesktopBounds;
|
||||
var newWidth = bounds.Right - bounds.Left;
|
||||
var newHeight = bounds.Bottom - bounds.Top;
|
||||
CurrentScreenBounds = new Rectangle(bounds.Left, bounds.Top, newWidth, newHeight);
|
||||
if (newWidth != width || newHeight != height)
|
||||
{
|
||||
ScreenChanged?.Invoke(this, CurrentScreenBounds);
|
||||
}
|
||||
width = newWidth;
|
||||
height = newHeight;
|
||||
|
||||
CurrentFrame = new Bitmap(width, height, PixelFormat.Format32bppArgb);
|
||||
PreviousFrame = new Bitmap(width, height, PixelFormat.Format32bppArgb);
|
||||
|
||||
// Create Staging texture CPU-accessible
|
||||
textureDesc = new Texture2DDescription
|
||||
{
|
||||
CpuAccessFlags = CpuAccessFlags.Read,
|
||||
BindFlags = BindFlags.None,
|
||||
Format = Format.B8G8R8A8_UNorm,
|
||||
Width = width,
|
||||
Height = height,
|
||||
OptionFlags = ResourceOptionFlags.None,
|
||||
MipLevels = 1,
|
||||
ArraySize = 1,
|
||||
SampleDescription = { Count = 1, Quality = 0 },
|
||||
Usage = ResourceUsage.Staging
|
||||
};
|
||||
screenTexture = new Texture2D(device, textureDesc);
|
||||
duplicatedOutput = output1.DuplicateOutput(device);
|
||||
|
||||
NeedsInit = false;
|
||||
}
|
||||
|
||||
public void SetSelectedScreen(int screenNumber)
|
||||
{
|
||||
if (screenNumber == SelectedScreen)
|
||||
{
|
||||
return;
|
||||
}
|
||||
if (adapter == null)
|
||||
{
|
||||
SelectedScreen = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (adapter.Outputs.Length >= screenNumber + 1)
|
||||
{
|
||||
SelectedScreen = screenNumber;
|
||||
}
|
||||
else
|
||||
{
|
||||
SelectedScreen = 0;
|
||||
}
|
||||
}
|
||||
CaptureFullscreen = true;
|
||||
NeedsInit = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
122
ScreenCast.Win_Old/Program.cs
Normal file
122
ScreenCast.Win_Old/Program.cs
Normal file
@ -0,0 +1,122 @@
|
||||
using Remotely.Shared.Models;
|
||||
using Remotely.ScreenCast.Core;
|
||||
using Remotely.ScreenCast.Core.Services;
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Threading.Tasks;
|
||||
using Remotely.Shared.Win32;
|
||||
using System.Threading;
|
||||
using Remotely.ScreenCast.Win.Services;
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
using Remotely.ScreenCast.Win.Capture;
|
||||
using Remotely.ScreenCast.Core.Sockets;
|
||||
|
||||
namespace Remotely.ScreenCast.Win
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static Conductor Conductor { get; private set; }
|
||||
public static CursorIconWatcher CursorIconWatcher { get; private set; }
|
||||
public static async void CursorIconWatcher_OnChange(object sender, CursorInfo cursor)
|
||||
{
|
||||
if (Conductor?.CasterSocket != null)
|
||||
{
|
||||
await Conductor.CasterSocket.SendCursorChange(cursor, Conductor.Viewers.Keys.ToList());
|
||||
}
|
||||
}
|
||||
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
try
|
||||
{
|
||||
AppDomain.CurrentDomain.UnhandledException += CurrentDomain_UnhandledException;
|
||||
CursorIconWatcher = new CursorIconWatcher(Conductor);
|
||||
var screenCaster = new WinScreenCaster(CursorIconWatcher);
|
||||
var clipboardService = new WinClipboardService();
|
||||
clipboardService.BeginWatching();
|
||||
var casterSocket = new CasterSocket(new WinInput(), screenCaster, new WinAudioCapturer(), clipboardService);
|
||||
Conductor = new Conductor(casterSocket, screenCaster);
|
||||
Conductor.ProcessArgs(args);
|
||||
|
||||
Conductor.Connect().ContinueWith(async (task) =>
|
||||
{
|
||||
CursorIconWatcher.OnChange += CursorIconWatcher_OnChange;
|
||||
await Conductor.CasterSocket.SendDeviceInfo(Conductor.ServiceID, Environment.MachineName, Conductor.DeviceID);
|
||||
CheckInitialDesktop();
|
||||
await CheckForRelaunch();
|
||||
Conductor.IdleTimer = new IdleTimer(Conductor.Viewers);
|
||||
Conductor.IdleTimer.Start();
|
||||
|
||||
await HandleConnection(Conductor);
|
||||
});
|
||||
|
||||
Thread.Sleep(Timeout.Infinite);
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(ex);
|
||||
throw;
|
||||
}
|
||||
}
|
||||
|
||||
private static async Task CheckForRelaunch()
|
||||
{
|
||||
|
||||
if (Conductor.ArgDict.ContainsKey("relaunch"))
|
||||
{
|
||||
Logger.Write($"Resuming after relaunch in desktop {Conductor.CurrentDesktopName}.");
|
||||
var viewersString = Conductor.ArgDict["viewers"];
|
||||
var viewerIDs = viewersString.Split(",".ToCharArray());
|
||||
await Conductor.CasterSocket.NotifyViewersRelaunchedScreenCasterReady(viewerIDs);
|
||||
}
|
||||
else
|
||||
{
|
||||
await Conductor.CasterSocket.NotifyRequesterUnattendedReady(Conductor.RequesterID);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CheckInitialDesktop()
|
||||
{
|
||||
var desktopName = Win32Interop.GetCurrentDesktop();
|
||||
if (desktopName.ToLower() != Conductor.CurrentDesktopName.ToLower())
|
||||
{
|
||||
Conductor.CurrentDesktopName = desktopName;
|
||||
Logger.Write($"Setting initial desktop to {desktopName}.");
|
||||
Conductor.ArgDict["desktop"] = desktopName;
|
||||
var openProcessString = Assembly.GetExecutingAssembly().Location;
|
||||
foreach (var arg in Conductor.ArgDict)
|
||||
{
|
||||
openProcessString += $" -{arg.Key} {arg.Value}";
|
||||
}
|
||||
var result = Win32Interop.OpenInteractiveProcess(openProcessString, desktopName, true, out _);
|
||||
if (!result)
|
||||
{
|
||||
Logger.Write($"Desktop relaunch to {desktopName} failed.");
|
||||
}
|
||||
Environment.Exit(0);
|
||||
}
|
||||
}
|
||||
|
||||
private static void CurrentDomain_UnhandledException(object sender, UnhandledExceptionEventArgs e)
|
||||
{
|
||||
Logger.Write((Exception)e.ExceptionObject);
|
||||
}
|
||||
|
||||
|
||||
private static async Task HandleConnection(Conductor conductor)
|
||||
{
|
||||
while (true)
|
||||
{
|
||||
var desktopName = Win32Interop.GetCurrentDesktop();
|
||||
if (desktopName.ToLower() != conductor.CurrentDesktopName.ToLower() && conductor.Viewers.Count > 0)
|
||||
{
|
||||
conductor.CurrentDesktopName = desktopName;
|
||||
Logger.Write($"Switching desktops to {desktopName}.");
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
}
|
||||
await Task.Delay(1000);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
287
ScreenCast.Win_Old/ScreenCast.Win.csproj
Normal file
287
ScreenCast.Win_Old/ScreenCast.Win.csproj
Normal file
@ -0,0 +1,287 @@
|
||||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<Project ToolsVersion="15.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
|
||||
<Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" />
|
||||
<PropertyGroup>
|
||||
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
|
||||
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
|
||||
<ProjectGuid>{2DCEA1F5-9B64-4EDB-9CD0-4D6675D96709}</ProjectGuid>
|
||||
<OutputType>Exe</OutputType>
|
||||
<RootNamespace>Remotely.ScreenCast.Win</RootNamespace>
|
||||
<AssemblyName>Remotely_ScreenCast</AssemblyName>
|
||||
<TargetFrameworkVersion>v4.8</TargetFrameworkVersion>
|
||||
<FileAlignment>512</FileAlignment>
|
||||
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
|
||||
<Deterministic>true</Deterministic>
|
||||
<NuGetPackageImportStamp>
|
||||
</NuGetPackageImportStamp>
|
||||
<PublishUrl>publish\</PublishUrl>
|
||||
<Install>true</Install>
|
||||
<InstallFrom>Disk</InstallFrom>
|
||||
<UpdateEnabled>false</UpdateEnabled>
|
||||
<UpdateMode>Foreground</UpdateMode>
|
||||
<UpdateInterval>7</UpdateInterval>
|
||||
<UpdateIntervalUnits>Days</UpdateIntervalUnits>
|
||||
<UpdatePeriodically>false</UpdatePeriodically>
|
||||
<UpdateRequired>false</UpdateRequired>
|
||||
<MapFileExtensions>true</MapFileExtensions>
|
||||
<ApplicationRevision>0</ApplicationRevision>
|
||||
<ApplicationVersion>1.0.0.%2a</ApplicationVersion>
|
||||
<IsWebBootstrapper>false</IsWebBootstrapper>
|
||||
<UseApplicationTrust>false</UseApplicationTrust>
|
||||
<BootstrapperEnabled>true</BootstrapperEnabled>
|
||||
<TargetFrameworkProfile />
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<DebugType>full</DebugType>
|
||||
<Optimize>false</Optimize>
|
||||
<OutputPath>bin\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
|
||||
<PlatformTarget>AnyCPU</PlatformTarget>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<Optimize>true</Optimize>
|
||||
<OutputPath>bin\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<WarningLevel>4</WarningLevel>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x64'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x64\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x64'">
|
||||
<OutputPath>bin\x64\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x64</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Debug|x86'">
|
||||
<DebugSymbols>true</DebugSymbols>
|
||||
<OutputPath>bin\x86\Debug\</OutputPath>
|
||||
<DefineConstants>DEBUG;TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<DebugType>full</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup Condition="'$(Configuration)|$(Platform)' == 'Release|x86'">
|
||||
<OutputPath>bin\x86\Release\</OutputPath>
|
||||
<DefineConstants>TRACE</DefineConstants>
|
||||
<AllowUnsafeBlocks>true</AllowUnsafeBlocks>
|
||||
<Optimize>true</Optimize>
|
||||
<DebugType>pdbonly</DebugType>
|
||||
<PlatformTarget>x86</PlatformTarget>
|
||||
<ErrorReport>prompt</ErrorReport>
|
||||
<CodeAnalysisRuleSet>MinimumRecommendedRules.ruleset</CodeAnalysisRuleSet>
|
||||
<Prefer32Bit>true</Prefer32Bit>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<TargetZone>LocalIntranet</TargetZone>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<GenerateManifests>true</GenerateManifests>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<ApplicationManifest>Properties\app.manifest</ApplicationManifest>
|
||||
</PropertyGroup>
|
||||
<ItemGroup>
|
||||
<Reference Include="MessagePack, Version=1.8.0.0, Culture=neutral, PublicKeyToken=b4a0369545f0a1be, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\MessagePack.1.8.80\lib\net47\MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Connections.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Connections.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Connections.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Connections.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Connections.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Connections.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.Http.Features, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.Http.Features.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.Http.Features.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Client.Core, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Client.Core.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Client.Core.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Common, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Common.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.Json, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.Json.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.AspNetCore.SignalR.Protocols.MessagePack, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.3.1.0\lib\netstandard2.0\Microsoft.AspNetCore.SignalR.Protocols.MessagePack.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Bcl.AsyncInterfaces, Version=1.0.0.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Bcl.AsyncInterfaces.1.1.0\lib\net461\Microsoft.Bcl.AsyncInterfaces.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Configuration.Binder, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Configuration.Binder.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Configuration.Binder.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.3.1.0\lib\net461\Microsoft.Extensions.DependencyInjection.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.DependencyInjection.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.DependencyInjection.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.DependencyInjection.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Logging.Abstractions, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Logging.Abstractions.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Logging.Abstractions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Options, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Options.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Options.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="Microsoft.Extensions.Primitives, Version=3.1.0.0, Culture=neutral, PublicKeyToken=adb9793829ddae60, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\Microsoft.Extensions.Primitives.3.1.0\lib\netstandard2.0\Microsoft.Extensions.Primitives.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="NAudio, Version=1.9.0.0, Culture=neutral, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\NAudio.1.9.0\lib\net35\NAudio.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.4.2.0\lib\net45\SharpDX.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.Direct3D11, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.Direct3D11.4.2.0\lib\net45\SharpDX.Direct3D11.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="SharpDX.DXGI, Version=4.2.0.0, Culture=neutral, PublicKeyToken=b4dcf0f35e5521f1, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\SharpDX.DXGI.4.2.0\lib\net45\SharpDX.DXGI.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System" />
|
||||
<Reference Include="System.Buffers, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Buffers.4.5.0\lib\netstandard2.0\System.Buffers.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.Annotations, Version=4.2.1.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ComponentModel.Annotations.4.7.0\lib\net461\System.ComponentModel.Annotations.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ComponentModel.DataAnnotations" />
|
||||
<Reference Include="System.Core" />
|
||||
<Reference Include="System.Drawing" />
|
||||
<Reference Include="System.Drawing.Common, Version=4.0.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Drawing.Common.4.7.0\lib\net461\System.Drawing.Common.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.IO.Pipelines, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.IO.Pipelines.4.7.0\lib\netstandard2.0\System.IO.Pipelines.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Memory, Version=4.0.1.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Numerics" />
|
||||
<Reference Include="System.Numerics.Vectors, Version=4.1.4.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Numerics.Vectors.4.5.0\lib\net46\System.Numerics.Vectors.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.CompilerServices.Unsafe, Version=4.0.6.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.CompilerServices.Unsafe.4.7.0\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Runtime.Serialization" />
|
||||
<Reference Include="System.Runtime.Serialization.Primitives, Version=4.1.2.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Runtime.Serialization.Primitives.4.3.0\lib\net46\System.Runtime.Serialization.Primitives.dll</HintPath>
|
||||
<Private>True</Private>
|
||||
<Private>True</Private>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Encodings.Web, Version=4.0.5.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Encodings.Web.4.7.0\lib\netstandard2.0\System.Text.Encodings.Web.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Text.Json, Version=4.0.1.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Text.Json.4.7.0\lib\net461\System.Text.Json.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Channels, Version=4.0.2.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Channels.4.7.0\lib\netstandard2.0\System.Threading.Channels.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Threading.Tasks.Extensions, Version=4.2.0.1, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.Threading.Tasks.Extensions.4.5.3\lib\netstandard2.0\System.Threading.Tasks.Extensions.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.ValueTuple, Version=4.0.3.0, Culture=neutral, PublicKeyToken=cc7b13ffcd2ddd51, processorArchitecture=MSIL">
|
||||
<HintPath>..\packages\System.ValueTuple.4.5.0\lib\net47\System.ValueTuple.dll</HintPath>
|
||||
</Reference>
|
||||
<Reference Include="System.Windows.Forms" />
|
||||
<Reference Include="System.Xml.Linq" />
|
||||
<Reference Include="System.Data.DataSetExtensions" />
|
||||
<Reference Include="Microsoft.CSharp" />
|
||||
<Reference Include="System.Data" />
|
||||
<Reference Include="System.Net.Http" />
|
||||
<Reference Include="System.Xml" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<Compile Include="Services\WinAudioCapturer.cs" />
|
||||
<Compile Include="Capture\BitBltCapture.cs" />
|
||||
<Compile Include="Services\WinClipboardService.cs" />
|
||||
<Compile Include="Services\CursorIconWatcher.cs" />
|
||||
<Compile Include="Capture\DXCapture.cs" />
|
||||
<Compile Include="Services\WinScreenCaster.cs" />
|
||||
<Compile Include="Services\WinInput.cs" />
|
||||
<Compile Include="Program.cs" />
|
||||
<Compile Include="Properties\AssemblyInfo.cs" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<None Include="App.config" />
|
||||
<None Include="packages.config" />
|
||||
<None Include="Properties\app.manifest" />
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\ScreenCast.Core\ScreenCast.Core.csproj">
|
||||
<Project>{b04a1728-2e87-491e-bc7f-f575a1754def}</Project>
|
||||
<Name>ScreenCast.Core</Name>
|
||||
</ProjectReference>
|
||||
<ProjectReference Include="..\Shared\Shared.csproj">
|
||||
<Project>{3b1b36ae-7a60-4974-a868-1e24894d4149}</Project>
|
||||
<Name>Shared</Name>
|
||||
</ProjectReference>
|
||||
</ItemGroup>
|
||||
<ItemGroup>
|
||||
<BootstrapperPackage Include=".NETFramework,Version=v4.7.2">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>Microsoft .NET Framework 4.7.2 %28x86 and x64%29</ProductName>
|
||||
<Install>true</Install>
|
||||
</BootstrapperPackage>
|
||||
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
|
||||
<Visible>False</Visible>
|
||||
<ProductName>.NET Framework 3.5 SP1</ProductName>
|
||||
<Install>false</Install>
|
||||
</BootstrapperPackage>
|
||||
</ItemGroup>
|
||||
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
|
||||
<PropertyGroup>
|
||||
<PreBuildEvent>
|
||||
</PreBuildEvent>
|
||||
</PropertyGroup>
|
||||
<PropertyGroup>
|
||||
<PostBuildEvent>if $(ConfigurationName) == Debug (
|
||||
if $(PlatformName) == Any CPU (
|
||||
md "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
|
||||
copy /y "$(TargetDir)\*" "$(SolutionDir)Agent\bin\Debug\netcoreapp3.1\ScreenCast\"
|
||||
)
|
||||
)</PostBuildEvent>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
128
ScreenCast.Win_Old/Services/CursorIconWatcher.cs
Normal file
128
ScreenCast.Win_Old/Services/CursorIconWatcher.cs
Normal file
@ -0,0 +1,128 @@
|
||||
using Remotely.ScreenCast.Core;
|
||||
using Remotely.ScreenCast.Core.Models;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Runtime.InteropServices;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using System.Windows.Forms;
|
||||
using Remotely.Shared.Win32;
|
||||
using Remotely.Shared.Models;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Services
|
||||
{
|
||||
/// <summary>
|
||||
/// A class that can be used to watch for cursor icon changes.
|
||||
/// </summary>
|
||||
public class CursorIconWatcher
|
||||
{
|
||||
public CursorIconWatcher(Conductor conductor)
|
||||
{
|
||||
Conductor = conductor;
|
||||
ChangeTimer = new System.Timers.Timer(25);
|
||||
ChangeTimer.Elapsed += ChangeTimer_Elapsed;
|
||||
ChangeTimer.Start();
|
||||
}
|
||||
public event EventHandler<CursorInfo> OnChange;
|
||||
private System.Timers.Timer ChangeTimer { get; set; }
|
||||
private string PreviousCursorHandle { get; set; }
|
||||
public Conductor Conductor { get; }
|
||||
|
||||
private User32.CursorInfo cursorInfo;
|
||||
|
||||
|
||||
public CursorInfo GetCurrentCursor()
|
||||
{
|
||||
try
|
||||
{
|
||||
var ci = new User32.CursorInfo();
|
||||
ci.cbSize = Marshal.SizeOf(ci);
|
||||
User32.GetCursorInfo(out ci);
|
||||
if (ci.flags == User32.CURSOR_SHOWING)
|
||||
{
|
||||
if (ci.hCursor.ToString() == Cursors.IBeam.Handle.ToString())
|
||||
{
|
||||
return new CursorInfo(new byte[0], Point.Empty, "text");
|
||||
}
|
||||
|
||||
using (var icon = Icon.FromHandle(ci.hCursor))
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
using (var cursor = new Cursor(ci.hCursor))
|
||||
{
|
||||
var hotspot = cursor.HotSpot;
|
||||
icon.ToBitmap().Save(ms, ImageFormat.Png);
|
||||
return new CursorInfo(ms.ToArray(), hotspot);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return new CursorInfo(new byte[0], Point.Empty, "default");
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
return new CursorInfo(new byte[0], Point.Empty, "default");
|
||||
}
|
||||
}
|
||||
|
||||
private void ChangeTimer_Elapsed(object sender, ElapsedEventArgs e)
|
||||
{
|
||||
if (OnChange == null)
|
||||
{
|
||||
return;
|
||||
}
|
||||
try
|
||||
{
|
||||
cursorInfo = new User32.CursorInfo();
|
||||
cursorInfo.cbSize = Marshal.SizeOf(cursorInfo);
|
||||
User32.GetCursorInfo(out cursorInfo);
|
||||
if (cursorInfo.flags == User32.CURSOR_SHOWING)
|
||||
{
|
||||
var currentCursor = cursorInfo.hCursor.ToString();
|
||||
if (currentCursor != PreviousCursorHandle)
|
||||
{
|
||||
if (currentCursor == Cursors.IBeam.Handle.ToString())
|
||||
{
|
||||
OnChange?.Invoke(this, new CursorInfo(new byte[0], Point.Empty, "text"));
|
||||
}
|
||||
else
|
||||
{
|
||||
using (var icon = Icon.FromHandle(cursorInfo.hCursor))
|
||||
{
|
||||
using (var ms = new MemoryStream())
|
||||
{
|
||||
using (var cursor = new Cursor(cursorInfo.hCursor))
|
||||
{
|
||||
var hotspot = cursor.HotSpot;
|
||||
icon.ToBitmap().Save(ms, ImageFormat.Png);
|
||||
OnChange?.Invoke(this, new CursorInfo(ms.ToArray(), hotspot));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
PreviousCursorHandle = currentCursor;
|
||||
}
|
||||
}
|
||||
else if (PreviousCursorHandle != "0")
|
||||
{
|
||||
PreviousCursorHandle = "0";
|
||||
OnChange?.Invoke(this, new CursorInfo(new byte[0], Point.Empty, "default"));
|
||||
}
|
||||
}
|
||||
catch
|
||||
{
|
||||
OnChange?.Invoke(this, new CursorInfo(new byte[0], Point.Empty, "default"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
107
ScreenCast.Win_Old/Services/WinAudioCapturer.cs
Normal file
107
ScreenCast.Win_Old/Services/WinAudioCapturer.cs
Normal file
@ -0,0 +1,107 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Diagnostics;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using System.Timers;
|
||||
using NAudio.Wave;
|
||||
using Remotely.ScreenCast.Core;
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Services
|
||||
{
|
||||
public class WinAudioCapturer : IAudioCapturer
|
||||
{
|
||||
private WasapiLoopbackCapture Capturer { get; set; }
|
||||
private Stopwatch SendTimer { get; set; }
|
||||
private WaveFormat TargetFormat { get; set; }
|
||||
private List<byte> TempBuffer { get; set; } = new List<byte>();
|
||||
public void ToggleAudio(bool toggleOn)
|
||||
{
|
||||
if (toggleOn)
|
||||
{
|
||||
Start();
|
||||
}
|
||||
else
|
||||
{
|
||||
Stop();
|
||||
}
|
||||
}
|
||||
|
||||
private async void SendTempBuffer()
|
||||
{
|
||||
if (TempBuffer.Count == 0)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
using (var ms1 = new MemoryStream())
|
||||
{
|
||||
using (var wfw = new WaveFileWriter(ms1, Capturer.WaveFormat))
|
||||
{
|
||||
wfw.Write(TempBuffer.ToArray(), 0, TempBuffer.Count);
|
||||
}
|
||||
TempBuffer.Clear();
|
||||
|
||||
// Resample to 16-bit so Firefox will play it.
|
||||
using (var ms2 = new MemoryStream(ms1.ToArray()))
|
||||
using (var wfr = new WaveFileReader(ms2))
|
||||
using (var ms3 = new MemoryStream())
|
||||
{
|
||||
using (var resampler = new MediaFoundationResampler(wfr, TargetFormat))
|
||||
{
|
||||
WaveFileWriter.WriteWavFileToStream(ms3, resampler);
|
||||
}
|
||||
await Conductor.Current.CasterSocket.SendAudioSample(ms3.ToArray(), Program.Conductor.Viewers.Keys.ToList());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private void Start()
|
||||
{
|
||||
try
|
||||
{
|
||||
Capturer = new WasapiLoopbackCapture();
|
||||
TargetFormat = new WaveFormat(16000, 8, 1);
|
||||
SendTimer = Stopwatch.StartNew();
|
||||
Capturer.DataAvailable += (aud, args) =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (args.BytesRecorded > 0)
|
||||
{
|
||||
lock (TempBuffer)
|
||||
{
|
||||
if (!SendTimer.IsRunning)
|
||||
{
|
||||
SendTimer.Restart();
|
||||
}
|
||||
TempBuffer.AddRange(args.Buffer.Take(args.BytesRecorded));
|
||||
if (TempBuffer.Count > 200000)
|
||||
{
|
||||
SendTimer.Reset();
|
||||
SendTempBuffer();
|
||||
}
|
||||
else if (SendTimer.Elapsed.TotalMilliseconds > 1000)
|
||||
{
|
||||
SendTimer.Reset();
|
||||
SendTempBuffer();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
catch { }
|
||||
};
|
||||
Capturer.StartRecording();
|
||||
}
|
||||
catch { }
|
||||
}
|
||||
private void Stop()
|
||||
{
|
||||
Capturer.StopRecording();
|
||||
SendTimer.Reset();
|
||||
}
|
||||
}
|
||||
}
|
||||
86
ScreenCast.Win_Old/Services/WinClipboardService.cs
Normal file
86
ScreenCast.Win_Old/Services/WinClipboardService.cs
Normal file
@ -0,0 +1,86 @@
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
using Remotely.ScreenCast.Core.Services;
|
||||
using Remotely.ScreenCast.Core.Sockets;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using System.Threading.Tasks;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Services
|
||||
{
|
||||
public class WinClipboardService : IClipboardService
|
||||
{
|
||||
public event EventHandler<string> ClipboardTextChanged;
|
||||
|
||||
private string ClipboardText { get; set; }
|
||||
|
||||
private System.Timers.Timer ClipboardWatcher { get; set; }
|
||||
|
||||
public void BeginWatching()
|
||||
{
|
||||
try
|
||||
{
|
||||
if (ClipboardWatcher?.Enabled == true)
|
||||
{
|
||||
ClipboardWatcher.Stop();
|
||||
}
|
||||
|
||||
if (Clipboard.ContainsText())
|
||||
{
|
||||
ClipboardText = Clipboard.GetText();
|
||||
ClipboardTextChanged.Invoke(this, ClipboardText);
|
||||
}
|
||||
ClipboardWatcher = new System.Timers.Timer(500);
|
||||
}
|
||||
catch
|
||||
{
|
||||
return;
|
||||
}
|
||||
ClipboardWatcher.Elapsed += (sender, args) =>
|
||||
{
|
||||
var thread = new Thread(() =>
|
||||
{
|
||||
try
|
||||
{
|
||||
if (Clipboard.ContainsText() && Clipboard.GetText() != ClipboardText)
|
||||
{
|
||||
ClipboardText = Clipboard.GetText();
|
||||
ClipboardTextChanged.Invoke(this, ClipboardText);
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(ex);
|
||||
}
|
||||
});
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
};
|
||||
ClipboardWatcher.Start();
|
||||
}
|
||||
|
||||
public void SetText(string clipboardText)
|
||||
{
|
||||
try
|
||||
{
|
||||
var thread = new Thread(() =>
|
||||
{
|
||||
Clipboard.SetText(clipboardText);
|
||||
});
|
||||
thread.SetApartmentState(ApartmentState.STA);
|
||||
thread.Start();
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(ex);
|
||||
}
|
||||
}
|
||||
public void StopWatching()
|
||||
{
|
||||
ClipboardWatcher?.Stop();
|
||||
}
|
||||
}
|
||||
}
|
||||
261
ScreenCast.Win_Old/Services/WinInput.cs
Normal file
261
ScreenCast.Win_Old/Services/WinInput.cs
Normal file
@ -0,0 +1,261 @@
|
||||
using Remotely.ScreenCast.Core.Input;
|
||||
using Remotely.ScreenCast.Core.Models;
|
||||
using System;
|
||||
using Remotely.Shared.Win32;
|
||||
using static Remotely.Shared.Win32.User32;
|
||||
using Remotely.ScreenCast.Core.Capture;
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
using System.Windows.Forms;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Services
|
||||
{
|
||||
public class WinInput : IKeyboardMouseInput
|
||||
{
|
||||
public Tuple<double, double> GetAbsolutePercentFromRelativePercent(double percentX, double percentY, ICapturer capturer)
|
||||
{
|
||||
var absoluteX = (capturer.CurrentScreenBounds.Width * percentX) + capturer.CurrentScreenBounds.Left - capturer.GetVirtualScreenBounds().Left;
|
||||
var absoluteY = (capturer.CurrentScreenBounds.Height * percentY) + capturer.CurrentScreenBounds.Top - capturer.GetVirtualScreenBounds().Top;
|
||||
return new Tuple<double, double>(absoluteX / capturer.GetVirtualScreenBounds().Width, absoluteY / capturer.GetVirtualScreenBounds().Height);
|
||||
}
|
||||
|
||||
public Tuple<double, double> GetAbsolutePointFromRelativePercent(double percentX, double percentY, ICapturer capturer)
|
||||
{
|
||||
var absoluteX = (capturer.CurrentScreenBounds.Width * percentX) + capturer.CurrentScreenBounds.Left;
|
||||
var absoluteY = (capturer.CurrentScreenBounds.Height * percentY) + capturer.CurrentScreenBounds.Top;
|
||||
return new Tuple<double, double>(absoluteX, absoluteY);
|
||||
}
|
||||
|
||||
public void SendKeyDown(string key, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var keyCode = ConvertJavaScriptKeyToVirtualKey(key);
|
||||
var union = new InputUnion()
|
||||
{
|
||||
ki = new KEYBDINPUT()
|
||||
{
|
||||
wVk = keyCode,
|
||||
wScan = 0,
|
||||
time = 0,
|
||||
dwExtraInfo = GetMessageExtraInfo()
|
||||
}
|
||||
};
|
||||
var input = new INPUT() { type = InputType.KEYBOARD, U = union };
|
||||
SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
|
||||
public void SendKeyUp(string key, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var keyCode = ConvertJavaScriptKeyToVirtualKey(key);
|
||||
var union = new InputUnion()
|
||||
{
|
||||
ki = new KEYBDINPUT()
|
||||
{
|
||||
wVk = keyCode,
|
||||
wScan = 0,
|
||||
time = 0,
|
||||
dwFlags = KEYEVENTF.KEYUP,
|
||||
dwExtraInfo = GetMessageExtraInfo()
|
||||
}
|
||||
};
|
||||
var input = new INPUT() { type = InputType.KEYBOARD, U = union };
|
||||
SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
|
||||
public uint SendLeftMouseDown(double percentX, double percentY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var xyPercent = GetAbsolutePercentFromRelativePercent(percentX, percentY, viewer.Capturer);
|
||||
// Coordinates must be normalized. The bottom-right coordinate is mapped to 65535.
|
||||
var normalizedX = xyPercent.Item1 * 65535D;
|
||||
var normalizedY = xyPercent.Item2 * 65535D;
|
||||
var union = new InputUnion() { mi = new MOUSEINPUT() { dwFlags = MOUSEEVENTF.ABSOLUTE | MOUSEEVENTF.LEFTDOWN | MOUSEEVENTF.VIRTUALDESK, dx = (int)normalizedX, dy = (int)normalizedY, time = 0, mouseData = 0, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
public uint SendLeftMouseUp(double percentX, double percentY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var xyPercent = GetAbsolutePercentFromRelativePercent(percentX, percentY, viewer.Capturer);
|
||||
// Coordinates must be normalized. The bottom-right coordinate is mapped to 65535.
|
||||
var normalizedX = xyPercent.Item1 * 65535D;
|
||||
var normalizedY = xyPercent.Item2 * 65535D;
|
||||
var union = new InputUnion() { mi = new MOUSEINPUT() { dwFlags = MOUSEEVENTF.ABSOLUTE | MOUSEEVENTF.LEFTUP | MOUSEEVENTF.VIRTUALDESK, dx = (int)normalizedX, dy = (int)normalizedY, time = 0, mouseData = 0, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
public uint SendMouseMove(double percentX, double percentY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var xyPercent = GetAbsolutePercentFromRelativePercent(percentX, percentY, viewer.Capturer);
|
||||
// Coordinates must be normalized. The bottom-right coordinate is mapped to 65535.
|
||||
var normalizedX = xyPercent.Item1 * 65535D;
|
||||
var normalizedY = xyPercent.Item2 * 65535D;
|
||||
var union = new InputUnion() { mi = new MOUSEINPUT() { dwFlags = MOUSEEVENTF.ABSOLUTE | MOUSEEVENTF.MOVE | MOUSEEVENTF.VIRTUALDESK, dx = (int)normalizedX, dy = (int)normalizedY, time = 0, mouseData = 0, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
|
||||
public uint SendMouseWheel(int deltaY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
if (deltaY < 0)
|
||||
{
|
||||
deltaY = -120;
|
||||
}
|
||||
else if (deltaY > 0)
|
||||
{
|
||||
deltaY = 120;
|
||||
}
|
||||
var union = new User32.InputUnion() { mi = new User32.MOUSEINPUT() { dwFlags = MOUSEEVENTF.WHEEL, dx = 0, dy = 0, time = 0, mouseData = deltaY, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new User32.INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new User32.INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
|
||||
public uint SendRightMouseDown(double percentX, double percentY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var xyPercent = GetAbsolutePercentFromRelativePercent(percentX, percentY, viewer.Capturer);
|
||||
// Coordinates must be normalized. The bottom-right coordinate is mapped to 65535.
|
||||
var normalizedX = xyPercent.Item1 * 65535D;
|
||||
var normalizedY = xyPercent.Item2 * 65535D;
|
||||
var union = new InputUnion() { mi = new MOUSEINPUT() { dwFlags = MOUSEEVENTF.ABSOLUTE | MOUSEEVENTF.RIGHTDOWN | MOUSEEVENTF.VIRTUALDESK, dx = (int)normalizedX, dy = (int)normalizedY, time = 0, mouseData = 0, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
public uint SendRightMouseUp(double percentX, double percentY, Viewer viewer)
|
||||
{
|
||||
Win32Interop.SwitchToInputDesktop();
|
||||
var xyPercent = GetAbsolutePercentFromRelativePercent(percentX, percentY, viewer.Capturer);
|
||||
// Coordinates must be normalized. The bottom-right coordinate is mapped to 65535.
|
||||
var normalizedX = xyPercent.Item1 * 65535D;
|
||||
var normalizedY = xyPercent.Item2 * 65535D;
|
||||
var union = new InputUnion() { mi = new MOUSEINPUT() { dwFlags = MOUSEEVENTF.ABSOLUTE | MOUSEEVENTF.RIGHTUP | MOUSEEVENTF.VIRTUALDESK, dx = (int)normalizedX, dy = (int)normalizedY, time = 0, mouseData = 0, dwExtraInfo = GetMessageExtraInfo() } };
|
||||
var input = new INPUT() { type = InputType.MOUSE, U = union };
|
||||
return SendInput(1, new INPUT[] { input }, INPUT.Size);
|
||||
}
|
||||
public void SendText(string transferText, Viewer viewer)
|
||||
{
|
||||
SendKeys.SendWait(transferText);
|
||||
}
|
||||
|
||||
private VirtualKey ConvertJavaScriptKeyToVirtualKey(string key)
|
||||
{
|
||||
VirtualKey keyCode;
|
||||
switch (key)
|
||||
{
|
||||
case "Down":
|
||||
case "ArrowDown":
|
||||
keyCode = VirtualKey.DOWN;
|
||||
break;
|
||||
case "Up":
|
||||
case "ArrowUp":
|
||||
keyCode = VirtualKey.UP;
|
||||
break;
|
||||
case "Left":
|
||||
case "ArrowLeft":
|
||||
keyCode = VirtualKey.LEFT;
|
||||
break;
|
||||
case "Right":
|
||||
case "ArrowRight":
|
||||
keyCode = VirtualKey.RIGHT;
|
||||
break;
|
||||
case "Enter":
|
||||
keyCode = VirtualKey.RETURN;
|
||||
break;
|
||||
case "Esc":
|
||||
case "Escape":
|
||||
keyCode = VirtualKey.ESCAPE;
|
||||
break;
|
||||
case "Alt":
|
||||
keyCode = VirtualKey.MENU;
|
||||
break;
|
||||
case "Control":
|
||||
keyCode = VirtualKey.CONTROL;
|
||||
break;
|
||||
case "Shift":
|
||||
keyCode = VirtualKey.SHIFT;
|
||||
break;
|
||||
case "PAUSE":
|
||||
keyCode = VirtualKey.PAUSE;
|
||||
break;
|
||||
case "BREAK":
|
||||
keyCode = VirtualKey.PAUSE;
|
||||
break;
|
||||
case "Backspace":
|
||||
keyCode = VirtualKey.BACK;
|
||||
break;
|
||||
case "Tab":
|
||||
keyCode = VirtualKey.TAB;
|
||||
break;
|
||||
case "CapsLock":
|
||||
keyCode = VirtualKey.CAPITAL;
|
||||
break;
|
||||
case "Delete":
|
||||
keyCode = VirtualKey.DELETE;
|
||||
break;
|
||||
case "Home":
|
||||
keyCode = VirtualKey.HOME;
|
||||
break;
|
||||
case "End":
|
||||
keyCode = VirtualKey.END;
|
||||
break;
|
||||
case "PageUp":
|
||||
keyCode = VirtualKey.PRIOR;
|
||||
break;
|
||||
case "PageDown":
|
||||
keyCode = VirtualKey.NEXT;
|
||||
break;
|
||||
case "NumLock":
|
||||
keyCode = VirtualKey.NUMLOCK;
|
||||
break;
|
||||
case "Insert":
|
||||
keyCode = VirtualKey.INSERT;
|
||||
break;
|
||||
case "ScrollLock":
|
||||
keyCode = VirtualKey.SCROLL;
|
||||
break;
|
||||
case "F1":
|
||||
keyCode = VirtualKey.F1;
|
||||
break;
|
||||
case "F2":
|
||||
keyCode = VirtualKey.F2;
|
||||
break;
|
||||
case "F3":
|
||||
keyCode = VirtualKey.F3;
|
||||
break;
|
||||
case "F4":
|
||||
keyCode = VirtualKey.F4;
|
||||
break;
|
||||
case "F5":
|
||||
keyCode = VirtualKey.F5;
|
||||
break;
|
||||
case "F6":
|
||||
keyCode = VirtualKey.F6;
|
||||
break;
|
||||
case "F7":
|
||||
keyCode = VirtualKey.F7;
|
||||
break;
|
||||
case "F8":
|
||||
keyCode = VirtualKey.F8;
|
||||
break;
|
||||
case "F9":
|
||||
keyCode = VirtualKey.F9;
|
||||
break;
|
||||
case "F10":
|
||||
keyCode = VirtualKey.F10;
|
||||
break;
|
||||
case "F11":
|
||||
keyCode = VirtualKey.F11;
|
||||
break;
|
||||
case "F12":
|
||||
keyCode = VirtualKey.F12;
|
||||
break;
|
||||
default:
|
||||
keyCode = (VirtualKey)VkKeyScan(Convert.ToChar(key));
|
||||
break;
|
||||
}
|
||||
return keyCode;
|
||||
}
|
||||
}
|
||||
}
|
||||
55
ScreenCast.Win_Old/Services/WinScreenCaster.cs
Normal file
55
ScreenCast.Win_Old/Services/WinScreenCaster.cs
Normal file
@ -0,0 +1,55 @@
|
||||
using Remotely.ScreenCast.Core.Interfaces;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
using System.Threading.Tasks;
|
||||
using Remotely.ScreenCast.Core.Enums;
|
||||
using Remotely.ScreenCast.Core.Services;
|
||||
using Remotely.ScreenCast.Core.Capture;
|
||||
using Remotely.ScreenCast.Core;
|
||||
using Remotely.ScreenCast.Core.Models;
|
||||
using Remotely.Shared.Models;
|
||||
using Remotely.ScreenCast.Win.Capture;
|
||||
|
||||
namespace Remotely.ScreenCast.Win.Services
|
||||
{
|
||||
public class WinScreenCaster : ScreenCasterBase, IScreenCaster
|
||||
{
|
||||
public WinScreenCaster(CursorIconWatcher cursorIconWatcher)
|
||||
{
|
||||
CursorIconWatcher = cursorIconWatcher;
|
||||
}
|
||||
|
||||
public CursorIconWatcher CursorIconWatcher { get; }
|
||||
|
||||
public async Task BeginScreenCasting(ScreenCastRequest screenCastRequest)
|
||||
{
|
||||
await Conductor.Current.CasterSocket.SendCursorChange(CursorIconWatcher.GetCurrentCursor(), new List<string>() { screenCastRequest.ViewerID });
|
||||
_ = BeginScreenCasting(screenCastRequest.ViewerID, screenCastRequest.RequesterName, GetCapturer());
|
||||
}
|
||||
|
||||
private static ICapturer GetCapturer()
|
||||
{
|
||||
ICapturer capturer;
|
||||
try
|
||||
{
|
||||
if (Conductor.Current.Viewers.Count == 0)
|
||||
{
|
||||
capturer = new DXCapture();
|
||||
}
|
||||
else
|
||||
{
|
||||
capturer = new BitBltCapture();
|
||||
}
|
||||
}
|
||||
catch (Exception ex)
|
||||
{
|
||||
Logger.Write(ex);
|
||||
capturer = new BitBltCapture();
|
||||
}
|
||||
|
||||
return capturer;
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -27,13 +27,37 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
@* Device Groups *@
|
||||
<div class="form-group">
|
||||
<label class="mb-1">Device Groups</label>
|
||||
<span id="deviceGroupHelpButton" class="fas fa-question-circle pointer"></span>
|
||||
<select id="deviceGroupList" multiple asp-items="Model.DeviceGroups" class="form-control all-device-groups-list mb-1">
|
||||
</select>
|
||||
|
||||
<div class="text-right mb-3">
|
||||
<button id="removeDeviceGroupButton" type="button" class="btn btn-secondary">Remove</button>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<input id="deviceGroupInput" placeholder="Add new device group" class="form-control" maxlength="200" />
|
||||
<span class="input-group-btn">
|
||||
<button id="addDeviceGroupButton" type="button" class="btn btn-secondary">Add</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
@* Users *@
|
||||
<div class="form-group">
|
||||
<label class="control-label">Users</label>
|
||||
<span id="usersHelpButton" class="fas fa-question-circle pointer"></span>
|
||||
<table class="table table-responsive table-striped table-hover">
|
||||
<table class="table table-striped table-hover" style="max-height: 400px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>User Name</th>
|
||||
@ -63,30 +87,6 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
|
||||
@* Device Groups *@
|
||||
<div class="form-group">
|
||||
<label class="mb-1">Device Groups</label>
|
||||
<span id="deviceGroupHelpButton" class="fas fa-question-circle pointer"></span>
|
||||
<select id="deviceGroupList" multiple asp-items="Model.DeviceGroups" class="form-control all-device-groups-list mb-1">
|
||||
|
||||
</select>
|
||||
|
||||
<div class="text-right mb-3">
|
||||
<button id="removeDeviceGroupButton" type="button" class="btn btn-secondary">Remove</button>
|
||||
</div>
|
||||
|
||||
<div class="input-group">
|
||||
<input id="deviceGroupInput" placeholder="Add new device group" class="form-control" maxlength="200" />
|
||||
<span class="input-group-btn">
|
||||
<button id="addDeviceGroupButton" type="button" class="btn btn-secondary">Add</button>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@* Invitations *@
|
||||
<div class="row">
|
||||
@ -94,7 +94,7 @@
|
||||
<div class="form-group">
|
||||
<label class="control-label">Invitations</label>
|
||||
<span id="invitesHelpButton" class="fas fa-question-circle pointer"></span>
|
||||
<table id="invitesTable" class="table table-responsive table-striped table-hover">
|
||||
<table id="invitesTable" class="table table-striped table-hover" style="max-height: 400px">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>Invited User</th>
|
||||
|
||||
@ -10,21 +10,21 @@
|
||||
Instant desktop sharing. No account required.
|
||||
</div>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Windows (64/32-Bit)</h6>
|
||||
<h6>Windows (64-Bit)</h6>
|
||||
<p>
|
||||
<strong>Download:</strong>
|
||||
<br />
|
||||
<a href="~/Downloads/Remotely_Desktop.exe">Windows EXE</a>
|
||||
<a href="~/Downloads/Win-x64/Remotely_Desktop.exe">Windows EXE</a>
|
||||
</p>
|
||||
</div>
|
||||
@*<div class="col-sm-6">
|
||||
<div class="col-sm-6">
|
||||
<h6>Windows (32-Bit)</h6>
|
||||
<p>
|
||||
<strong>Download:</strong>
|
||||
<br />
|
||||
<a href="~/Downloads/Remotely_Desktop_Installer_x86.msi">Windows Installer</a>
|
||||
<a href="~/Downloads/Win-x86/Remotely_Desktop.exe">Windows EXE</a>
|
||||
</p>
|
||||
</div>*@
|
||||
</div>
|
||||
<div class="col-sm-6 mb-3">
|
||||
<h6>Linux 64-Bit</h6>
|
||||
<p>
|
||||
|
||||
@ -7,6 +7,7 @@
|
||||
<label>Device Group:</label>
|
||||
<select id="deviceGroupSelect" asp-items="Model.DeviceGroups" class="form-control" style="width: 200px">
|
||||
<option value="">All</option>
|
||||
<option value="">Ungrouped</option>
|
||||
</select>
|
||||
</div>
|
||||
<div style="text-align: right">
|
||||
|
||||
@ -29,6 +29,7 @@
|
||||
<Content Remove="wwwroot\scripts\Commands\PSCoreCommands.ts" />
|
||||
<Content Remove="wwwroot\scripts\Commands\WebCommands.ts" />
|
||||
<Content Remove="wwwroot\scripts\Commands\WinPSCommands.ts" />
|
||||
<Content Remove="wwwroot\scripts\Console.ts" />
|
||||
<Content Remove="wwwroot\scripts\DataGrid.ts" />
|
||||
<Content Remove="wwwroot\scripts\Enums\RemoteControlMode.ts" />
|
||||
<Content Remove="wwwroot\scripts\InputEventHandlers.ts" />
|
||||
@ -134,6 +135,7 @@
|
||||
<TypeScriptCompile Include="wwwroot\scripts\Commands\CMDCommands.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\Commands\WebCommands.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\Commands\PSCoreCommands.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\Console.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\DataGrid.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\Enums\RemoteControlMode.ts" />
|
||||
<TypeScriptCompile Include="wwwroot\scripts\InputEventHandlers.ts" />
|
||||
|
||||
@ -3,6 +3,7 @@ import * as DataGrid from "./DataGrid.js";
|
||||
import { CreateCommandHarness, AddCommandResultsHarness, AddPSCoreResultsHarness, UpdateResultsCount } from "./ResultsParser.js";
|
||||
import { Store } from "./Store.js";
|
||||
import { Main } from "./Main.js";
|
||||
import { AddConsoleOutput, AddConsoleHTML } from "./Console.js";
|
||||
export var Connection;
|
||||
export var ServiceID;
|
||||
export var Connected;
|
||||
@ -17,7 +18,7 @@ export function Connect() {
|
||||
Connection.start().catch(err => {
|
||||
console.error(err.toString());
|
||||
Connected = false;
|
||||
UI.AddConsoleOutput("Your connection was lost. Refresh the page or enter a command to reconnect.");
|
||||
AddConsoleOutput("Your connection was lost. Refresh the page or enter a command to reconnect.");
|
||||
}).then(() => {
|
||||
Connected = true;
|
||||
});
|
||||
@ -25,7 +26,7 @@ export function Connect() {
|
||||
Connected = false;
|
||||
if (!Store.IsDisconnectExpected) {
|
||||
UI.ShowModal("Connection Failure", "Your connection was lost. Click Reconnect to start a new session.", `<button type="button" class="btn btn-secondary" onclick="location.reload()">Reconnect</button>`);
|
||||
UI.AddConsoleOutput("Connection lost.");
|
||||
AddConsoleOutput("Connection lost.");
|
||||
}
|
||||
});
|
||||
}
|
||||
@ -37,7 +38,7 @@ function applyMessageHandlers(hubConnection) {
|
||||
Main.UserSettings.CommandModeShortcuts.WinPS = options.CommandModeShortcutWinPS;
|
||||
Main.UserSettings.CommandModeShortcuts.Bash = options.CommandModeShortcutBash;
|
||||
Main.UserSettings.CommandModeShortcuts.CMD = options.CommandModeShortcutCMD;
|
||||
UI.AddConsoleOutput("Console connected.");
|
||||
AddConsoleOutput("Console connected.");
|
||||
DataGrid.RefreshGrid();
|
||||
});
|
||||
hubConnection.on("LockedOut", (args) => {
|
||||
@ -65,14 +66,14 @@ function applyMessageHandlers(hubConnection) {
|
||||
});
|
||||
hubConnection.on("DisplayMessage", (consoleMessage, popupMessage) => {
|
||||
if (consoleMessage) {
|
||||
UI.AddConsoleOutput(consoleMessage);
|
||||
AddConsoleOutput(consoleMessage);
|
||||
}
|
||||
if (popupMessage) {
|
||||
UI.PopupMessage(popupMessage);
|
||||
}
|
||||
});
|
||||
hubConnection.on("DisplayConsoleHTML", (message) => {
|
||||
UI.AddConsoleHTML(message);
|
||||
AddConsoleHTML(message);
|
||||
});
|
||||
hubConnection.on("TransferCompleted", (transferID) => {
|
||||
var completedWrapper = document.getElementById(transferID + "-completed");
|
||||
@ -128,7 +129,7 @@ function applyMessageHandlers(hubConnection) {
|
||||
xhr.send();
|
||||
});
|
||||
hubConnection.on("CommandContextCreated", (context) => {
|
||||
UI.AddConsoleHTML(CreateCommandHarness(context).outerHTML);
|
||||
AddConsoleHTML(CreateCommandHarness(context).outerHTML);
|
||||
});
|
||||
hubConnection.on("ServiceID", (serviceID) => {
|
||||
ServiceID = serviceID;
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -7,8 +7,8 @@ import { CommandContext } from "./Models/CommandContext.js";
|
||||
import { CreateCommandHarness, AddCommandResultsHarness, AddPSCoreResultsHarness, UpdateResultsCount } from "./ResultsParser.js";
|
||||
import { Store } from "./Store.js";
|
||||
import { UserOptions } from "./Models/UserOptions.js";
|
||||
import { UserSettings } from "./UserSettings.js";
|
||||
import { Main } from "./Main.js";
|
||||
import { AddConsoleOutput, AddConsoleHTML } from "./Console.js";
|
||||
|
||||
|
||||
export var Connection: any;
|
||||
@ -28,7 +28,7 @@ export function Connect() {
|
||||
Connection.start().catch(err => {
|
||||
console.error(err.toString());
|
||||
Connected = false;
|
||||
UI.AddConsoleOutput("Your connection was lost. Refresh the page or enter a command to reconnect.");
|
||||
AddConsoleOutput("Your connection was lost. Refresh the page or enter a command to reconnect.");
|
||||
}).then(() => {
|
||||
Connected = true;
|
||||
})
|
||||
@ -38,7 +38,7 @@ export function Connect() {
|
||||
UI.ShowModal("Connection Failure",
|
||||
"Your connection was lost. Click Reconnect to start a new session.",
|
||||
`<button type="button" class="btn btn-secondary" onclick="location.reload()">Reconnect</button>`);
|
||||
UI.AddConsoleOutput("Connection lost.");
|
||||
AddConsoleOutput("Connection lost.");
|
||||
}
|
||||
});
|
||||
};
|
||||
@ -50,7 +50,7 @@ function applyMessageHandlers(hubConnection) {
|
||||
Main.UserSettings.CommandModeShortcuts.WinPS = options.CommandModeShortcutWinPS;
|
||||
Main.UserSettings.CommandModeShortcuts.Bash = options.CommandModeShortcutBash;
|
||||
Main.UserSettings.CommandModeShortcuts.CMD = options.CommandModeShortcutCMD;
|
||||
UI.AddConsoleOutput("Console connected.");
|
||||
AddConsoleOutput("Console connected.");
|
||||
DataGrid.RefreshGrid();
|
||||
});
|
||||
hubConnection.on("LockedOut", (args) => {
|
||||
@ -81,14 +81,14 @@ function applyMessageHandlers(hubConnection) {
|
||||
});
|
||||
hubConnection.on("DisplayMessage", (consoleMessage: string, popupMessage: string) => {
|
||||
if (consoleMessage) {
|
||||
UI.AddConsoleOutput(consoleMessage);
|
||||
AddConsoleOutput(consoleMessage);
|
||||
}
|
||||
if (popupMessage) {
|
||||
UI.PopupMessage(popupMessage);
|
||||
}
|
||||
});
|
||||
hubConnection.on("DisplayConsoleHTML", (message: string) => {
|
||||
UI.AddConsoleHTML(message);
|
||||
AddConsoleHTML(message);
|
||||
});
|
||||
|
||||
hubConnection.on("TransferCompleted", (transferID: string) => {
|
||||
@ -145,7 +145,7 @@ function applyMessageHandlers(hubConnection) {
|
||||
xhr.send();
|
||||
});
|
||||
hubConnection.on("CommandContextCreated", (context: CommandContext) => {
|
||||
UI.AddConsoleHTML(CreateCommandHarness(context).outerHTML);
|
||||
AddConsoleHTML(CreateCommandHarness(context).outerHTML);
|
||||
});
|
||||
hubConnection.on("ServiceID", (serviceID: string) => {
|
||||
ServiceID = serviceID;
|
||||
|
||||
@ -6,7 +6,6 @@ import { CMDCommands } from "./Commands/CMDCommands.js";
|
||||
import { PSCoreCommands } from "./Commands/PSCoreCommands.js";
|
||||
import { WinPSCommands } from "./Commands/WinPSCommands.js";
|
||||
import { BashCommands } from "./Commands/BashCommands.js";
|
||||
var commandCompletionDisplayTimeout;
|
||||
export function DisplayCommandCompletions(commands, relevantText) {
|
||||
Store.CommandCompletionTimeout = window.setTimeout(() => {
|
||||
commands.forEach(x => {
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -10,8 +10,6 @@ import { PSCoreCommands } from "./Commands/PSCoreCommands.js";
|
||||
import { WinPSCommands } from "./Commands/WinPSCommands.js";
|
||||
import { BashCommands } from "./Commands/BashCommands.js";
|
||||
|
||||
var commandCompletionDisplayTimeout;
|
||||
|
||||
export function DisplayCommandCompletions(commands: Array<ConsoleCommand>, relevantText: string) {
|
||||
Store.CommandCompletionTimeout = window.setTimeout(() => {
|
||||
commands.forEach(x => {
|
||||
|
||||
@ -6,8 +6,9 @@ import * as UI from "./UI.js";
|
||||
import { Store } from "./Store.js";
|
||||
import { DisplayCommandShortcuts, DisplayCommandCompletions, DisplayParameterCompletions, GetCommandCompletions } from "./CommandCompletion.js";
|
||||
import { Connection } from "./BrowserSockets.js";
|
||||
import { AutoSizeTextArea, AddConsoleOutput } from "./Console.js";
|
||||
export function EvaluateCurrentCommandText() {
|
||||
UI.AutoSizeTextArea();
|
||||
AutoSizeTextArea();
|
||||
window.clearTimeout(Store.CommandCompletionTimeout);
|
||||
UI.CommandCompletionDiv.classList.add("hidden");
|
||||
UI.CommandInfoDiv.classList.add("hidden");
|
||||
@ -98,7 +99,7 @@ export function ProcessCommand() {
|
||||
matchingCommand.Execute(parameters);
|
||||
}
|
||||
else {
|
||||
UI.AddConsoleOutput("Unknown command.");
|
||||
AddConsoleOutput("Unknown command.");
|
||||
}
|
||||
break;
|
||||
case "PSCore":
|
||||
@ -109,15 +110,15 @@ export function ProcessCommand() {
|
||||
var windowsDevices = allDevices.filter(x => x.Platform.toLowerCase() == "windows");
|
||||
var linuxDevices = allDevices.filter(x => x.Platform.toLowerCase() == "linux");
|
||||
if (commandMode == "CMD" && linuxDevices.length > 0) {
|
||||
UI.AddConsoleOutput("Linux devices will be excluded from CMD command.");
|
||||
AddConsoleOutput("Linux devices will be excluded from CMD command.");
|
||||
allDevices = windowsDevices;
|
||||
}
|
||||
if (commandMode == "Bash" && windowsDevices.length > 0) {
|
||||
UI.AddConsoleOutput("Windows devices will be excluded from Bash command.");
|
||||
AddConsoleOutput("Windows devices will be excluded from Bash command.");
|
||||
allDevices = linuxDevices;
|
||||
}
|
||||
if (allDevices.length == 0) {
|
||||
UI.AddConsoleOutput("At least one device must be selected to send commands.");
|
||||
AddConsoleOutput("At least one device must be selected to send commands.");
|
||||
return;
|
||||
}
|
||||
var deviceIDs = allDevices.map(value => value.ID);
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -6,9 +6,10 @@ import * as UI from "./UI.js";
|
||||
import { Store } from "./Store.js";
|
||||
import { DisplayCommandShortcuts, DisplayCommandCompletions, DisplayParameterCompletions, GetCommandCompletions } from "./CommandCompletion.js";
|
||||
import { Connection } from "./BrowserSockets.js";
|
||||
import { AutoSizeTextArea, AddConsoleOutput } from "./Console.js";
|
||||
|
||||
export function EvaluateCurrentCommandText() {
|
||||
UI.AutoSizeTextArea();
|
||||
AutoSizeTextArea();
|
||||
window.clearTimeout(Store.CommandCompletionTimeout);
|
||||
|
||||
UI.CommandCompletionDiv.classList.add("hidden");
|
||||
@ -106,7 +107,7 @@ export function ProcessCommand() {
|
||||
matchingCommand.Execute(parameters);
|
||||
}
|
||||
else {
|
||||
UI.AddConsoleOutput("Unknown command.");
|
||||
AddConsoleOutput("Unknown command.");
|
||||
}
|
||||
break;
|
||||
case "PSCore":
|
||||
@ -118,16 +119,16 @@ export function ProcessCommand() {
|
||||
var linuxDevices = allDevices.filter(x => x.Platform.toLowerCase() == "linux");
|
||||
|
||||
if (commandMode == "CMD" && linuxDevices.length > 0) {
|
||||
UI.AddConsoleOutput("Linux devices will be excluded from CMD command.");
|
||||
AddConsoleOutput("Linux devices will be excluded from CMD command.");
|
||||
allDevices = windowsDevices;
|
||||
}
|
||||
if (commandMode == "Bash" && windowsDevices.length > 0) {
|
||||
UI.AddConsoleOutput("Windows devices will be excluded from Bash command.");
|
||||
AddConsoleOutput("Windows devices will be excluded from Bash command.");
|
||||
allDevices = linuxDevices;
|
||||
}
|
||||
|
||||
if (allDevices.length == 0) {
|
||||
UI.AddConsoleOutput("At least one device must be selected to send commands.");
|
||||
AddConsoleOutput("At least one device must be selected to send commands.");
|
||||
return;
|
||||
}
|
||||
var deviceIDs = allDevices.map(value => value.ID);
|
||||
|
||||
@ -4,7 +4,7 @@ import * as UI from "../UI.js";
|
||||
import * as BrowserSockets from "../BrowserSockets.js";
|
||||
import { Main } from "../Main.js";
|
||||
import * as DataGrid from "../DataGrid.js";
|
||||
import { AddConsoleOutput } from "../UI.js";
|
||||
import { AddConsoleHTML, AddConsoleOutput, AddTransferHarness } from "../Console.js";
|
||||
import { GetSelectedDevices } from "../DataGrid.js";
|
||||
var commands = [
|
||||
new ConsoleCommand("DeployScript", [
|
||||
@ -56,14 +56,14 @@ var commands = [
|
||||
});
|
||||
output += deviceList.join("");
|
||||
output += "</table>";
|
||||
UI.AddConsoleOutput(output);
|
||||
AddConsoleOutput(output);
|
||||
}),
|
||||
new ConsoleCommand("Clear", [], "Clears the output window of text.", "clear", "", (parameters, paramDictionary) => { UI.ConsoleOutputDiv.innerHTML = ""; }),
|
||||
new ConsoleCommand("Connect", [], "Connect or reconnect to the server.", "connect", "", (parameters, paramDictionary) => { BrowserSockets.Connect(); }),
|
||||
new ConsoleCommand("Echo", [
|
||||
new Parameter("message", "The text to display in the console.", "String")
|
||||
], "Writes a message to the console window.", "echo -message This will appear in the console.", "", (parameters, paramDictionary) => {
|
||||
UI.AddConsoleOutput(paramDictionary["message"]);
|
||||
AddConsoleOutput(paramDictionary["message"]);
|
||||
}),
|
||||
new ConsoleCommand("ExpandResults", [], "Expands the results of the last scripting command.", "expandresults", "", (parameters, paramDictionary) => {
|
||||
$(UI.ConsoleOutputDiv).find(".command-harness").last().find(".collapse")['collapse']('show');
|
||||
@ -88,23 +88,23 @@ var commands = [
|
||||
return command.Name.toLowerCase() == (suppliedCommand.Value || "").toLowerCase();
|
||||
});
|
||||
if (result.length == 0) {
|
||||
UI.AddConsoleOutput("No matching commands found.");
|
||||
AddConsoleOutput("No matching commands found.");
|
||||
}
|
||||
else if (result.length == 1) {
|
||||
UI.AddConsoleHTML("<br>" + result[0].FullHelp);
|
||||
AddConsoleHTML("<br>" + result[0].FullHelp);
|
||||
}
|
||||
else {
|
||||
var outputText = "Multiple commands found: <br><br>";
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
outputText += result[i].Name + "<br>";
|
||||
}
|
||||
UI.AddConsoleHTML(outputText);
|
||||
AddConsoleHTML(outputText);
|
||||
}
|
||||
}),
|
||||
new ConsoleCommand("List", [], "Displays a list of the currently-selected devices.", "list", "", () => {
|
||||
var selectedDevices = Main.DataGrid.GetSelectedDevices();
|
||||
if (selectedDevices.length == 0) {
|
||||
UI.AddConsoleOutput("No devices are selected.");
|
||||
AddConsoleOutput("No devices are selected.");
|
||||
return;
|
||||
}
|
||||
var output = `<div>Selected Devices:</div>
|
||||
@ -131,12 +131,12 @@ var commands = [
|
||||
});
|
||||
output += deviceList.join("");
|
||||
output += "</table>";
|
||||
UI.AddConsoleOutput(output);
|
||||
AddConsoleOutput(output);
|
||||
}),
|
||||
new ConsoleCommand("Remove", [], "Removes the selected devices from the database. (Note: This does not attempt to uninstall the client. Use Uninstall.)", "remove", "", (parameters) => {
|
||||
var devices = DataGrid.GetSelectedDevices();
|
||||
if (devices.length == 0) {
|
||||
UI.AddConsoleOutput("No devices are selected.");
|
||||
AddConsoleOutput("No devices are selected.");
|
||||
}
|
||||
else {
|
||||
BrowserSockets.Connection.invoke("RemoveDevices", devices.map(x => x.ID));
|
||||
@ -164,6 +164,7 @@ var commands = [
|
||||
<ul style="list-style:none">
|
||||
<li>IsOnline (true or false)</li>
|
||||
<li>DeviceName (text)</li>
|
||||
<li>Alias (text)</li>
|
||||
<li>CurrentUser (text)</li>
|
||||
<li>LastOnline (date or date+time</li>
|
||||
<li>Is64Bit (true or false)</li>
|
||||
@ -179,19 +180,19 @@ var commands = [
|
||||
Main.DataGrid.DataSource.forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["none"] != "undefined") {
|
||||
Main.UI.DeviceGrid.querySelectorAll(".row-selected").forEach(x => {
|
||||
x.classList.remove("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["online"] != "undefined") {
|
||||
Main.DataGrid.DataSource.filter(x => x.IsOnline).forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["filter"] != "undefined") {
|
||||
try {
|
||||
@ -211,7 +212,7 @@ var commands = [
|
||||
case "*":
|
||||
case "!=":
|
||||
case "!*":
|
||||
UI.AddConsoleOutput("Only < and > operators can be used with dates.");
|
||||
AddConsoleOutput("Only < and > operators can be used with dates.");
|
||||
return;
|
||||
case ">":
|
||||
lambda += `Date.parse(x[Object.keys(x).find(y=>y.toLowerCase().indexOf("${key}") > -1)]) > ${parsedDate} && `;
|
||||
@ -226,16 +227,16 @@ var commands = [
|
||||
else {
|
||||
switch (operator) {
|
||||
case "=":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase() === "${value}".toString().toLowerCase() && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() === "${value}".toString().toLowerCase() && `;
|
||||
break;
|
||||
case "*":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `;
|
||||
break;
|
||||
case "!=":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase() !== "${value}".toString().toLowerCase() && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() !== "${value}".toString().toLowerCase() && `;
|
||||
break;
|
||||
case "!*":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `;
|
||||
break;
|
||||
case ">":
|
||||
lambda += `parseFloat(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)]) > parseFloat("${value}") && `;
|
||||
@ -250,7 +251,7 @@ var commands = [
|
||||
});
|
||||
}
|
||||
catch (ex) {
|
||||
UI.AddConsoleOutput("Unable to parse filter. Please check your syntax.");
|
||||
AddConsoleOutput("Unable to parse filter. Please check your syntax.");
|
||||
return;
|
||||
}
|
||||
lambda = lambda.slice(0, lambda.lastIndexOf(" &&"));
|
||||
@ -259,25 +260,32 @@ var commands = [
|
||||
x.classList.remove("row-selected");
|
||||
});
|
||||
}
|
||||
var selectedDevices = Main.DataGrid.DataSource.filter(x => eval(lambda));
|
||||
var selectedDevices = Main.DataGrid.DataSource.filter(x => {
|
||||
try {
|
||||
return eval(lambda);
|
||||
}
|
||||
catch (_a) {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
selectedDevices.forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
Main.DataGrid.UpdateDeviceCounts();
|
||||
}),
|
||||
new ConsoleCommand("RemoteControl", [], "Connect to a computer with Remotely Remote Control.", "list", "", () => {
|
||||
new ConsoleCommand("RemoteControl", [], "Connect to a computer with Remotely Remote Control.", "remotecontrol", "", () => {
|
||||
var selectedDevices = Main.DataGrid.GetSelectedDevices();
|
||||
if (selectedDevices.length == 0) {
|
||||
UI.AddConsoleOutput("You must select a device first.");
|
||||
AddConsoleOutput("You must select a device first.");
|
||||
return;
|
||||
}
|
||||
if (selectedDevices.length > 1) {
|
||||
UI.AddConsoleOutput("You can only initiate remote control on one device at a time.");
|
||||
AddConsoleOutput("You can only initiate remote control on one device at a time.");
|
||||
return;
|
||||
}
|
||||
UI.AddConsoleOutput("Launching remote control on client device...");
|
||||
AddConsoleOutput("Launching remote control on client device...");
|
||||
BrowserSockets.Connection.invoke("RemoteControl", selectedDevices[0].ID);
|
||||
}),
|
||||
new ConsoleCommand("Uninstall", [], "Uninstalls the Remotely client from the selected devices. Warning: This can't be undone from the web portal. You would need to redeploy the client.", "uninstall", "", (parameters, parameterDict) => {
|
||||
@ -309,7 +317,7 @@ var commands = [
|
||||
return;
|
||||
}
|
||||
var transferID = Main.Utilities.CreateGUID();
|
||||
UI.AddTransferHarness(transferID, selectedDevices.length);
|
||||
AddTransferHarness(transferID, selectedDevices.length);
|
||||
var fileInput = document.createElement("input");
|
||||
fileInput.type = "file";
|
||||
fileInput.hidden = true;
|
||||
@ -326,7 +334,7 @@ var commands = [
|
||||
];
|
||||
function uploadFiles(fileList) {
|
||||
return new Promise((resolve, reject) => {
|
||||
UI.AddConsoleOutput("File upload started...");
|
||||
AddConsoleOutput("File upload started...");
|
||||
var strPath = "/API/FileSharing/";
|
||||
var fd = new FormData();
|
||||
for (var i = 0; i < fileList.length; i++) {
|
||||
@ -336,20 +344,20 @@ function uploadFiles(fileList) {
|
||||
xhr.open('POST', strPath, true);
|
||||
xhr.addEventListener("load", function () {
|
||||
if (xhr.status === 200) {
|
||||
UI.AddConsoleOutput("File upload completed.");
|
||||
AddConsoleOutput("File upload completed.");
|
||||
resolve(JSON.parse(xhr.responseText));
|
||||
}
|
||||
else {
|
||||
UI.AddConsoleOutput("File upload failed.");
|
||||
AddConsoleOutput("File upload failed.");
|
||||
reject();
|
||||
}
|
||||
});
|
||||
xhr.addEventListener("error", () => {
|
||||
UI.AddConsoleOutput("File upload failed.");
|
||||
AddConsoleOutput("File upload failed.");
|
||||
reject();
|
||||
});
|
||||
xhr.addEventListener("progress", function (e) {
|
||||
UI.AddConsoleOutput("File upload progress: " + String(isFinite(e.loaded / e.total) ? e.loaded / e.total : 0) + "%");
|
||||
AddConsoleOutput("File upload progress: " + String(isFinite(e.loaded / e.total) ? e.loaded / e.total : 0) + "%");
|
||||
});
|
||||
xhr.send(fd);
|
||||
});
|
||||
|
||||
File diff suppressed because one or more lines are too long
@ -1,12 +1,11 @@
|
||||
import { ConsoleCommand } from "../Models/ConsoleCommand.js"
|
||||
import { Parameter } from "../Models/Parameter.js";
|
||||
import { Device } from "../Models/Device.js";
|
||||
import * as UI from "../UI.js";
|
||||
import * as BrowserSockets from "../BrowserSockets.js";
|
||||
import { CommandLineParameter } from "../Models/CommandLineParameter.js";
|
||||
import { Main } from "../Main.js";
|
||||
import * as DataGrid from "../DataGrid.js";
|
||||
import { AddConsoleHTML, AddConsoleOutput } from "../UI.js";
|
||||
import { AddConsoleHTML, AddConsoleOutput, AddTransferHarness } from "../Console.js";
|
||||
import { GetSelectedDevices } from "../DataGrid.js";
|
||||
|
||||
|
||||
@ -75,7 +74,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
});
|
||||
output += deviceList.join("");
|
||||
output += "</table>";
|
||||
UI.AddConsoleOutput(output);
|
||||
AddConsoleOutput(output);
|
||||
}
|
||||
),
|
||||
new ConsoleCommand(
|
||||
@ -105,7 +104,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
"echo -message This will appear in the console.",
|
||||
"",
|
||||
(parameters, paramDictionary) => {
|
||||
UI.AddConsoleOutput(paramDictionary["message"]);
|
||||
AddConsoleOutput(paramDictionary["message"]);
|
||||
}
|
||||
),
|
||||
new ConsoleCommand(
|
||||
@ -155,17 +154,17 @@ var commands: Array<ConsoleCommand> = [
|
||||
return command.Name.toLowerCase() == (suppliedCommand.Value || "").toLowerCase();
|
||||
});
|
||||
if (result.length == 0) {
|
||||
UI.AddConsoleOutput("No matching commands found.");
|
||||
AddConsoleOutput("No matching commands found.");
|
||||
}
|
||||
else if (result.length == 1) {
|
||||
UI.AddConsoleHTML("<br>" + result[0].FullHelp);
|
||||
AddConsoleHTML("<br>" + result[0].FullHelp);
|
||||
}
|
||||
else {
|
||||
var outputText = "Multiple commands found: <br><br>";
|
||||
for (var i = 0; i < result.length; i++) {
|
||||
outputText += result[i].Name + "<br>";
|
||||
}
|
||||
UI.AddConsoleHTML(outputText);
|
||||
AddConsoleHTML(outputText);
|
||||
}
|
||||
}
|
||||
),
|
||||
@ -179,7 +178,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
var selectedDevices = Main.DataGrid.GetSelectedDevices();
|
||||
|
||||
if (selectedDevices.length == 0) {
|
||||
UI.AddConsoleOutput("No devices are selected.");
|
||||
AddConsoleOutput("No devices are selected.");
|
||||
return;
|
||||
}
|
||||
var output = `<div>Selected Devices:</div>
|
||||
@ -207,7 +206,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
});
|
||||
output += deviceList.join("");
|
||||
output += "</table>";
|
||||
UI.AddConsoleOutput(output);
|
||||
AddConsoleOutput(output);
|
||||
}
|
||||
),
|
||||
new ConsoleCommand(
|
||||
@ -221,7 +220,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
(parameters) => {
|
||||
var devices = DataGrid.GetSelectedDevices();
|
||||
if (devices.length == 0) {
|
||||
UI.AddConsoleOutput("No devices are selected.");
|
||||
AddConsoleOutput("No devices are selected.");
|
||||
}
|
||||
else {
|
||||
BrowserSockets.Connection.invoke("RemoveDevices", devices.map(x=>x.ID));
|
||||
@ -255,6 +254,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
<ul style="list-style:none">
|
||||
<li>IsOnline (true or false)</li>
|
||||
<li>DeviceName (text)</li>
|
||||
<li>Alias (text)</li>
|
||||
<li>CurrentUser (text)</li>
|
||||
<li>LastOnline (date or date+time</li>
|
||||
<li>Is64Bit (true or false)</li>
|
||||
@ -272,19 +272,19 @@ var commands: Array<ConsoleCommand> = [
|
||||
Main.DataGrid.DataSource.forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
})
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["none"] != "undefined") {
|
||||
Main.UI.DeviceGrid.querySelectorAll(".row-selected").forEach(x => {
|
||||
x.classList.remove("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["online"] != "undefined") {
|
||||
Main.DataGrid.DataSource.filter(x => x.IsOnline).forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
if (typeof paramDictionary["filter"] != "undefined") {
|
||||
try {
|
||||
@ -305,7 +305,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
case "*":
|
||||
case "!=":
|
||||
case "!*":
|
||||
UI.AddConsoleOutput("Only < and > operators can be used with dates.");
|
||||
AddConsoleOutput("Only < and > operators can be used with dates.");
|
||||
return;
|
||||
case ">":
|
||||
lambda += `Date.parse(x[Object.keys(x).find(y=>y.toLowerCase().indexOf("${key}") > -1)]) > ${parsedDate} && `;
|
||||
@ -320,16 +320,16 @@ var commands: Array<ConsoleCommand> = [
|
||||
else {
|
||||
switch (operator) {
|
||||
case "=":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase() === "${value}".toString().toLowerCase() && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() === "${value}".toString().toLowerCase() && `;
|
||||
break;
|
||||
case "*":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) > -1 && `;
|
||||
break;
|
||||
case "!=":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase() !== "${value}".toString().toLowerCase() && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase() !== "${value}".toString().toLowerCase() && `;
|
||||
break;
|
||||
case "!*":
|
||||
lambda += `x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)].toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `;
|
||||
lambda += `(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)] || "").toString().toLowerCase().search("${value}".toString().toLowerCase()) === -1 && `;
|
||||
break;
|
||||
case ">":
|
||||
lambda += `parseFloat(x[Object.keys(x).find(y=>y.toString().toLowerCase().indexOf("${key}") > -1)]) > parseFloat("${value}") && `;
|
||||
@ -345,7 +345,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
})
|
||||
}
|
||||
catch (ex) {
|
||||
UI.AddConsoleOutput("Unable to parse filter. Please check your syntax.");
|
||||
AddConsoleOutput("Unable to parse filter. Please check your syntax.");
|
||||
return;
|
||||
}
|
||||
lambda = lambda.slice(0, lambda.lastIndexOf(" &&"));
|
||||
@ -354,11 +354,18 @@ var commands: Array<ConsoleCommand> = [
|
||||
x.classList.remove("row-selected");
|
||||
});
|
||||
}
|
||||
var selectedDevices = Main.DataGrid.DataSource.filter(x => eval(lambda));
|
||||
var selectedDevices = Main.DataGrid.DataSource.filter(x => {
|
||||
try {
|
||||
return eval(lambda);
|
||||
}
|
||||
catch {
|
||||
return false;
|
||||
}
|
||||
});
|
||||
selectedDevices.forEach(x => {
|
||||
document.getElementById(x.ID).classList.add("row-selected");
|
||||
});
|
||||
UI.AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
AddConsoleOutput(`${GetSelectedDevices().length} devices selected.`);
|
||||
}
|
||||
|
||||
Main.DataGrid.UpdateDeviceCounts();
|
||||
@ -368,19 +375,19 @@ var commands: Array<ConsoleCommand> = [
|
||||
"RemoteControl",
|
||||
[],
|
||||
"Connect to a computer with Remotely Remote Control.",
|
||||
"list",
|
||||
"remotecontrol",
|
||||
"",
|
||||
() => {
|
||||
var selectedDevices = Main.DataGrid.GetSelectedDevices();
|
||||
if (selectedDevices.length == 0) {
|
||||
UI.AddConsoleOutput("You must select a device first.");
|
||||
AddConsoleOutput("You must select a device first.");
|
||||
return;
|
||||
}
|
||||
if (selectedDevices.length > 1) {
|
||||
UI.AddConsoleOutput("You can only initiate remote control on one device at a time.");
|
||||
AddConsoleOutput("You can only initiate remote control on one device at a time.");
|
||||
return;
|
||||
}
|
||||
UI.AddConsoleOutput("Launching remote control on client device...");
|
||||
AddConsoleOutput("Launching remote control on client device...");
|
||||
BrowserSockets.Connection.invoke("RemoteControl", selectedDevices[0].ID);
|
||||
}
|
||||
),
|
||||
@ -433,7 +440,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
return;
|
||||
}
|
||||
var transferID = Main.Utilities.CreateGUID();
|
||||
UI.AddTransferHarness(transferID, selectedDevices.length);
|
||||
AddTransferHarness(transferID, selectedDevices.length);
|
||||
var fileInput = document.createElement("input");
|
||||
fileInput.type = "file";
|
||||
fileInput.hidden = true;
|
||||
@ -452,7 +459,7 @@ var commands: Array<ConsoleCommand> = [
|
||||
|
||||
function uploadFiles(fileList: FileList): Promise<string[]> {
|
||||
return new Promise<string[]>((resolve, reject) => {
|
||||
UI.AddConsoleOutput("File upload started...");
|
||||
AddConsoleOutput("File upload started...");
|
||||
|
||||
var strPath = "/API/FileSharing/";
|
||||
var fd = new FormData();
|
||||
@ -463,20 +470,20 @@ function uploadFiles(fileList: FileList): Promise<string[]> {
|
||||
xhr.open('POST', strPath, true);
|
||||
xhr.addEventListener("load", function () {
|
||||
if (xhr.status === 200) {
|
||||
UI.AddConsoleOutput("File upload completed.");
|
||||
AddConsoleOutput("File upload completed.");
|
||||
resolve(JSON.parse(xhr.responseText));
|
||||
}
|
||||
else {
|
||||
UI.AddConsoleOutput("File upload failed.");
|
||||
AddConsoleOutput("File upload failed.");
|
||||
reject();
|
||||
}
|
||||
});
|
||||
xhr.addEventListener("error", () => {
|
||||
UI.AddConsoleOutput("File upload failed.");
|
||||
AddConsoleOutput("File upload failed.");
|
||||
reject();
|
||||
});
|
||||
xhr.addEventListener("progress", function (e) {
|
||||
UI.AddConsoleOutput("File upload progress: " + String(isFinite(e.loaded / e.total) ? e.loaded / e.total : 0) + "%");
|
||||
AddConsoleOutput("File upload progress: " + String(isFinite(e.loaded / e.total) ? e.loaded / e.total : 0) + "%");
|
||||
});
|
||||
xhr.send(fd);
|
||||
})
|
||||
|
||||
42
Server/wwwroot/scripts/Console.js
Normal file
42
Server/wwwroot/scripts/Console.js
Normal file
@ -0,0 +1,42 @@
|
||||
import { UserSettings } from "./UserSettings.js";
|
||||
import { ConsoleOutputDiv, ConsoleFrame, ConsoleTab, ConsoleAlert, ConsoleTextArea } from "./UI.js";
|
||||
export function AddConsoleOutput(strOutputMessage) {
|
||||
var outputBlock = document.createElement("div");
|
||||
outputBlock.classList.add("console-block");
|
||||
var prompt = document.createElement("div");
|
||||
prompt.classList.add("console-prompt");
|
||||
prompt.innerHTML = UserSettings.PromptString;
|
||||
var output = document.createElement("div");
|
||||
output.classList.add("console-output");
|
||||
output.innerHTML = strOutputMessage;
|
||||
outputBlock.appendChild(prompt);
|
||||
outputBlock.appendChild(output);
|
||||
ConsoleOutputDiv.appendChild(outputBlock);
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
if (!ConsoleTab.classList.contains("active")) {
|
||||
ConsoleAlert.hidden = false;
|
||||
}
|
||||
}
|
||||
export function AddConsoleHTML(html) {
|
||||
var contentWrapper = document.createElement("div");
|
||||
contentWrapper.innerHTML = html;
|
||||
ConsoleOutputDiv.appendChild(contentWrapper);
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
}
|
||||
export function AddTransferHarness(transferID, totalDevices) {
|
||||
var transferHarness = document.createElement("div");
|
||||
transferHarness.id = transferID;
|
||||
transferHarness.classList.add("command-harness");
|
||||
transferHarness.innerHTML = `
|
||||
<div class="command-harness-title">
|
||||
File Transfer Status |
|
||||
Total Devices: ${totalDevices} |
|
||||
Completed: <span id="${transferID}-completed">0</span>
|
||||
</div>`;
|
||||
AddConsoleHTML(transferHarness.outerHTML);
|
||||
}
|
||||
export function AutoSizeTextArea() {
|
||||
ConsoleTextArea.style.height = "1px";
|
||||
ConsoleTextArea.style.height = Math.max(12, ConsoleTextArea.scrollHeight) + "px";
|
||||
}
|
||||
//# sourceMappingURL=Console.js.map
|
||||
1
Server/wwwroot/scripts/Console.js.map
Normal file
1
Server/wwwroot/scripts/Console.js.map
Normal file
@ -0,0 +1 @@
|
||||
{"version":3,"file":"Console.js","sourceRoot":"","sources":["Console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,gBAAgB,EAAE,YAAY,EAAE,UAAU,EAAE,YAAY,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAEpG,MAAM,UAAU,gBAAgB,CAAC,gBAAwB;IACrD,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAE3C,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;IAE7C,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,gBAAgB,CAAC;IAEpC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEhC,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE1C,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;IAEnD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC1C,YAAY,CAAC,MAAM,GAAG,KAAK,CAAC;KAC/B;AACL,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,IAAY;IACvC,IAAI,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAE7C,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;AACvD,CAAC;AACD,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,YAAoB;IACvE,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,eAAe,CAAC,EAAE,GAAG,UAAU,CAAC;IAChC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjD,eAAe,CAAC,SAAS,GAAG;;;6BAGH,YAAY;mCACN,UAAU;eAC9B,CAAC;IACZ,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC;AACD,MAAM,UAAU,gBAAgB;IAC5B,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;IACrC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;AACrF,CAAC"}
|
||||
49
Server/wwwroot/scripts/Console.ts
Normal file
49
Server/wwwroot/scripts/Console.ts
Normal file
@ -0,0 +1,49 @@
|
||||
import { UserSettings } from "./UserSettings.js";
|
||||
import { ConsoleOutputDiv, ConsoleFrame, ConsoleTab, ConsoleAlert, ConsoleTextArea } from "./UI.js";
|
||||
|
||||
export function AddConsoleOutput(strOutputMessage: string) {
|
||||
var outputBlock = document.createElement("div");
|
||||
outputBlock.classList.add("console-block");
|
||||
|
||||
var prompt = document.createElement("div");
|
||||
prompt.classList.add("console-prompt");
|
||||
prompt.innerHTML = UserSettings.PromptString;
|
||||
|
||||
var output = document.createElement("div");
|
||||
output.classList.add("console-output");
|
||||
output.innerHTML = strOutputMessage;
|
||||
|
||||
outputBlock.appendChild(prompt);
|
||||
outputBlock.appendChild(output);
|
||||
|
||||
ConsoleOutputDiv.appendChild(outputBlock);
|
||||
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
|
||||
if (!ConsoleTab.classList.contains("active")) {
|
||||
ConsoleAlert.hidden = false;
|
||||
}
|
||||
}
|
||||
export function AddConsoleHTML(html: string) {
|
||||
var contentWrapper = document.createElement("div");
|
||||
contentWrapper.innerHTML = html;
|
||||
ConsoleOutputDiv.appendChild(contentWrapper);
|
||||
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
}
|
||||
export function AddTransferHarness(transferID: string, totalDevices: number) {
|
||||
var transferHarness = document.createElement("div");
|
||||
transferHarness.id = transferID;
|
||||
transferHarness.classList.add("command-harness");
|
||||
transferHarness.innerHTML = `
|
||||
<div class="command-harness-title">
|
||||
File Transfer Status |
|
||||
Total Devices: ${totalDevices} |
|
||||
Completed: <span id="${transferID}-completed">0</span>
|
||||
</div>`;
|
||||
AddConsoleHTML(transferHarness.outerHTML);
|
||||
}
|
||||
export function AutoSizeTextArea() {
|
||||
ConsoleTextArea.style.height = "1px";
|
||||
ConsoleTextArea.style.height = Math.max(12, ConsoleTextArea.scrollHeight) + "px";
|
||||
}
|
||||
@ -1,7 +1,13 @@
|
||||
import * as UI from "./UI.js";
|
||||
import { Main } from "./Main.js";
|
||||
import { DeviceGrid } from "./UI.js";
|
||||
import { AddConsoleOutput } from "./Console.js";
|
||||
export const DataSource = new Array();
|
||||
export const FilterOptions = new class {
|
||||
constructor() {
|
||||
this.ShowAllGroups = true;
|
||||
}
|
||||
};
|
||||
export function AddOrUpdateDevices(devices) {
|
||||
devices.forEach(x => {
|
||||
AddOrUpdateDevice(x);
|
||||
@ -55,31 +61,17 @@ export function AddOrUpdateDevice(device) {
|
||||
};
|
||||
UpdateDeviceCounts();
|
||||
}
|
||||
export function ApplyGroupFilter(groupID) {
|
||||
export function ApplyFilter() {
|
||||
for (var i = 0; i < DataSource.length; i++) {
|
||||
var row = document.getElementById(DataSource[i].ID);
|
||||
if (!groupID || DataSource[i].DeviceGroupID == groupID) {
|
||||
row.classList.remove("hidden");
|
||||
}
|
||||
else {
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
export function ApplySearchFilter(filterString) {
|
||||
for (var i = 0; i < DataSource.length; i++) {
|
||||
for (var key in DataSource[i]) {
|
||||
var value = DataSource[i][key];
|
||||
if (!value) {
|
||||
if (FilterOptions.ShowAllGroups ||
|
||||
(DataSource[i].DeviceGroupID || "") == (FilterOptions.GroupFilter || "")) {
|
||||
if (!FilterOptions.SearchFilter || deviceMatchesFilter(DataSource[i])) {
|
||||
row.classList.remove("hidden");
|
||||
continue;
|
||||
}
|
||||
var row = document.getElementById(DataSource[i].ID);
|
||||
if (value.toString().toLowerCase().includes(filterString)) {
|
||||
row.classList.remove("hidden");
|
||||
break;
|
||||
}
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
export function ClearAllData() {
|
||||
@ -108,7 +100,7 @@ export function RefreshGrid() {
|
||||
if (xhr.status == 200) {
|
||||
var devices = JSON.parse(xhr.responseText);
|
||||
if (devices.length == 0) {
|
||||
UI.AddConsoleOutput("It looks like you don't have the Remotely service installed on any devices. You can get the install script from the Client Downloads page.");
|
||||
AddConsoleOutput("It looks like you don't have the Remotely service installed on any devices. You can get the install script from the Client Downloads page.");
|
||||
}
|
||||
else {
|
||||
}
|
||||
@ -144,7 +136,19 @@ export function UpdateDeviceCounts() {
|
||||
UI.TotalDevicesCount.innerText = DataSource.length.toString();
|
||||
if (DataSource.some(x => x.IsOnline == false &&
|
||||
document.getElementById(x.ID).classList.contains("row-selected"))) {
|
||||
UI.AddConsoleOutput(`Your selection contains offline computers. Your commands will only be sent to those that are online.`);
|
||||
AddConsoleOutput(`Your selection contains offline computers. Your commands will only be sent to those that are online.`);
|
||||
}
|
||||
}
|
||||
function deviceMatchesFilter(device) {
|
||||
for (var key in device) {
|
||||
var value = device[key];
|
||||
if (!value) {
|
||||
continue;
|
||||
}
|
||||
if (value.toString().toLowerCase().includes(FilterOptions.SearchFilter.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
//# sourceMappingURL=DataGrid.js.map
|
||||
File diff suppressed because one or more lines are too long
@ -2,11 +2,16 @@
|
||||
import { Device } from "./Models/Device.js";
|
||||
import { Main } from "./Main.js";
|
||||
import { DeviceGrid } from "./UI.js";
|
||||
import * as BrowserSockets from "./BrowserSockets.js";
|
||||
import { CreateGUID } from "./Utilities.js";
|
||||
import { AddConsoleOutput } from "./Console.js";
|
||||
|
||||
|
||||
export const DataSource: Array<Device> = new Array<Device>();
|
||||
export const FilterOptions = new class {
|
||||
GroupFilter: string;
|
||||
SearchFilter: string;
|
||||
ShowAllGroups: boolean = true;
|
||||
};
|
||||
|
||||
|
||||
export function AddOrUpdateDevices(devices: Array<Device>) {
|
||||
devices.forEach(x => {
|
||||
@ -65,34 +70,20 @@ export function AddOrUpdateDevice(device: Device) {
|
||||
};
|
||||
UpdateDeviceCounts();
|
||||
}
|
||||
export function ApplyGroupFilter(groupID: string) {
|
||||
export function ApplyFilter() {
|
||||
for (var i = 0; i < DataSource.length; i++) {
|
||||
var row = document.getElementById(DataSource[i].ID);
|
||||
if (!groupID || DataSource[i].DeviceGroupID == groupID) {
|
||||
row.classList.remove("hidden");
|
||||
}
|
||||
else {
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
}
|
||||
export function ApplySearchFilter(filterString: string) {
|
||||
for (var i = 0; i < DataSource.length; i++) {
|
||||
for (var key in DataSource[i]) {
|
||||
var value = DataSource[i][key];
|
||||
if (!value) {
|
||||
if (FilterOptions.ShowAllGroups ||
|
||||
(DataSource[i].DeviceGroupID || "") == (FilterOptions.GroupFilter || "")) {
|
||||
if (!FilterOptions.SearchFilter || deviceMatchesFilter(DataSource[i])) {
|
||||
row.classList.remove("hidden");
|
||||
continue;
|
||||
}
|
||||
|
||||
var row = document.getElementById(DataSource[i].ID);
|
||||
if (value.toString().toLowerCase().includes(filterString)) {
|
||||
row.classList.remove("hidden");
|
||||
break;
|
||||
}
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
row.classList.add("hidden");
|
||||
}
|
||||
}
|
||||
|
||||
export function ClearAllData() {
|
||||
DataSource.splice(0, DataSource.length);
|
||||
UI.DeviceGrid.querySelectorAll(".record-row").forEach(row => {
|
||||
@ -118,7 +109,7 @@ export function RefreshGrid() {
|
||||
if (xhr.status == 200) {
|
||||
var devices = JSON.parse(xhr.responseText);
|
||||
if (devices.length == 0) {
|
||||
UI.AddConsoleOutput("It looks like you don't have the Remotely service installed on any devices. You can get the install script from the Client Downloads page.");
|
||||
AddConsoleOutput("It looks like you don't have the Remotely service installed on any devices. You can get the install script from the Client Downloads page.");
|
||||
}
|
||||
else {
|
||||
|
||||
@ -159,6 +150,19 @@ export function UpdateDeviceCounts() {
|
||||
x.IsOnline == false &&
|
||||
document.getElementById(x.ID).classList.contains("row-selected"))
|
||||
) {
|
||||
UI.AddConsoleOutput(`Your selection contains offline computers. Your commands will only be sent to those that are online.`);
|
||||
AddConsoleOutput(`Your selection contains offline computers. Your commands will only be sent to those that are online.`);
|
||||
}
|
||||
}
|
||||
|
||||
function deviceMatchesFilter(device: Device) {
|
||||
for (var key in device) {
|
||||
var value = device[key];
|
||||
if (!value) {
|
||||
continue;
|
||||
}
|
||||
if (value.toString().toLowerCase().includes(FilterOptions.SearchFilter.toLowerCase())) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@ -5,6 +5,7 @@ import { Store } from "./Store.js";
|
||||
import * as DataGrid from "./DataGrid.js";
|
||||
import * as BrowserSockets from "./BrowserSockets.js";
|
||||
import { WebCommands } from "./Commands/WebCommands.js";
|
||||
import { AddConsoleOutput } from "./Console.js";
|
||||
export function ApplyInputEventHandlers() {
|
||||
keyDownOnWindow();
|
||||
keyDownOnInputTextArea();
|
||||
@ -71,9 +72,9 @@ function keyDownOnInputTextArea() {
|
||||
}
|
||||
UI.CommandCompletionDiv.classList.add("hidden");
|
||||
UI.CommandInfoDiv.classList.add("hidden");
|
||||
UI.AddConsoleOutput(`<span class="echo-input">${UI.ConsoleTextArea.value}</span>`);
|
||||
AddConsoleOutput(`<span class="echo-input">${UI.ConsoleTextArea.value}</span>`);
|
||||
if (!BrowserSockets.Connected) {
|
||||
UI.AddConsoleOutput("Not connected. Reconnecting...");
|
||||
AddConsoleOutput("Not connected. Reconnecting...");
|
||||
BrowserSockets.Connect();
|
||||
return;
|
||||
}
|
||||
@ -144,9 +145,10 @@ function inputOnCommandTextArea() {
|
||||
});
|
||||
}
|
||||
function inputOnFilterTextBox() {
|
||||
document.querySelector("#gridFilter").addEventListener("input", (e) => {
|
||||
UI.GridFilter.addEventListener("input", (e) => {
|
||||
var currentText = e.currentTarget.value.toLowerCase();
|
||||
DataGrid.ApplySearchFilter(currentText);
|
||||
DataGrid.FilterOptions.SearchFilter = currentText;
|
||||
DataGrid.ApplyFilter();
|
||||
});
|
||||
}
|
||||
function consoleTabSelected() {
|
||||
@ -175,7 +177,14 @@ function clickStartRemoteControlButton() {
|
||||
}
|
||||
function deviceGroupSelectChanged() {
|
||||
UI.DeviceGroupSelect.addEventListener("change", (ev) => {
|
||||
DataGrid.ApplyGroupFilter(UI.DeviceGroupSelect.value);
|
||||
DataGrid.FilterOptions.GroupFilter = UI.DeviceGroupSelect.value;
|
||||
if (UI.DeviceGroupSelect.selectedIndex == 0) {
|
||||
DataGrid.FilterOptions.ShowAllGroups = true;
|
||||
}
|
||||
else {
|
||||
DataGrid.FilterOptions.ShowAllGroups = false;
|
||||
}
|
||||
DataGrid.ApplyFilter();
|
||||
});
|
||||
}
|
||||
//# sourceMappingURL=InputEventHandlers.js.map
|
||||
File diff suppressed because one or more lines are too long
@ -5,6 +5,7 @@ import { Store } from "./Store.js";
|
||||
import * as DataGrid from "./DataGrid.js";
|
||||
import * as BrowserSockets from "./BrowserSockets.js";
|
||||
import { WebCommands } from "./Commands/WebCommands.js";
|
||||
import { AddConsoleOutput } from "./Console.js";
|
||||
|
||||
|
||||
export function ApplyInputEventHandlers() {
|
||||
@ -76,9 +77,9 @@ function keyDownOnInputTextArea() {
|
||||
}
|
||||
UI.CommandCompletionDiv.classList.add("hidden");
|
||||
UI.CommandInfoDiv.classList.add("hidden");
|
||||
UI.AddConsoleOutput(`<span class="echo-input">${UI.ConsoleTextArea.value}</span>`);
|
||||
AddConsoleOutput(`<span class="echo-input">${UI.ConsoleTextArea.value}</span>`);
|
||||
if (!BrowserSockets.Connected) {
|
||||
UI.AddConsoleOutput("Not connected. Reconnecting...");
|
||||
AddConsoleOutput("Not connected. Reconnecting...");
|
||||
BrowserSockets.Connect();
|
||||
return;
|
||||
}
|
||||
@ -151,9 +152,10 @@ function inputOnCommandTextArea() {
|
||||
});
|
||||
}
|
||||
function inputOnFilterTextBox() {
|
||||
document.querySelector("#gridFilter").addEventListener("input", (e) => {
|
||||
UI.GridFilter.addEventListener("input", (e) => {
|
||||
var currentText = (e.currentTarget as HTMLInputElement).value.toLowerCase();
|
||||
DataGrid.ApplySearchFilter(currentText);
|
||||
DataGrid.FilterOptions.SearchFilter = currentText;
|
||||
DataGrid.ApplyFilter();
|
||||
})
|
||||
}
|
||||
function consoleTabSelected() {
|
||||
@ -184,6 +186,13 @@ function clickStartRemoteControlButton() {
|
||||
|
||||
function deviceGroupSelectChanged() {
|
||||
UI.DeviceGroupSelect.addEventListener("change", (ev) => {
|
||||
DataGrid.ApplyGroupFilter(UI.DeviceGroupSelect.value);
|
||||
DataGrid.FilterOptions.GroupFilter = UI.DeviceGroupSelect.value;
|
||||
if (UI.DeviceGroupSelect.selectedIndex == 0) {
|
||||
DataGrid.FilterOptions.ShowAllGroups = true;
|
||||
}
|
||||
else {
|
||||
DataGrid.FilterOptions.ShowAllGroups = false;
|
||||
}
|
||||
DataGrid.ApplyFilter();
|
||||
});
|
||||
}
|
||||
@ -6,10 +6,12 @@ import { CMDCommands } from "./Commands/CMDCommands.js";
|
||||
import { PSCoreCommands } from "./Commands/PSCoreCommands.js";
|
||||
import * as Utilities from "./Utilities.js";
|
||||
import * as DataGrid from "./DataGrid.js";
|
||||
import { Store } from "./Store.js";
|
||||
import { UserSettings } from "./UserSettings.js";
|
||||
import { WinPSCommands } from "./Commands/WinPSCommands.js";
|
||||
import { ApplyInputEventHandlers } from "./InputEventHandlers.js";
|
||||
import { Sound } from "./Sound.js";
|
||||
import * as Console from "./Console.js";
|
||||
var remotely = {
|
||||
Commands: {
|
||||
"Web": WebCommands,
|
||||
@ -18,13 +20,14 @@ var remotely = {
|
||||
"CMD": CMDCommands
|
||||
},
|
||||
CommandProcessor: CommandProcessor,
|
||||
Console: Console,
|
||||
DataGrid: DataGrid,
|
||||
UI: UI,
|
||||
Utilities: Utilities,
|
||||
Sockets: BrowserSockets,
|
||||
Storage: Storage,
|
||||
UserSettings: UserSettings,
|
||||
Sound: Sound,
|
||||
Store: Store,
|
||||
Init() {
|
||||
UI.ConsoleTextArea.focus();
|
||||
ApplyInputEventHandlers();
|
||||
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"Main.js","sourceRoot":"","sources":["Main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAE9D,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAE1C,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AAEnC,IAAI,QAAQ,GAAG;IACX,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,WAAW;KACrB;IACD,gBAAgB,EAAE,gBAAgB;IAClC,QAAQ,EAAE,QAAQ;IAClB,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,cAAc;IACvB,OAAO,EAAE,OAAO;IAChB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,IAAI;QACA,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAC;QAC1B,cAAc,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAC7B,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC"}
|
||||
{"version":3,"file":"Main.js","sourceRoot":"","sources":["Main.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,cAAc,MAAM,qBAAqB,CAAC;AACtD,OAAO,KAAK,EAAE,MAAM,SAAS,CAAC;AAC9B,OAAO,KAAK,gBAAgB,MAAM,uBAAuB,CAAC;AAC1D,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,WAAW,EAAE,MAAM,2BAA2B,CAAC;AACxD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAC9D,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAC5C,OAAO,KAAK,QAAQ,MAAM,eAAe,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,EAAE,YAAY,EAAE,MAAM,mBAAmB,CAAC;AACjD,OAAO,EAAE,aAAa,EAAE,MAAM,6BAA6B,CAAC;AAC5D,OAAO,EAAE,uBAAuB,EAAE,MAAM,yBAAyB,CAAC;AAClE,OAAO,EAAE,KAAK,EAAE,MAAM,YAAY,CAAC;AACnC,OAAO,KAAK,OAAO,MAAM,cAAc,CAAC;AAExC,IAAI,QAAQ,GAAG;IACX,QAAQ,EAAE;QACN,KAAK,EAAE,WAAW;QAClB,OAAO,EAAE,aAAa;QACtB,QAAQ,EAAE,cAAc;QACxB,KAAK,EAAE,WAAW;KACrB;IACD,gBAAgB,EAAE,gBAAgB;IAClC,OAAO,EAAE,OAAO;IAChB,QAAQ,EAAE,QAAQ;IAClB,EAAE,EAAE,EAAE;IACN,SAAS,EAAE,SAAS;IACpB,OAAO,EAAE,cAAc;IACvB,YAAY,EAAE,YAAY;IAC1B,KAAK,EAAE,KAAK;IACZ,KAAK,EAAE,KAAK;IACZ,IAAI;QACA,EAAE,CAAC,eAAe,CAAC,KAAK,EAAE,CAAC;QAC3B,uBAAuB,EAAE,CAAC;QAC1B,cAAc,CAAC,OAAO,EAAE,CAAC;IAC7B,CAAC;CACJ,CAAA;AAED,MAAM,CAAC,MAAM,IAAI,GAAG,QAAQ,CAAC;AAC7B,MAAM,CAAC,UAAU,CAAC,GAAG,QAAQ,CAAC"}
|
||||
@ -4,7 +4,6 @@ import * as CommandProcessor from "./CommandProcessor.js";
|
||||
import { WebCommands } from "./Commands/WebCommands.js";
|
||||
import { CMDCommands } from "./Commands/CMDCommands.js";
|
||||
import { PSCoreCommands } from "./Commands/PSCoreCommands.js";
|
||||
import { ConsoleCommand } from "./Models/ConsoleCommand.js";
|
||||
import * as Utilities from "./Utilities.js";
|
||||
import * as DataGrid from "./DataGrid.js";
|
||||
import { Store } from "./Store.js";
|
||||
@ -12,6 +11,7 @@ import { UserSettings } from "./UserSettings.js";
|
||||
import { WinPSCommands } from "./Commands/WinPSCommands.js";
|
||||
import { ApplyInputEventHandlers } from "./InputEventHandlers.js";
|
||||
import { Sound } from "./Sound.js";
|
||||
import * as Console from "./Console.js";
|
||||
|
||||
var remotely = {
|
||||
Commands: {
|
||||
@ -21,13 +21,14 @@ var remotely = {
|
||||
"CMD": CMDCommands
|
||||
},
|
||||
CommandProcessor: CommandProcessor,
|
||||
Console: Console,
|
||||
DataGrid: DataGrid,
|
||||
UI: UI,
|
||||
Utilities: Utilities,
|
||||
Sockets: BrowserSockets,
|
||||
Storage: Storage,
|
||||
UserSettings: UserSettings,
|
||||
Sound: Sound,
|
||||
Store: Store,
|
||||
Init() {
|
||||
UI.ConsoleTextArea.focus();
|
||||
ApplyInputEventHandlers();
|
||||
|
||||
@ -1,4 +1,3 @@
|
||||
import { UserSettings } from "./UserSettings.js";
|
||||
import * as Utilities from "./Utilities.js";
|
||||
export var CommandCompletionDiv = document.querySelector("#commandCompletionDiv");
|
||||
export var CommandInfoDiv = document.querySelector("#commandInfoDiv");
|
||||
@ -16,45 +15,7 @@ export var ConsoleFrame = document.getElementById("consoleFrame");
|
||||
export var ConsoleTab = document.getElementById("consoleTab");
|
||||
export var ConsoleAlert = document.getElementById("consoleAlert");
|
||||
export var DeviceGroupSelect = document.getElementById("deviceGroupSelect");
|
||||
export function AddConsoleOutput(strOutputMessage) {
|
||||
var outputBlock = document.createElement("div");
|
||||
outputBlock.classList.add("console-block");
|
||||
var prompt = document.createElement("div");
|
||||
prompt.classList.add("console-prompt");
|
||||
prompt.innerHTML = UserSettings.PromptString;
|
||||
var output = document.createElement("div");
|
||||
output.classList.add("console-output");
|
||||
output.innerHTML = strOutputMessage;
|
||||
outputBlock.appendChild(prompt);
|
||||
outputBlock.appendChild(output);
|
||||
ConsoleOutputDiv.appendChild(outputBlock);
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
if (!ConsoleTab.classList.contains("active")) {
|
||||
ConsoleAlert.hidden = false;
|
||||
}
|
||||
}
|
||||
export function AddConsoleHTML(html) {
|
||||
var contentWrapper = document.createElement("div");
|
||||
contentWrapper.innerHTML = html;
|
||||
ConsoleOutputDiv.appendChild(contentWrapper);
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
}
|
||||
export function AddTransferHarness(transferID, totalDevices) {
|
||||
var transferHarness = document.createElement("div");
|
||||
transferHarness.id = transferID;
|
||||
transferHarness.classList.add("command-harness");
|
||||
transferHarness.innerHTML = `
|
||||
<div class="command-harness-title">
|
||||
File Transfer Status |
|
||||
Total Devices: ${totalDevices} |
|
||||
Completed: <span id="${transferID}-completed">0</span>
|
||||
</div>`;
|
||||
AddConsoleHTML(transferHarness.outerHTML);
|
||||
}
|
||||
export function AutoSizeTextArea() {
|
||||
ConsoleTextArea.style.height = "1px";
|
||||
ConsoleTextArea.style.height = Math.max(12, ConsoleTextArea.scrollHeight) + "px";
|
||||
}
|
||||
export var GridFilter = document.getElementById("gridFilter");
|
||||
export function PopupMessage(message) {
|
||||
var messageDiv = document.createElement("div");
|
||||
messageDiv.classList.add("float-message");
|
||||
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"UI.js","sourceRoot":"","sources":["UI.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAC,MAAM,mBAAmB,CAAC;AAChD,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAI5C,MAAM,CAAC,IAAI,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAAmB,CAAC;AACpG,MAAM,CAAC,IAAI,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAmB,CAAC;AACxF,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAsB,CAAC;AACjG,MAAM,CAAC,IAAI,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAmB,CAAC;AAC5F,MAAM,CAAC,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAwB,CAAC;AAC/F,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAqB,CAAC;AAClF,MAAM,CAAC,IAAI,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,sBAAsB,CAAoB,CAAC;AACpG,MAAM,CAAC,IAAI,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAoB,CAAC;AAChG,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAoB,CAAC;AAC9F,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChE,MAAM,CAAC,IAAI,kBAAkB,GAAG,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACnE,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAmB,CAAC;AAC9F,MAAM,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAmB,CAAC;AACpF,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAsB,CAAC;AACnF,MAAM,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAsB,CAAC;AACvF,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAsB,CAAC;AAGjG,MAAM,UAAU,gBAAgB,CAAC,gBAAuB;IACpD,IAAI,WAAW,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAChD,WAAW,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAE3C,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;IAE7C,IAAI,MAAM,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC3C,MAAM,CAAC,SAAS,CAAC,GAAG,CAAC,gBAAgB,CAAC,CAAC;IACvC,MAAM,CAAC,SAAS,GAAG,gBAAgB,CAAC;IAEpC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAChC,WAAW,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC;IAEhC,gBAAgB,CAAC,WAAW,CAAC,WAAW,CAAC,CAAC;IAE1C,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;IAEnD,IAAI,CAAC,UAAU,CAAC,SAAS,CAAC,QAAQ,CAAC,QAAQ,CAAC,EAAE;QAC1C,YAAY,CAAC,MAAM,GAAG,KAAK,CAAC;KAC/B;AACL,CAAC;AACD,MAAM,UAAU,cAAc,CAAC,IAAY;IACvC,IAAI,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACnD,cAAc,CAAC,SAAS,GAAG,IAAI,CAAC;IAChC,gBAAgB,CAAC,WAAW,CAAC,cAAc,CAAC,CAAC;IAE7C,YAAY,CAAC,SAAS,GAAG,YAAY,CAAC,YAAY,CAAC;AACvD,CAAC;AACD,MAAM,UAAU,kBAAkB,CAAC,UAAkB,EAAE,YAAmB;IACtE,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IACpD,eAAe,CAAC,EAAE,GAAG,UAAU,CAAC;IAChC,eAAe,CAAC,SAAS,CAAC,GAAG,CAAC,iBAAiB,CAAC,CAAC;IACjD,eAAe,CAAC,SAAS,GAAG;;;6BAGH,YAAY;mCACN,UAAU;eAC9B,CAAC;IACZ,cAAc,CAAC,eAAe,CAAC,SAAS,CAAC,CAAC;AAC9C,CAAC;AACD,MAAM,UAAU,gBAAgB;IAC5B,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;IACrC,eAAe,CAAC,KAAK,CAAC,MAAM,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,EAAE,eAAe,CAAC,YAAY,CAAC,GAAG,IAAI,CAAC;AACrF,CAAC;AACD,MAAM,UAAU,YAAY,CAAC,OAAe;IACxC,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC1C,UAAU,CAAC,SAAS,GAAG,OAAO,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,aAAqB,EAAE,cAAsB,EAAE,EAAE,oBAAkC,IAAI;IAC5H,IAAI,OAAO,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;IACrC,IAAI,SAAS,GAAG,YAAY,OAAO;;;;0CAIG,KAAK;;;;;;kBAM7B,aAAa;;;kBAGb,WAAW;;;;;eAKd,CAAC;IACZ,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE;QACxC,IAAI;YACA,IAAI,iBAAiB,EAAE;gBACnB,iBAAiB,EAAE,CAAC;aACvB;SACJ;gBACO;YACH,EAAE,CAAC,aAA6B,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;SAC5D;IACL,CAAC,CAAC,CAAC;IACH,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC;AACtB,CAAC;AAAA,CAAC;AAEF,MAAM,UAAU,aAAa,CAAC,YAA8B;IACxD,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE;QAC/B,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;YACvB,QAAQ,EAAE,kHAAkH;YAC5H,KAAK,EAAE,YAAY,CAAC,iBAAiB;SACxC,CAAC,CAAC;QACH,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;KAChB;SACI;QACD,OAAO,IAAI,CAAC;KACf;AACL,CAAC"}
|
||||
{"version":3,"file":"UI.js","sourceRoot":"","sources":["UI.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,SAAS,MAAM,gBAAgB,CAAC;AAG5C,MAAM,CAAC,IAAI,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,uBAAuB,CAAmB,CAAC;AACpG,MAAM,CAAC,IAAI,cAAc,GAAG,QAAQ,CAAC,aAAa,CAAC,iBAAiB,CAAmB,CAAC;AACxF,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAsB,CAAC;AACjG,MAAM,CAAC,IAAI,gBAAgB,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAmB,CAAC;AAC5F,MAAM,CAAC,IAAI,eAAe,GAAG,QAAQ,CAAC,aAAa,CAAC,kBAAkB,CAAwB,CAAC;AAC/F,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,aAAa,CAAqB,CAAC;AAClF,MAAM,CAAC,IAAI,oBAAoB,GAAG,QAAQ,CAAC,aAAa,CAAC,sBAAsB,CAAoB,CAAC;AACpG,MAAM,CAAC,IAAI,kBAAkB,GAAG,QAAQ,CAAC,aAAa,CAAC,oBAAoB,CAAoB,CAAC;AAChG,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,mBAAmB,CAAoB,CAAC;AAC9F,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,aAAa,CAAC,QAAQ,CAAC,CAAC;AAChE,MAAM,CAAC,IAAI,kBAAkB,GAAG,iBAAiB,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC;AACnE,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAmB,CAAC;AAC9F,MAAM,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAmB,CAAC;AACpF,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAsB,CAAC;AACnF,MAAM,CAAC,IAAI,YAAY,GAAG,QAAQ,CAAC,cAAc,CAAC,cAAc,CAAsB,CAAC;AACvF,MAAM,CAAC,IAAI,iBAAiB,GAAG,QAAQ,CAAC,cAAc,CAAC,mBAAmB,CAAsB,CAAC;AACjG,MAAM,CAAC,IAAI,UAAU,GAAG,QAAQ,CAAC,cAAc,CAAC,YAAY,CAAqB,CAAC;AAGlF,MAAM,UAAU,YAAY,CAAC,OAAe;IACxC,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,UAAU,CAAC,SAAS,CAAC,GAAG,CAAC,eAAe,CAAC,CAAC;IAC1C,UAAU,CAAC,SAAS,GAAG,OAAO,CAAC;IAC/B,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,MAAM,CAAC,UAAU,CAAC,GAAG,EAAE;QACnB,UAAU,CAAC,MAAM,EAAE,CAAC;IACxB,CAAC,EAAE,IAAI,CAAC,CAAC;AACb,CAAC;AACD,MAAM,UAAU,SAAS,CAAC,KAAa,EAAE,aAAqB,EAAE,cAAsB,EAAE,EAAE,oBAAkC,IAAI;IAC5H,IAAI,OAAO,GAAG,SAAS,CAAC,UAAU,EAAE,CAAC;IACrC,IAAI,SAAS,GAAG,YAAY,OAAO;;;;0CAIG,KAAK;;;;;;kBAM7B,aAAa;;;kBAGb,WAAW;;;;;eAKd,CAAC;IACZ,IAAI,UAAU,GAAG,QAAQ,CAAC,aAAa,CAAC,KAAK,CAAC,CAAC;IAC/C,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,IAAI,CAAC,WAAW,CAAC,UAAU,CAAC,CAAC;IACtC,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,EAAE,CAAC,iBAAiB,EAAE,EAAE,CAAC,EAAE;QACxC,IAAI;YACA,IAAI,iBAAiB,EAAE;gBACnB,iBAAiB,EAAE,CAAC;aACvB;SACJ;gBACO;YACH,EAAE,CAAC,aAA6B,CAAC,aAAa,CAAC,MAAM,EAAE,CAAC;SAC5D;IACL,CAAC,CAAC,CAAC;IACH,CAAC,CAAC,GAAG,GAAG,OAAO,CAAC,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC/B,OAAO,UAAU,CAAC;AACtB,CAAC;AAAA,CAAC;AACF,MAAM,UAAU,aAAa,CAAC,YAA8B;IACxD,IAAI,CAAC,YAAY,CAAC,aAAa,EAAE,EAAE;QAC/B,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC;YACvB,QAAQ,EAAE,kHAAkH;YAC5H,KAAK,EAAE,YAAY,CAAC,iBAAiB;SACxC,CAAC,CAAC;QACH,CAAC,CAAC,YAAY,CAAC,CAAC,SAAS,CAAC,CAAC,MAAM,CAAC,CAAC;QACnC,OAAO,KAAK,CAAC;KAChB;SACI;QACD,OAAO,IAAI,CAAC;KACf;AACL,CAAC"}
|
||||
@ -1,6 +1,4 @@
|
||||
import { UserSettings} from "./UserSettings.js";
|
||||
import * as Utilities from "./Utilities.js";
|
||||
import { GetSelectedDevices } from "./DataGrid.js";
|
||||
import * as Utilities from "./Utilities.js";
|
||||
|
||||
|
||||
export var CommandCompletionDiv = document.querySelector("#commandCompletionDiv") as HTMLDivElement;
|
||||
@ -19,54 +17,9 @@ export var ConsoleFrame = document.getElementById("consoleFrame") as HTMLDivElem
|
||||
export var ConsoleTab = document.getElementById("consoleTab") as HTMLAnchorElement;
|
||||
export var ConsoleAlert = document.getElementById("consoleAlert") as HTMLAnchorElement;
|
||||
export var DeviceGroupSelect = document.getElementById("deviceGroupSelect") as HTMLSelectElement;
|
||||
export var GridFilter = document.getElementById("gridFilter") as HTMLInputElement;
|
||||
|
||||
|
||||
export function AddConsoleOutput(strOutputMessage:string) {
|
||||
var outputBlock = document.createElement("div");
|
||||
outputBlock.classList.add("console-block");
|
||||
|
||||
var prompt = document.createElement("div");
|
||||
prompt.classList.add("console-prompt");
|
||||
prompt.innerHTML = UserSettings.PromptString;
|
||||
|
||||
var output = document.createElement("div");
|
||||
output.classList.add("console-output");
|
||||
output.innerHTML = strOutputMessage;
|
||||
|
||||
outputBlock.appendChild(prompt);
|
||||
outputBlock.appendChild(output);
|
||||
|
||||
ConsoleOutputDiv.appendChild(outputBlock);
|
||||
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
|
||||
if (!ConsoleTab.classList.contains("active")) {
|
||||
ConsoleAlert.hidden = false;
|
||||
}
|
||||
}
|
||||
export function AddConsoleHTML(html: string) {
|
||||
var contentWrapper = document.createElement("div");
|
||||
contentWrapper.innerHTML = html;
|
||||
ConsoleOutputDiv.appendChild(contentWrapper);
|
||||
|
||||
ConsoleFrame.scrollTop = ConsoleFrame.scrollHeight;
|
||||
}
|
||||
export function AddTransferHarness(transferID: string, totalDevices:number) {
|
||||
var transferHarness = document.createElement("div");
|
||||
transferHarness.id = transferID;
|
||||
transferHarness.classList.add("command-harness");
|
||||
transferHarness.innerHTML = `
|
||||
<div class="command-harness-title">
|
||||
File Transfer Status |
|
||||
Total Devices: ${totalDevices} |
|
||||
Completed: <span id="${transferID}-completed">0</span>
|
||||
</div>`;
|
||||
AddConsoleHTML(transferHarness.outerHTML);
|
||||
}
|
||||
export function AutoSizeTextArea() {
|
||||
ConsoleTextArea.style.height = "1px";
|
||||
ConsoleTextArea.style.height = Math.max(12, ConsoleTextArea.scrollHeight) + "px";
|
||||
}
|
||||
export function PopupMessage(message: string) {
|
||||
var messageDiv = document.createElement("div");
|
||||
messageDiv.classList.add("float-message");
|
||||
@ -113,7 +66,6 @@ export function ShowModal(title: string, modalBodyHtml: string, buttonsHTML: str
|
||||
$("#" + modalID).modal("show");
|
||||
return wrapperDiv;
|
||||
};
|
||||
|
||||
export function ValidateInput(inputElement: HTMLInputElement) {
|
||||
if (!inputElement.checkValidity()) {
|
||||
$(inputElement)["tooltip"]({
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
export const UserSettings = new class {
|
||||
constructor() {
|
||||
this.PromptString = "~>";
|
||||
this.CommandModeShortcuts = {
|
||||
"Web": "/web",
|
||||
"PSCore": "/pscore",
|
||||
"WinPS": "/winps",
|
||||
"CMD": "/cmd",
|
||||
"Bash": "/bash"
|
||||
};
|
||||
export const UserSettings = {
|
||||
PromptString: "~>",
|
||||
CommandModeShortcuts: {
|
||||
"Web": "/web",
|
||||
"PSCore": "/pscore",
|
||||
"WinPS": "/winps",
|
||||
"CMD": "/cmd",
|
||||
"Bash": "/bash"
|
||||
}
|
||||
};
|
||||
//# sourceMappingURL=UserSettings.js.map
|
||||
@ -1 +1 @@
|
||||
{"version":3,"file":"UserSettings.js","sourceRoot":"","sources":["UserSettings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG,IAAI;IAAA;QAC5B,iBAAY,GAAG,IAAI,CAAC;QAEpB,yBAAoB,GAAG;YACnB,KAAK,EAAE,MAAM;YACb,QAAQ,EAAE,SAAS;YACnB,OAAO,EAAE,QAAQ;YACjB,KAAK,EAAE,MAAM;YACb,MAAM,EAAE,OAAO;SAClB,CAAA;IACL,CAAC;CAAA,CAAA"}
|
||||
{"version":3,"file":"UserSettings.js","sourceRoot":"","sources":["UserSettings.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,YAAY,GAAG;IACxB,YAAY,EAAE,IAAI;IAElB,oBAAoB,EAAE;QAClB,KAAK,EAAE,MAAM;QACb,QAAQ,EAAE,SAAS;QACnB,OAAO,EAAE,QAAQ;QACjB,KAAK,EAAE,MAAM;QACb,MAAM,EAAE,OAAO;KAClB;CACJ,CAAA"}
|
||||
@ -1,7 +1,7 @@
|
||||
export const UserSettings = new class {
|
||||
PromptString = "~>";
|
||||
export const UserSettings = {
|
||||
PromptString: "~>",
|
||||
|
||||
CommandModeShortcuts = {
|
||||
CommandModeShortcuts: {
|
||||
"Web": "/web",
|
||||
"PSCore": "/pscore",
|
||||
"WinPS": "/winps",
|
||||
|
||||
@ -114,9 +114,9 @@ if ((Test-Path -Path "$Root\Agent\bin\Release\netcoreapp3.1\linux-x64\publish")
|
||||
|
||||
|
||||
# Publish Core clients.
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x64 --configuration Release --output "$Root\Agent\bin\Release\netcoreapp3.1\win10-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --configuration Release --output "$Root\Agent\bin\Release\netcoreapp3.1\linux-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x86 --configuration Release --output "$Root\Agent\bin\Release\netcoreapp3.1\win10-x86\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x64 --configuration Release --no-self-contained --output "$Root\Agent\bin\Release\netcoreapp3.1\win10-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --configuration Release --no-self-contained --output "$Root\Agent\bin\Release\netcoreapp3.1\linux-x64\publish" "$Root\Agent"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime win10-x86 --configuration Release --no-self-contained --output "$Root\Agent\bin\Release\netcoreapp3.1\win10-x86\publish" "$Root\Agent"
|
||||
|
||||
New-Item -Path "$Root\Agent\bin\Release\netcoreapp3.1\win10-x64\publish\ScreenCast\" -ItemType Directory -Force
|
||||
New-Item -Path "$Root\Agent\bin\Release\netcoreapp3.1\win10-x86\publish\ScreenCast\" -ItemType Directory -Force
|
||||
@ -124,35 +124,33 @@ New-Item -Path "$Root\Agent\bin\Release\netcoreapp3.1\linux-x64\publish\ScreenCa
|
||||
|
||||
|
||||
# Publish Linux ScreenCaster
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion --runtime linux-x64 --configuration Release --output "$Root\Agent\bin\Release\netcoreapp3.1\linux-x64\publish\ScreenCast\" "$Root\ScreenCast.Linux\"
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=linux-x64 "$Root\ScreenCast.Linux\"
|
||||
|
||||
# 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\"
|
||||
Move-Item -Path "$PublishDir\Remotely_Desktop" -Destination "$Root\Server\wwwroot\Downloads\Remotely_Desktop" -Force
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=linux-x64 "$Root\Desktop.Linux\"
|
||||
|
||||
|
||||
# Build .NET Framework ScreenCaster (32-bit)
|
||||
&"$MSBuildPath" "$Root\ScreenCast.Win" /t:Build /p:Configuration=Release /p:Platform=x86
|
||||
# Publish Windows ScreenCaster (32-bit)
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=win-x86 "$Root\ScreenCast.Win"
|
||||
|
||||
# Copy 32-bit .NET Framework ScreenCaster to Agent output folder.
|
||||
Get-ChildItem -Path "$Root\ScreenCast.Win\bin\x86\Release\" -Exclude "*.xml" | Copy-Item -Destination ".\Agent\bin\Release\netcoreapp3.1\win10-x86\publish\ScreenCast\" -Force
|
||||
# Publish Windows ScreenCaster (64-bit)
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=win-x64 "$Root\ScreenCast.Win"
|
||||
|
||||
# Build .NET Framework ScreenCaster (64-bit)
|
||||
&"$MSBuildPath" "$Root\ScreenCast.Win" /t:Build /p:Configuration=Release /p:Platform=x64
|
||||
# Publish Windows GUI App (64-bit)
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=win-x64 "$Root\Desktop.Win"
|
||||
|
||||
# Copy 64-bit .NET Framework ScreenCaster to Agent output folder.
|
||||
Get-ChildItem -Path "$Root\ScreenCast.Win\bin\x64\Release\" -Exclude "*.xml" | Copy-Item -Destination ".\Agent\bin\Release\netcoreapp3.1\win10-x64\publish\ScreenCast\" -Force
|
||||
|
||||
|
||||
# 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" -Force
|
||||
if ($SignAssemblies) {
|
||||
&"$Root\Utilities\signtool.exe" sign /f "$CertificatePath" /p $CertificatePassword /t http://timestamp.digicert.com "$Root\Server\wwwroot\Downloads\Remotely_Desktop.exe"
|
||||
&"$Root\Utilities\signtool.exe" sign /f "$CertificatePath" /p $CertificatePassword /t http://timestamp.digicert.com "$Root\Server\wwwroot\Downloads\Win-x64\Remotely_Desktop.exe"
|
||||
}
|
||||
|
||||
# Publish Windows GUI App (32-bit)
|
||||
dotnet publish /p:Version=$CurrentVersion /p:FileVersion=$CurrentVersion -p:PublishProfile=win-x86 "$Root\Desktop.Win"
|
||||
|
||||
if ($SignAssemblies) {
|
||||
&"$Root\Utilities\signtool.exe" sign /f "$CertificatePath" /p $CertificatePassword /t http://timestamp.digicert.com "$Root\Server\wwwroot\Downloads\Win-x86\Remotely_Desktop.exe"
|
||||
}
|
||||
|
||||
|
||||
|
||||
# Compress Core clients.
|
||||
$PublishDir = "$Root\Agent\bin\Release\netcoreapp3.1\win10-x64\publish"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user