Beispiel #1
0
    public static void MakeDLLMakerDLL(bool debug, bool isInternal)
    {
        DLLMaker dLLMaker = new DLLMaker();

        dLLMaker.debug             = debug;
        dLLMaker.strongNameKeyFile = "VRCSDK2.snk";
        dLLMaker.sourcePaths       = new List <string>();
        dLLMaker.sourcePaths.Add(DLL_MAKER_SOURCE_FULL_PATH);
        dLLMaker.defines.Add("UNITY_EDITOR_WIN");
        if (isInternal)
        {
            dLLMaker.defines.Add("INTERNAL_SDK");
        }
        dLLMaker.DllDependencies = new List <string>();
        dLLMaker.DllDependencies.Add(SDK_OUTPUT_FULL_PATH + "/VRCCore-Editor.dll");
        dLLMaker.DllDependencies.Add(SDK_OUTPUT_FULL_PATH + "/VRCSDK2.dll");
        dLLMaker.IsEditor        = true;
        dLLMaker.BuildTargetDir  = DLL_MAKER_OUTPUT_FULL_PATH;
        dLLMaker.BuildTargetFile = "DLLMaker.dll";
        dLLMaker.CreateDLL();
    }
Beispiel #2
0
    public static CompilerResults MakeSDKGuiDLL(bool debug, bool isInternal)
    {
        DLLMaker dLLMaker = new DLLMaker();

        dLLMaker.debug             = debug;
        dLLMaker.strongNameKeyFile = "VRCSDK2.snk";
        dLLMaker.sourcePaths       = new List <string>();
        dLLMaker.sourcePaths.Add(CORE_SOURCE_FULL_PATH + "/VRCSDK-Gui/Scripts");
        dLLMaker.DllDependencies = new List <string>();
        dLLMaker.DllDependencies.Add(DLLMaker.UnityExtensionDLLDirectoryPath + "GUISystem" + Path.DirectorySeparatorChar + "UnityEngine.UI.dll");
        dLLMaker.DllDependencies.Add(DLLMaker.UnityDLLDirectoryPath + "UnityEditor.dll");
        dLLMaker.DllDependencies.Add(SDK_OUTPUT_FULL_PATH + "/VRCCore-Editor.dll");
        dLLMaker.DllDependencies.Add(SDK_OUTPUT_FULL_PATH + "/VRCSDK2.dll");
        if (isInternal)
        {
            dLLMaker.defines.Add("INTERNAL_SDK");
        }
        dLLMaker.BuildTargetDir  = SDK_OUTPUT_FULL_PATH;
        dLLMaker.BuildTargetFile = "VRCSDK2-GUI.dll";
        return(dLLMaker.CreateDLL());
    }
Beispiel #3
0
    public static CompilerResults MakeStrippedCoreDLL(bool debug, bool isInternal)
    {
        DLLMaker dLLMaker = new DLLMaker();

        dLLMaker.debug             = debug;
        dLLMaker.strongNameKeyFile = "VRCSDK2.snk";
        dLLMaker.sourcePaths       = new List <string>();
        dLLMaker.sourceFilePaths   = new List <string>();
        dLLMaker.sourceFilePaths.Add(CORE_SOURCE_FULL_PATH + "/VRCCore/Scripts/PipelineManager.cs");
        dLLMaker.DllDependencies = new List <string>();
        dLLMaker.DllDependencies.Add(DLLMaker.UnityExtensionDLLDirectoryPath + "GUISystem" + Path.DirectorySeparatorChar + "UnityEngine.UI.dll");
        dLLMaker.DllDependencies.Add(SDK_OUTPUT_FULL_PATH + "/VRCCore-Standalone.dll");
        if (isInternal)
        {
            dLLMaker.defines.Add("INTERNAL_SDK");
        }
        dLLMaker.defines.Add("INCLUDE_PIPELINE_MANAGER");
        dLLMaker.IsEditor        = true;
        dLLMaker.BuildTargetDir  = STRIPPED_OUTPUT_FULL_PATH;
        dLLMaker.BuildTargetFile = "VRCCore-Editor.dll";
        return(dLLMaker.CreateDLL(explicitFiles: true));
    }
Beispiel #4
0
    private static void CreateNamespacedSourceFiles(DLLMaker maker, string namespaceName)
    {
        if (Directory.Exists(SOURCE_TMP_PATH))
        {
            Directory.Delete(SOURCE_TMP_PATH, recursive: true);
        }
        Directory.CreateDirectory(EXTERNAL_DLL_OUTPUT_FULL_PATH);
        List <string> allSourceFromCSFilesInPathRecursive = maker.GetAllSourceFromCSFilesInPathRecursive(SOURCE_FULL_PATH);

        foreach (string item in allSourceFromCSFilesInPathRecursive)
        {
            string text = SOURCE_TMP_PATH + "/" + Path.GetFileName(item);
            if (!Directory.Exists(SOURCE_TMP_PATH))
            {
                Directory.CreateDirectory(SOURCE_TMP_PATH);
            }
            if (File.Exists(text))
            {
                File.Delete(text);
            }
            File.Copy(item, text);
            AddNamespaceToFile(namespaceName, text);
        }
    }
Beispiel #5
0
    public static List <string> GetCustomScripts()
    {
        DLLMaker dLLMaker = new DLLMaker();

        return(dLLMaker.GetAllSourceFromCSFilesInPathRecursive(SOURCE_FULL_PATH));
    }