From c091f4868a40ffc7fd92188392469b52ca69395b Mon Sep 17 00:00:00 2001 From: zios Date: Mon, 20 Jun 2016 10:17:04 +0300 Subject: [PATCH] Added compilation for ZiosThemesEditor as editor-only managed plugin -- ZiosTheme project file has been split into two, one UnityEngine/Standalone specific; the other UnityEditor type -- ZiosTheme solution now compiles the projects into two managed .dll's -- Adjustments have been done for the Hook support and Themes editor interface file from preventing building the standalone build -- Compilation scripts/batch files are updated to handle the operation of multiple .dll compilation and cleanup properly --- .gitignore | 3 +- .../3.5.7/UnityEditor.dll | Bin .../3.5.7/UnityEngine.dll | Bin .../4.7.2/UnityEditor.dll | Bin .../4.7.2/UnityEngine.dll | Bin .../5.4/UnityEditor.dll | Bin .../5.4/UnityEngine.dll | Bin .../Compile Themes 3.5.7.bat | 2 +- .../Compile Themes 4.7.2.bat | 2 +- .../Compile Themes 5.4 (Mono Windows).bat | 2 +- .../Compile Themes 5.4.bat | 2 +- .../Compile Themes Mac OS X.sh | 5 +- .../Download MSBuild Tools 2015.url | 0 .../Properties/AssemblyInfo.cs | 0 {@Solutions => @Solutions~}/UnityEditor.dll | Bin {@Solutions => @Solutions~}/UnityEngine.dll | Bin {@Solutions => @Solutions~}/ZiosThemes.csproj | 14 +-- {@Solutions => @Solutions~}/ZiosThemes.sln | 8 +- @Solutions~/ZiosThemesEditor.csproj | 97 ++++++++++++++++++ Supports/Hook.cs | 2 + Systems/Interface/Themes/Themes.cs | 2 +- 21 files changed, 116 insertions(+), 23 deletions(-) rename {@Solutions => @Solutions~}/3.5.7/UnityEditor.dll (100%) rename {@Solutions => @Solutions~}/3.5.7/UnityEngine.dll (100%) rename {@Solutions => @Solutions~}/4.7.2/UnityEditor.dll (100%) rename {@Solutions => @Solutions~}/4.7.2/UnityEngine.dll (100%) rename {@Solutions => @Solutions~}/5.4/UnityEditor.dll (100%) rename {@Solutions => @Solutions~}/5.4/UnityEngine.dll (100%) rename {@Solutions => @Solutions~}/Compile Themes 3.5.7.bat (98%) rename {@Solutions => @Solutions~}/Compile Themes 4.7.2.bat (98%) rename {@Solutions => @Solutions~}/Compile Themes 5.4 (Mono Windows).bat (91%) rename {@Solutions => @Solutions~}/Compile Themes 5.4.bat (98%) rename {@Solutions => @Solutions~}/Compile Themes Mac OS X.sh (67%) rename {@Solutions => @Solutions~}/Download MSBuild Tools 2015.url (100%) rename {@Solutions => @Solutions~}/Properties/AssemblyInfo.cs (100%) rename {@Solutions => @Solutions~}/UnityEditor.dll (100%) rename {@Solutions => @Solutions~}/UnityEngine.dll (100%) rename {@Solutions => @Solutions~}/ZiosThemes.csproj (83%) rename {@Solutions => @Solutions~}/ZiosThemes.sln (61%) create mode 100644 @Solutions~/ZiosThemesEditor.csproj diff --git a/.gitignore b/.gitignore index 68425d93f..9aa5c1848 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ -/@Solutions/ZiosThemes.dll +/@Solutions~/ZiosThemesEditor.dll +/@Solutions~/ZiosThemes.dll diff --git a/@Solutions/3.5.7/UnityEditor.dll b/@Solutions~/3.5.7/UnityEditor.dll similarity index 100% rename from @Solutions/3.5.7/UnityEditor.dll rename to @Solutions~/3.5.7/UnityEditor.dll diff --git a/@Solutions/3.5.7/UnityEngine.dll b/@Solutions~/3.5.7/UnityEngine.dll similarity index 100% rename from @Solutions/3.5.7/UnityEngine.dll rename to @Solutions~/3.5.7/UnityEngine.dll diff --git a/@Solutions/4.7.2/UnityEditor.dll b/@Solutions~/4.7.2/UnityEditor.dll similarity index 100% rename from @Solutions/4.7.2/UnityEditor.dll rename to @Solutions~/4.7.2/UnityEditor.dll diff --git a/@Solutions/4.7.2/UnityEngine.dll b/@Solutions~/4.7.2/UnityEngine.dll similarity index 100% rename from @Solutions/4.7.2/UnityEngine.dll rename to @Solutions~/4.7.2/UnityEngine.dll diff --git a/@Solutions/5.4/UnityEditor.dll b/@Solutions~/5.4/UnityEditor.dll similarity index 100% rename from @Solutions/5.4/UnityEditor.dll rename to @Solutions~/5.4/UnityEditor.dll diff --git a/@Solutions/5.4/UnityEngine.dll b/@Solutions~/5.4/UnityEngine.dll similarity index 100% rename from @Solutions/5.4/UnityEngine.dll rename to @Solutions~/5.4/UnityEngine.dll diff --git a/@Solutions/Compile Themes 3.5.7.bat b/@Solutions~/Compile Themes 3.5.7.bat similarity index 98% rename from @Solutions/Compile Themes 3.5.7.bat rename to @Solutions~/Compile Themes 3.5.7.bat index 617f1e804..89171bd68 100644 --- a/@Solutions/Compile Themes 3.5.7.bat +++ b/@Solutions~/Compile Themes 3.5.7.bat @@ -1,6 +1,6 @@ @ECHO OFF copy /Y 3.5.7\* . >NUL -del ZiosThemes.dll +del ZiosThemes*.dll IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 diff --git a/@Solutions/Compile Themes 4.7.2.bat b/@Solutions~/Compile Themes 4.7.2.bat similarity index 98% rename from @Solutions/Compile Themes 4.7.2.bat rename to @Solutions~/Compile Themes 4.7.2.bat index ea91ecba5..168e1f760 100644 --- a/@Solutions/Compile Themes 4.7.2.bat +++ b/@Solutions~/Compile Themes 4.7.2.bat @@ -1,6 +1,6 @@ @ECHO OFF copy /Y 4.7.2\* . >NUL -del ZiosThemes.dll +del ZiosThemes*.dll IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 diff --git a/@Solutions/Compile Themes 5.4 (Mono Windows).bat b/@Solutions~/Compile Themes 5.4 (Mono Windows).bat similarity index 91% rename from @Solutions/Compile Themes 5.4 (Mono Windows).bat rename to @Solutions~/Compile Themes 5.4 (Mono Windows).bat index 5bcdb6fff..aebf7f4e8 100644 --- a/@Solutions/Compile Themes 5.4 (Mono Windows).bat +++ b/@Solutions~/Compile Themes 5.4 (Mono Windows).bat @@ -1,7 +1,7 @@ @ECHO OFF copy /Y 5.4\* . >NUL echo Compiling ZiosThemes.dll - Mono Framework 4.5 / Unity 5.x... -del ZiosThemes.dll +del ZiosThemes*.dll call "%programfiles%\Unity\Editor\Data\MonoBleedingEdge\bin\xbuild.bat" ZiosThemes.sln rmdir /Q /S obj copy /Y 5.4\* . >NUL \ No newline at end of file diff --git a/@Solutions/Compile Themes 5.4.bat b/@Solutions~/Compile Themes 5.4.bat similarity index 98% rename from @Solutions/Compile Themes 5.4.bat rename to @Solutions~/Compile Themes 5.4.bat index d5d782d0a..b22469a96 100644 --- a/@Solutions/Compile Themes 5.4.bat +++ b/@Solutions~/Compile Themes 5.4.bat @@ -1,6 +1,6 @@ @ECHO OFF copy /Y 5.4\* . >NUL -del ZiosThemes.dll +del ZiosThemes*.dll IF EXIST "%programfiles%\MSBuild\14.0\Bin" GOTO USE_VS14_X32 IF EXIST "%programfiles(x86)%\MSBuild\14.0\Bin" GOTO USE_VS14_X64 IF EXIST "%programfiles%\MSBuild\15.0\Bin" GOTO USE_VS15_X32 diff --git a/@Solutions/Compile Themes Mac OS X.sh b/@Solutions~/Compile Themes Mac OS X.sh similarity index 67% rename from @Solutions/Compile Themes Mac OS X.sh rename to @Solutions~/Compile Themes Mac OS X.sh index 27beb2f52..5612b5cf2 100644 --- a/@Solutions/Compile Themes Mac OS X.sh +++ b/@Solutions~/Compile Themes Mac OS X.sh @@ -1,5 +1,4 @@ #!/bin/sh - -rm ZiosThemes.dll -/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/bin/xbuild ZiosThemesMono.sln +rm ZiosThemes*.dll +/Applications/Unity/Unity.app/Contents/MonoBleedingEdge/bin/xbuild ZiosThemes.sln rm -R obj diff --git a/@Solutions/Download MSBuild Tools 2015.url b/@Solutions~/Download MSBuild Tools 2015.url similarity index 100% rename from @Solutions/Download MSBuild Tools 2015.url rename to @Solutions~/Download MSBuild Tools 2015.url diff --git a/@Solutions/Properties/AssemblyInfo.cs b/@Solutions~/Properties/AssemblyInfo.cs similarity index 100% rename from @Solutions/Properties/AssemblyInfo.cs rename to @Solutions~/Properties/AssemblyInfo.cs diff --git a/@Solutions/UnityEditor.dll b/@Solutions~/UnityEditor.dll similarity index 100% rename from @Solutions/UnityEditor.dll rename to @Solutions~/UnityEditor.dll diff --git a/@Solutions/UnityEngine.dll b/@Solutions~/UnityEngine.dll similarity index 100% rename from @Solutions/UnityEngine.dll rename to @Solutions~/UnityEngine.dll diff --git a/@Solutions/ZiosThemes.csproj b/@Solutions~/ZiosThemes.csproj similarity index 83% rename from @Solutions/ZiosThemes.csproj rename to @Solutions~/ZiosThemes.csproj index 1fccbec3f..73a254d50 100644 --- a/@Solutions/ZiosThemes.csproj +++ b/@Solutions~/ZiosThemes.csproj @@ -17,14 +17,11 @@ . prompt 4 - UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_STANDALONE;UNITY_THEMES + UNITY_STANDALONE;UNITY_THEMES - - UnityEditor.dll - UnityEngine.dll @@ -34,9 +31,6 @@ - - - @@ -75,7 +69,6 @@ - @@ -87,11 +80,6 @@ - - - - - \ No newline at end of file diff --git a/@Solutions/ZiosThemes.sln b/@Solutions~/ZiosThemes.sln similarity index 61% rename from @Solutions/ZiosThemes.sln rename to @Solutions~/ZiosThemes.sln index 075597457..acb9770c8 100644 --- a/@Solutions/ZiosThemes.sln +++ b/@Solutions~/ZiosThemes.sln @@ -1,8 +1,12 @@  Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 +# Visual Studio 14 +VisualStudioVersion = 14.0.25123.0 +MinimumVisualStudioVersion = 10.0.40219.1 Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZiosThemes", "ZiosThemes.csproj", "{90C40447-C2B4-4725-9CEA-9E0E8199EEFC}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ZiosThemesEditor", "ZiosThemesEditor.csproj", "{181349BA-06EE-47B5-928A-AA3413A8C2DA}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Release|Any CPU = Release|Any CPU @@ -10,6 +14,8 @@ Global GlobalSection(ProjectConfigurationPlatforms) = postSolution {90C40447-C2B4-4725-9CEA-9E0E8199EEFC}.Release|Any CPU.ActiveCfg = Release|Any CPU {90C40447-C2B4-4725-9CEA-9E0E8199EEFC}.Release|Any CPU.Build.0 = Release|Any CPU + {181349BA-06EE-47B5-928A-AA3413A8C2DA}.Release|Any CPU.ActiveCfg = Release|Any CPU + {181349BA-06EE-47B5-928A-AA3413A8C2DA}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/@Solutions~/ZiosThemesEditor.csproj b/@Solutions~/ZiosThemesEditor.csproj new file mode 100644 index 000000000..307bc00f6 --- /dev/null +++ b/@Solutions~/ZiosThemesEditor.csproj @@ -0,0 +1,97 @@ + + + + + Release + AnyCPU + {181349BA-06EE-47B5-928A-AA3413A8C2DA} + Library + Properties + ZiosThemesEditor + ZiosThemesEditor + v3.5 + 512 + + + true + . + prompt + 4 + UNITY_EDITOR;UNITY_EDITOR_64;UNITY_EDITOR_WIN;UNITY_THEMES + + + + + + UnityEditor.dll + + + UnityEngine.dll + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/Supports/Hook.cs b/Supports/Hook.cs index 00ced542e..8f1319fc2 100644 --- a/Supports/Hook.cs +++ b/Supports/Hook.cs @@ -10,9 +10,11 @@ namespace Zios{ public static class Hook{ public static bool disabled; public static bool hidden; + #if UNITY_EDITOR static Hook(){ Hook.hidden = EditorPrefs.GetBool("EditorSettings-HideHooks",false); } + #endif public static void SetHidden(bool state){ Locate.SetDirty(); foreach(var current in Locate.GetSceneObjects()){ diff --git a/Systems/Interface/Themes/Themes.cs b/Systems/Interface/Themes/Themes.cs index afee37a64..cf94ccaaf 100644 --- a/Systems/Interface/Themes/Themes.cs +++ b/Systems/Interface/Themes/Themes.cs @@ -3,9 +3,9 @@ using System.Collections.Generic; using UnityEngine; namespace Zios{ - using Interface; #if UNITY_EDITOR using UnityEditor; + using Interface; #if UNITY_EDITOR_WIN using Microsoft.Win32; #endif