Skip to content

Commit dec8f64

Browse files
SirMetathystSirMetathyst
SirMetathyst
authored and
SirMetathyst
committed
Initial Commit
0 parents  commit dec8f64

File tree

46 files changed

+964
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

46 files changed

+964
-0
lines changed

.gitignore

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
[Dd]ebug/
2+
[Rr]elease/
3+
[Pp]ublish
4+
[Pp]ackage
5+
[Bb]in/
6+
[Oo]bj/
7+
[Ll]og/
8+
[Nn]uget/
9+
[Tt]ools/
10+
11+
*.speccache
12+
*.Linux.sln
13+
*.Windows.sln
14+
*.MacOS.sln
15+
16+
*.Linux.csproj
17+
*.Windows.csproj
18+
*.MacOS.csproj
19+
20+
.vs/
21+
.vscode/

Clean.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
find . -type d -name 'Publish' -exec rm -rf "{}" +
2+
find . -type d -name 'Package' -exec rm -rf "{}" +
3+
find . -type d -name 'bin' -exec rm -rf "{}" +
4+
find . -type d -name 'obj' -exec rm -rf "{}" +

Docker-Build.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
docker build --rm -t psythyst/psythyst-post-processor:latest .

Docker-Extract.sh

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
mkdir -p ./Publish
2+
DIRECTORY="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
3+
4+
DOCKER_VOLUME="$DIRECTORY/Publish:/Publish"
5+
DOCKER_COMMAND="cp -R /Psythyst.PostProcessor/Psythyst.Plugin.PostProcessor.Entitas/Psythyst.Plugin.PostProcessor.Entitas/Psythyst.Plugin.PostProcessor.Entitas/Publish /"
6+
DOCKER_IMAGE="psythyst/psythyst-post-processor:latest"
7+
8+
docker run -it --rm -v $DOCKER_VOLUME $DOCKER_IMAGE $DOCKER_COMMAND

Dockerfile

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
FROM microsoft/dotnet:sdk AS Build
2+
3+
# Build Psythyst
4+
WORKDIR /
5+
COPY ./ ./
6+
RUN dotnet restore
7+
RUN dotnet publish -c Release -o ./Publish

LICENCE.txt

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2017 Alexander Matthew Hunt
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

Psythyst.PostProcessor.sln

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio 15
4+
VisualStudioVersion = 15.0.26124.0
5+
MinimumVisualStudioVersion = 15.0.26124.0
6+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Psythyst.PostProcessor", "Psythyst.PostProcessor", "{844FD7FB-7741-4F27-A3CC-0693096F24F3}"
7+
EndProject
8+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Psythyst.Plugin.PostProcessor.Entitas", "Psythyst.Plugin.PostProcessor.Entitas", "{8A2FCFFF-318C-4706-9985-2211AFAF2699}"
9+
EndProject
10+
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Psythyst.Plugin.PostProcessor.Entitas", "Psythyst.Plugin.PostProcessor.Entitas", "{160BA953-C794-42DD-A22D-FCA5BE3C0F83}"
11+
EndProject
12+
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Psythyst.Plugin.PostProcessor.Entitas", "Psythyst.PostProcessor\Psythyst.Plugin.PostProcessor.Entitas\Psythyst.Plugin.PostProcessor.Entitas\Psythyst.Plugin.PostProcessor.Entitas\Psythyst.Plugin.PostProcessor.Entitas.csproj", "{BDCD28EE-FDF5-4C34-8129-350780179DF6}"
13+
EndProject
14+
Global
15+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
16+
Debug|Any CPU = Debug|Any CPU
17+
Debug|x64 = Debug|x64
18+
Debug|x86 = Debug|x86
19+
Release|Any CPU = Release|Any CPU
20+
Release|x64 = Release|x64
21+
Release|x86 = Release|x86
22+
EndGlobalSection
23+
GlobalSection(SolutionProperties) = preSolution
24+
HideSolutionNode = FALSE
25+
EndGlobalSection
26+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
27+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
28+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|Any CPU.Build.0 = Debug|Any CPU
29+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|x64.ActiveCfg = Debug|x64
30+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|x64.Build.0 = Debug|x64
31+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|x86.ActiveCfg = Debug|x86
32+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Debug|x86.Build.0 = Debug|x86
33+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|Any CPU.ActiveCfg = Release|Any CPU
34+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|Any CPU.Build.0 = Release|Any CPU
35+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|x64.ActiveCfg = Release|x64
36+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|x64.Build.0 = Release|x64
37+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|x86.ActiveCfg = Release|x86
38+
{BDCD28EE-FDF5-4C34-8129-350780179DF6}.Release|x86.Build.0 = Release|x86
39+
EndGlobalSection
40+
GlobalSection(NestedProjects) = preSolution
41+
{8A2FCFFF-318C-4706-9985-2211AFAF2699} = {844FD7FB-7741-4F27-A3CC-0693096F24F3}
42+
{160BA953-C794-42DD-A22D-FCA5BE3C0F83} = {8A2FCFFF-318C-4706-9985-2211AFAF2699}
43+
{BDCD28EE-FDF5-4C34-8129-350780179DF6} = {160BA953-C794-42DD-A22D-FCA5BE3C0F83}
44+
EndGlobalSection
45+
EndGlobal
Lines changed: 126 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,126 @@
1+
//////////////////////////////////////////////////////////////////////
2+
// ARGUMENTS
3+
//////////////////////////////////////////////////////////////////////
4+
5+
var Target = Argument("Target", "Build");
6+
var Platform = Argument("Platform", "Linux");
7+
var Configuration = Argument("Configuration", "Release");
8+
9+
var Project = "Psythyst.Plugin.CodeGenerator.Entitas";
10+
var Solution = "";
11+
12+
//////////////////////////////////////////////////////////////////////
13+
// TASKS
14+
//////////////////////////////////////////////////////////////////////
15+
16+
Task("Configure-Solution").Does(() =>
17+
{
18+
Solution = $"{Project}.{Platform}.sln";
19+
});
20+
21+
Task("Restore-NuGet-Package")
22+
.IsDependentOn("Configure-Solution")
23+
.IsDependentOn("Generate-Protobuild-Project")
24+
.Does(() =>
25+
{
26+
if(FileExists(Solution))
27+
NuGetRestore(Solution, new NuGetRestoreSettings { ToolPath = "./Tools/nuget.exe" });
28+
});
29+
30+
Task("Copy-Output").Does(() =>
31+
{
32+
Func<IFileSystemInfo, bool> Exclude_OutputDirectory =
33+
FileSystemInfo => !FileSystemInfo.Path.FullPath.EndsWith(
34+
"Bin", StringComparison.OrdinalIgnoreCase);
35+
36+
var OutputDirectory = $"./Bin/{Platform}/AnyCPU/{Configuration}";
37+
var DllCollection = GetFiles($"./**/{Platform}/AnyCPU/{Configuration}/*.dll", Exclude_OutputDirectory);
38+
39+
if (!DirectoryExists(OutputDirectory))
40+
CreateDirectory(OutputDirectory);
41+
else
42+
CleanDirectory(OutputDirectory);
43+
44+
CopyFiles(DllCollection, OutputDirectory);
45+
});
46+
47+
Task("Build")
48+
.IsDependentOn("Configure-Solution")
49+
.Does(() =>
50+
{
51+
if(FileExists(Solution))
52+
MSBuild(Solution, Settings => Settings.SetConfiguration(Configuration));
53+
});
54+
55+
Task("Clean-Project-Folder")
56+
.IsDependentOn("Configure-Solution")
57+
.Does(() =>
58+
{
59+
var Settings = new DeleteDirectorySettings { Recursive = true, Force = true };
60+
61+
var PublishCollection = GetDirectories("./**/Publish");
62+
var PackageCollection = GetDirectories("./**/Package");
63+
64+
DeleteDirectories(PublishCollection, Settings);
65+
DeleteDirectories(PackageCollection, Settings);
66+
67+
var ObjCollection = GetDirectories("./**/obj");
68+
var BinCollection = GetDirectories("./**/bin");
69+
70+
DeleteDirectories(ObjCollection, Settings);
71+
DeleteDirectories(BinCollection, Settings);
72+
73+
if (DirectoryExists($"./Bin/{Platform}"))
74+
DeleteDirectory($"./Bin/{Platform}", Settings);
75+
});
76+
77+
Task("Clean-Project")
78+
.IsDependentOn("Clean-Protobuild-Project")
79+
.IsDependentOn("Clean-Project-Folder");
80+
81+
//////////////////////////////////////////////////////////////////////
82+
// PROTOBUILD TASKS
83+
//////////////////////////////////////////////////////////////////////
84+
85+
Task("Generate-Protobuild-Project")
86+
.IsDependentOn("Configure-Solution")
87+
.Does(() =>
88+
{
89+
StartProcess("./Protobuild.exe", new ProcessSettings{ Arguments = $"--generate {Platform}" });
90+
});
91+
92+
Task("Clean-Protobuild-Project")
93+
.IsDependentOn("Configure-Solution")
94+
.Does(() =>
95+
{
96+
StartProcess("./Protobuild.exe", new ProcessSettings{ Arguments = $"--clean {Platform}" });
97+
98+
var ProjectCollection = GetFiles($"./**/*.{Platform}.csproj");
99+
var SolutionCollection = GetFiles($"./**/*.{Platform}.sln");
100+
var SpeccacheCollection = GetFiles($"*.{Platform}.speccache");
101+
102+
DeleteFiles(ProjectCollection);
103+
DeleteFiles(SolutionCollection);
104+
DeleteFiles(SpeccacheCollection);
105+
});
106+
107+
//////////////////////////////////////////////////////////////////////
108+
// TASK TARGETS
109+
//////////////////////////////////////////////////////////////////////
110+
111+
Task("Default")
112+
.IsDependentOn("Generate-Protobuild-Project")
113+
.IsDependentOn("Restore-NuGet-Package")
114+
.IsDependentOn("Build")
115+
.IsDependentOn("Copy-Output");
116+
117+
Task("Quick-Build")
118+
.IsDependentOn("Build")
119+
.IsDependentOn("Copy-Output");
120+
121+
Task("Clean").IsDependentOn("Clean-Project");
122+
123+
//////////////////////////////////////////////////////////////////////
124+
// EXECUTION
125+
//////////////////////////////////////////////////////////////////////
126+
RunTarget(Target);
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Module>
3+
<Name>Psythyst.Plugin.CodeGenerator.Entitas</Name>
4+
<DefaultAction>resync</DefaultAction>
5+
<GenerateNuGetRepositories>true</GenerateNuGetRepositories>
6+
</Module>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ExternalProject Name="Psythyst.Core.Unity.Entitas">
3+
<Platform Type="Windows">
4+
<Binary Name="Psythyst.Core.Unity.Entitas" Path="Library/NET46/Psythyst.Core.Unity.Entitas/1.4.0/Psythyst.Core.Unity.Entitas.dll" />
5+
</Platform>
6+
<Platform Type="Linux">
7+
<Binary Name="Psythyst.Core.Unity.Entitas" Path="Library/NET46/Psythyst.Core.Unity.Entitas/1.4.0/Psythyst.Core.Unity.Entitas.dll" />
8+
</Platform>
9+
<Platform Type="MacOS">
10+
<Binary Name="Psythyst.Core.Unity.Entitas" Path="Library/NET46/Psythyst.Core.Unity.Entitas/1.4.0/Psythyst.Core.Unity.Entitas.dll" />
11+
</Platform>
12+
</ExternalProject>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ExternalProject Name="Psythyst.Core.Unity">
3+
<Platform Type="Windows">
4+
<Binary Name="Psythyst.Core.Unity" Path="Library/NET46/Psythyst.Core.Unity/1.4.0/Psythyst.Core.Unity.dll" />
5+
</Platform>
6+
<Platform Type="Linux">
7+
<Binary Name="Psythyst.Core.Unity" Path="Library/NET46/Psythyst.Core.Unity/1.4.0/Psythyst.Core.Unity.dll" />
8+
</Platform>
9+
<Platform Type="MacOS">
10+
<Binary Name="Psythyst.Core.Unity" Path="Library/NET46/Psythyst.Core.Unity/1.4.0/Psythyst.Core.Unity.dll" />
11+
</Platform>
12+
</ExternalProject>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ExternalProject Name="Psythyst.Data.Entitas">
3+
<Platform Type="Windows">
4+
<Binary Name="Psythyst.Data.Entitas" Path="Library/NET46/Psythyst.Data.Entitas/1.4.0/Psythyst.Data.Entitas.dll" />
5+
</Platform>
6+
<Platform Type="Linux">
7+
<Binary Name="Psythyst.Data.Entitas" Path="Library/NET46/Psythyst.Data.Entitas/1.4.0/Psythyst.Data.Entitas.dll" />
8+
</Platform>
9+
<Platform Type="MacOS">
10+
<Binary Name="Psythyst.Data.Entitas" Path="Library/NET46/Psythyst.Data.Entitas/1.4.0/Psythyst.Data.Entitas.dll" />
11+
</Platform>
12+
</ExternalProject>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Name="Psythyst.Plugin.PostProcessor.Entitas.Unity" Path="Psythyst.Plugin.PostProcessor.Entitas.Unity/Psythyst.Plugin.PostProcessor.Entitas.Unity" Type="Library">
3+
<Properties>
4+
<FrameworkVersions>
5+
<Platform Name="MacOS">
6+
<Version>v4.6</Version>
7+
</Platform>
8+
<Platform Name="Windows">
9+
<Version>v4.6</Version>
10+
</Platform>
11+
<Platform Name="Linux">
12+
<Version>v4.6</Version>
13+
</Platform>
14+
</FrameworkVersions>
15+
</Properties>
16+
<References>
17+
<Reference Include="System" />
18+
<Reference Include="UnityEngine" />
19+
<Reference Include="Psythyst" />
20+
<Reference Include="Psythyst.Data.Entitas" />
21+
<Reference Include="Psythyst.Core.Unity" />
22+
<Reference Include="Psythyst.Core.Unity.Entitas" />
23+
<Reference Include="Psythyst.Plugin.PostProcessor.Entitas" />
24+
</References>
25+
<Files>
26+
<Compile Include="Source\**\*.cs" />
27+
</Files>
28+
</Project>
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project Name="Psythyst.Plugin.PostProcessor.Entitas" Path="Psythyst.Plugin.PostProcessor.Entitas/Psythyst.Plugin.PostProcessor.Entitas" Type="Library">
3+
<Properties>
4+
<FrameworkVersions>
5+
<Platform Name="MacOS">
6+
<Version>v4.6</Version>
7+
</Platform>
8+
<Platform Name="Windows">
9+
<Version>v4.6</Version>
10+
</Platform>
11+
<Platform Name="Linux">
12+
<Version>v4.6</Version>
13+
</Platform>
14+
</FrameworkVersions>
15+
</Properties>
16+
<References>
17+
<Reference Include="System" />
18+
<Reference Include="Psythyst" />
19+
<Reference Include="Psythyst.Data.Entitas" />
20+
</References>
21+
<Files>
22+
<Compile Include="Source\**\*.cs" />
23+
</Files>
24+
</Project>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ExternalProject Name="Psythyst">
3+
<Platform Type="Windows">
4+
<Binary Name="Psythyst" Path="Library/NET46/Psythyst/1.4.0/Psythyst.dll" />
5+
</Platform>
6+
<Platform Type="Linux">
7+
<Binary Name="Psythyst" Path="Library/NET46/Psythyst/1.4.0/Psythyst.dll" />
8+
</Platform>
9+
<Platform Type="MacOS">
10+
<Binary Name="Psythyst" Path="Library/NET46/Psythyst/1.4.0/Psythyst.dll" />
11+
</Platform>
12+
</ExternalProject>
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
<?xml version="1.0" encoding="utf-8" ?>
2+
<ExternalProject Name="UnityEngine">
3+
<Platform Type="Windows">
4+
<Binary Name="UnityEngine" Path="Library/UnityEngine.dll" />
5+
</Platform>
6+
<Platform Type="Linux">
7+
<Binary Name="UnityEngine" Path="Library/UnityEngine.dll" />
8+
</Platform>
9+
<Platform Type="MacOS">
10+
<Binary Name="UnityEngine" Path="Library/UnityEngine.dll" />
11+
</Platform>
12+
</ExternalProject>

0 commit comments

Comments
 (0)