Esempio n. 1
0
        private void InstallXcodePlugin(string buildToolsDir)
        {
            string path = this.PluginSourcePath(buildToolsDir);
            string str2 = Unsupported.ResolveSymlinks(kXcodePluginDestination);
            bool   flag = Directory.Exists(kXcodePluginDestination);

            try
            {
                if (flag && !string.Equals(Path.GetFullPath(str2), Path.GetFullPath(path), StringComparison.InvariantCultureIgnoreCase))
                {
                    this.Log("Plugin points to wrong location. Removing.", new object[0]);
                    Directory.Delete(kXcodePluginDestination);
                    flag = false;
                }
                if (!flag)
                {
                    Directory.CreateDirectory(Path.GetDirectoryName(kXcodePluginDestination));
                    Utils.SymlinkFileAbsolute(path, kXcodePluginDestination);
                    XCodeUtils.TerminateXCode();
                }
            }
            catch (Exception exception)
            {
                object[] param = new object[] { exception };
                this.Log("{0}", param);
                UnityEngine.Debug.LogWarning("Could not install the Unity Xcode plugin. Automatic Build & Run won't be supported");
            }
        }
 public static IXcodeController CreateXcodeController()
 {
     if (XCodeUtils.GetXcodeMajorVersionNumber() < 8)
     {
         return(new XcodeController());
     }
     return(new XcodeScriptingController());
 }
Esempio n. 3
0
 public void CloseAllOpenUnityProjects(string buildToolsDirs, string projectPath)
 {
     XCodeUtils.LaunchXCode();
     try
     {
         if (this.XcodeIsRunning())
         {
             this.InstallXcodePlugin(buildToolsDirs);
             this.InternalCloseAllOpenUnityProjects();
         }
     }
     catch (Exception exception)
     {
         object[] param = new object[] { exception };
         this.Log("Close all open unity project in Xcode failed. {0}", param);
     }
 }
Esempio n. 4
0
 private bool LaunchAndWaitForXcode(string buildToolsDir)
 {
     this.InstallXcodePlugin(buildToolsDir);
     if (!XCodeUtils.CheckXCodeCompatibleWithPlugin(this.PluginSourcePath(buildToolsDir)))
     {
         UnityEngine.Debug.LogWarning("Unity xcode plugin has not current Xcode in its compatibility list.\n Please launch the project manually");
         return(false);
     }
     if (!this.XcodeIsRunning() || !this.WaitForPluginStartup(10))
     {
         this.Log("Terminating Xcode if running", new object[0]);
         XCodeUtils.TerminateXCode();
         this.Log("Launching Xcode", new object[0]);
         XCodeUtils.LaunchXCode();
         this.WaitForPluginStartup(30);
     }
     return(true);
 }
Esempio n. 5
0
 public void BuildProject(string projectPath)
 {
     XCodeUtils.BuildXCodeFromScript(projectPath);
 }
Esempio n. 6
0
 public void RunProject(string projectPath)
 {
     XCodeUtils.RunXCodeFromScript(projectPath);
 }
Esempio n. 7
0
 public void OpenProject(string projectPath)
 {
     XCodeUtils.OpenXCodeProjectWithPath(projectPath);
 }
Esempio n. 8
0
 public bool InitializeXcodeApplication(string buildToolsDir) =>
 XCodeUtils.InitializeScriptingXcodeApplication();
Esempio n. 9
0
 public void CloseAllOpenUnityProjects(string buildToolsDir, string projectPath)
 {
     XCodeUtils.CloseAllXCodeProjectsWithPath(projectPath);
 }
Esempio n. 10
0
 public void CleanProject(string projectPath)
 {
     XCodeUtils.CleanXCodeFromScript(projectPath);
 }