Remove anything related to PlasticSCM

In thisPR https://github.cds.internal.unity3d.com/unity/unity/pull/6328 we remove the option to choose Plastic in Unity's internal version control.

We must remove the binaries from here too.
This commit is contained in:
Jairo Calleja 2021-11-03 16:36:26 +01:00
Родитель cdb5eea329
Коммит bf9d283d90
10 изменённых файлов: 2 добавлений и 396 удалений

Просмотреть файл

@ -14,7 +14,6 @@ artifacts:
builds:
paths:
- "Build/OSXx64/PerforcePlugin"
- "Build/OSXx64/PlasticSCMPlugin"
logs:
paths:
- "mac_build.txt"

Просмотреть файл

@ -14,7 +14,6 @@ artifacts:
builds:
paths:
- "Build/Win32/PerforcePlugin.exe"
- "Build/Win32/PlasticSCMPlugin.exe"
- "Build/Win32/PerforcePlugin.pdb"
logs:
paths:

Просмотреть файл

@ -23,13 +23,10 @@ OSX_SRCS = ./P4Plugin/Source/P4OSX.mm
OSX_MODULES = $(OSX_SRCS:.mm=.o)
P4PLUGIN_MODULES += $(OSX_MODULES)
PLASTICSCMPLUGIN_TARGET = PlasticSCMPlugin/PlasticSCMPlugin
default: all
all: P4Plugin PlasticSCMPlugin testserver
all: P4Plugin testserver
@mkdir -p Build/$(PLATFORM)
cp $(PLASTICSCMPLUGIN_TARGET) Build/$(PLATFORM)
testserver: $(TESTSERVER_TARGET)
@mkdir -p Build/$(PLATFORM)

Просмотреть файл

@ -1,79 +0,0 @@
using System;
using System.IO;
using System.Runtime.InteropServices;
using System.Text;
using Microsoft.Win32.SafeHandles;
namespace Codice.Unity3D
{
internal class PipeClient
{
[DllImport("kernel32.dll", SetLastError = true)]
public static extern SafeFileHandle CreateFile(
String pipeName,
uint dwDesiredAccess,
uint dwShareMode,
IntPtr lpSecurityAttributes,
uint dwCreationDisposition,
uint dwFlagsAndAttributes,
IntPtr hTemplate);
internal bool Connected
{
get { return mbConnected; }
}
internal void Connect()
{
this.mHandle =
CreateFile(
PIPE_NAME,
GENERIC_READ | GENERIC_WRITE,
0,
IntPtr.Zero,
OPEN_EXISTING,
FILE_FLAG_OVERLAPPED,
IntPtr.Zero);
//could not create handle - server probably not running
if (mHandle.IsInvalid)
return;
mbConnected = true;
mStream = new FileStream(
mHandle, FileAccess.ReadWrite, BUFFER_SIZE, true);
}
internal void SendMessage(string message)
{
ASCIIEncoding encoder = new ASCIIEncoding();
byte[] messageBuffer = encoder.GetBytes(message);
mStream.Write(messageBuffer, 0, messageBuffer.Length);
mStream.Flush();
}
internal void Close()
{
if (mStream != null)
mStream.Close();
if (mHandle != null)
mHandle.Close();
}
const uint GENERIC_READ = (0x80000000);
const uint GENERIC_WRITE = (0x40000000);
const uint OPEN_EXISTING = 3;
const uint FILE_FLAG_OVERLAPPED = (0x40000000);
const int BUFFER_SIZE = 4096;
const string PIPE_NAME = "\\\\.\\pipe\\UnityVCS";
FileStream mStream;
SafeFileHandle mHandle;
bool mbConnected;
}
}

Просмотреть файл

@ -1,76 +0,0 @@
#!/bin/bash
#
# PlasticSCMPlugin is the PlasticSCM's Unity plugin launcher script for Mac OS provided by Codice Software S.L.
#
EXE_TO_CHECK="PlasticSCMUnityPlugin"
EXE_DEFAULT_PATH="/usr/local/bin/PlasticSCMUnityPlugin"
EXE_FULL_PATH=""
RETVAL=0
start() {
startPlugin
RETVAL=$?
}
# Start PlasticSCM Unity Plugin
startPlugin() {
# Check if process file exists
EXE_FULL_PATH=$EXE_TO_CHECK
checkExe $EXE_FULL_PATH
exec_file_exists=$?
# fallback to the default install path in case of error
if [ $exec_file_exists -ne 0 ]
then
checkPath $EXE_DEFAULT_PATH
exec_file_exists=$?
if [ $exec_file_exists -eq 0 ]
then
EXE_FULL_PATH=$EXE_DEFAULT_PATH
fi
fi
if [ $exec_file_exists -eq 0 ]
then
exec $EXE_FULL_PATH
RETVAL=0
return
fi
notifyPlasticSCMNotInstalled
RETVAL=1
return
}
# Check whether plugin file exists
checkExe() {
which_retval=1
exe_path=`which $1`
which_retval=$?
if [ $which_retval -eq 0 ]
then
EXE_FULL_PATH=$exe_path
fi
return $which_retval
}
# Check path exists
checkPath() {
retval=1
if [ -f $1 ]; then
retval=0
fi
return $retval
}
# Notify error to Unity
notifyPlasticSCMNotInstalled() {
echo "e1:PlasticSCM not installed. Please visit http://www.plasticscm.com to download PlasticSCM or contact support team at: support@codicesoftware.com"
echo "r1:end of response"
}
# Starting point
start
exit $RETVAL

Просмотреть файл

@ -1,102 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup>
<Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration>
<Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform>
<ProductVersion>9.0.30729</ProductVersion>
<SchemaVersion>2.0</SchemaVersion>
<ProjectGuid>{6CB882FE-B944-4036-8229-06F2BA9C9D51}</ProjectGuid>
<OutputType>Exe</OutputType>
<AppDesignerFolder>Properties</AppDesignerFolder>
<RootNamespace>Codice.Unity3D</RootNamespace>
<AssemblyName>PlasticSCMPlugin</AssemblyName>
<TargetFrameworkVersion>v2.0</TargetFrameworkVersion>
<FileAlignment>512</FileAlignment>
<SccProjectName>
</SccProjectName>
<SccLocalPath>
</SccLocalPath>
<SccAuxPath>
</SccAuxPath>
<SccProvider>
</SccProvider>
<FileUpgradeFlags>
</FileUpgradeFlags>
<OldToolsVersion>3.5</OldToolsVersion>
<UpgradeBackupLocation />
<IsWebBootstrapper>false</IsWebBootstrapper>
<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>
<UseApplicationTrust>false</UseApplicationTrust>
<BootstrapperEnabled>true</BootstrapperEnabled>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
<DebugSymbols>true</DebugSymbols>
<DebugType>full</DebugType>
<Optimize>false</Optimize>
<OutputPath>..\Debug\</OutputPath>
<DefineConstants>DEBUG;TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' ">
<DebugType>pdbonly</DebugType>
<Optimize>true</Optimize>
<OutputPath>..\Release\</OutputPath>
<DefineConstants>TRACE</DefineConstants>
<ErrorReport>prompt</ErrorReport>
<WarningLevel>4</WarningLevel>
<PlatformTarget>AnyCPU</PlatformTarget>
</PropertyGroup>
<ItemGroup>
<Reference Include="System" />
<Reference Include="System.Data" />
<Reference Include="System.Xml" />
</ItemGroup>
<ItemGroup>
<Compile Include="PipeClient.cs" />
<Compile Include="Program.cs" />
</ItemGroup>
<ItemGroup>
<None Include="PlasticSCMPlugin" />
</ItemGroup>
<ItemGroup>
<BootstrapperPackage Include="Microsoft.Net.Client.3.5">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1 Client Profile</ProductName>
<Install>false</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Net.Framework.3.5.SP1">
<Visible>False</Visible>
<ProductName>.NET Framework 3.5 SP1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
<BootstrapperPackage Include="Microsoft.Windows.Installer.3.1">
<Visible>False</Visible>
<ProductName>Windows Installer 3.1</ProductName>
<Install>true</Install>
</BootstrapperPackage>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<PropertyGroup>
<PostBuildEvent>echo f | xcopy "$(SolutionDir)$(Configuration)\$(TargetFileName)" "$(SolutionDir)Build\Win32\$(TargetFileName)" /Y</PostBuildEvent>
</PropertyGroup>
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.
<Target Name="BeforeBuild">
</Target>
<Target Name="AfterBuild">
</Target>
-->
</Project>

Просмотреть файл

@ -1,127 +0,0 @@
using System;
using System.Collections.Specialized;
using System.Diagnostics;
using System.IO;
using System.Reflection;
namespace Codice.Unity3D
{
internal class InstallChecker
{
static void Main(string[] args)
{
string installPath = GetInstallFolder(PLUGIN_EXEC_NAME);
if (string.IsNullOrEmpty(installPath))
{
NotifyNotInstalled();
return;
}
ExecutePlugin(PLUGIN_EXEC_NAME);
}
private static string GetInstallFolder(string fileToCheck)
{
StringDictionary env =
Process.GetCurrentProcess().StartInfo.EnvironmentVariables;
string pathEnvVble = env["PATH"];
string[] paths = new string[] { };
paths = pathEnvVble.Split(new char[] { ';' });
foreach (string path in paths)
{
if (File.Exists(Path.Combine(path, fileToCheck)))
return path;
}
return string.Empty;
}
private static void NotifyNotInstalled()
{
try
{
UnityConnection conn = new UnityConnection();
conn.WriteLine(string.Format("e1:{0}", NOT_INSTALLED_MSG));
conn.WriteLine("r1:end of response");
conn.Close();
}
catch
{
//nothing to do.We cannot neither log nor crash
}
}
private static void ExecutePlugin(string execFile)
{
Process p = new Process();
p.StartInfo.FileName = execFile;
p.StartInfo.Arguments = string.Empty;
p.StartInfo.CreateNoWindow = true;
p.StartInfo.UseShellExecute = false;
p.StartInfo.RedirectStandardInput = true;
p.StartInfo.RedirectStandardOutput = true;
p.StartInfo.RedirectStandardError = true;
try
{
p.Start();
p.WaitForExit();
}
catch
{
//nothing to do.We cannot neither log nor crash
}
finally
{
if (p != null)
p.Close();
}
}
private static string GetExecutingLocation()
{
try
{
return Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
}
catch
{
return string.Empty;
}
}
const string PLUGIN_EXEC_NAME = "PlasticSCMUnityPlugin.exe";
const string NOT_INSTALLED_MSG =
"PlasticSCM not installed. Please visit http://www.plasticscm.com " +
"to download PlasticSCM or contact support team at: " +
"support@codicesoftware.com";
}
internal class UnityConnection
{
internal UnityConnection()
{
mClient = new PipeClient();
mClient.Connect();
}
internal void WriteLine(string message)
{
if (!mClient.Connected)
return;
mClient.SendMessage(
string.Format("{0}{1}", message, Environment.NewLine));
}
internal void Close()
{
mClient.Close();
}
PipeClient mClient;
}
}

Просмотреть файл

@ -4,7 +4,7 @@ This is the source code of the builtin version control plugins that are shipped
You can build support for you own favourite version control system into Unity by cloning this repository and make changes as needed.
Note that only Perforce support is shipped for Unity 4.2+, PlasticSCM for 4.3+, TFSPlugin for 4.6+.
Note that only Perforce support is shipped for Unity 4.2+, TFSPlugin for 4.6+.
#### Overview
@ -18,7 +18,6 @@ You need Unity 4.2+ to use the integrated version control plugins.
* Common/ contains structures and functionallity common to all plugins
* P4Plugin/ contains the Perforce plugin code and Perforce libraries (binaries shipped with Unity)
* PlasticSCMPlugn contains the Plastic plugin code (binaries shipped with Unity)
* TFSPlugin/ contains the Team Foundation Server/VS Online plugin code
* Test/ contains integration tests

Просмотреть файл

@ -5,8 +5,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "P4Plugin", "P4Plugin\P4Plug
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestServer", "Test\TestServer\TestServer.vcxproj", "{64C0D8D3-68C7-46C6-B341-0ED1C78B225B}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "PlasticSCMPlugin", "PlasticSCMPlugin\PlasticSCMPlugin.csproj", "{6CB882FE-B944-4036-8229-06F2BA9C9D51}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU

Просмотреть файл

@ -35,7 +35,6 @@ if ($clean)
}
}
unlink("PerforcePlugin");
unlink("PlasticSCMPlugin");
exit 0;
}
@ -144,7 +143,6 @@ sub BuildWin32
{
rmtree("Build");
system("msbuilder.cmd", "VersionControl.sln", "P4Plugin", "Win32") && die ("Failed to build PerforcePlugin.exe");
system("msbuilder.cmd", "VersionControl.sln", "PlasticSCMPlugin", "Any CPU") && die ("Failed to build PlasticSCMPlugin.exe");
system("msbuilder.cmd", "VersionControl.sln", "TestServer", "Win32") && die ("Failed to build TestServer.exe");
}