예제 #1
0
        internal static string GetGluonExePath()
        {
            if (PlatformIdentifier.IsWindows())
            {
                return(FindTool.ObtainToolCommand(
                           Gluon.GUI_WINDOWS,
                           new List <String>()
                {
                    GetWindowsInstallationFolder()
                }));
            }

            if (PlatformIdentifier.IsMac())
            {
                string path = GetToolCommand(Gluon.NEW_GUI_MACOS);
                if (path != null)
                {
                    return(path);
                }

                return(GetToolCommand(Gluon.LEGACY_GUI_MACOS));
            }

            return(null);
        }
예제 #2
0
        internal static string GetClientBinDir()
        {
            if (PlatformIdentifier.IsWindows())
            {
                string plasticExePath = GetPlasticExePath();

                if (plasticExePath == null)
                {
                    return(null);
                }

                return(Path.GetDirectoryName(plasticExePath));
            }

            if (PlatformIdentifier.IsMac())
            {
                string path = GetToolCommand(Plastic.NEW_GUI_MACOS);
                if (path != null)
                {
                    return(GetExistingDir(ToolConstants.NEW_MACOS_BINDIR));
                }

                return(GetExistingDir(ToolConstants.LEGACY_MACOS_BINDIR));
            }

            return(null);
        }
예제 #3
0
        static string GetHelpLink()
        {
            if (PlatformIdentifier.IsWindows() || PlatformIdentifier.IsMac())
            {
                return(FS_WATCHER_HELP_URL);
            }

            return(INOTIFY_HELP_URL);
        }
예제 #4
0
        internal static Dictionary <string, T> ForPlatform <T>()
        {
            if (PlatformIdentifier.IsWindows())
            {
                return(new Dictionary <string, T>(
                           StringComparer.OrdinalIgnoreCase));
            }

            return(new Dictionary <string, T>());
        }
예제 #5
0
        static string GetFsWatcherEnabledExplanation()
        {
            if (PlatformIdentifier.IsWindows() || PlatformIdentifier.IsMac())
            {
                return(PlasticLocalization.GetString(
                           PlasticLocalization.Name.PendingChangesFilesystemWatcherEnabledExplanation));
            }

            return(PlasticLocalization.GetString(
                       PlasticLocalization.Name.PendingChangesINotifyEnabledExplanation));
        }
예제 #6
0
        static string GetFsWatcherDisabledMessage()
        {
            if (PlatformIdentifier.IsWindows() || PlatformIdentifier.IsMac())
            {
                return(PlasticLocalization.GetString(
                           PlasticLocalization.Name.PendingChangesFilesystemWatcherDisabled));
            }

            return(PlasticLocalization.GetString(
                       PlasticLocalization.Name.PendingChangesINotifyDisabled));
        }
예제 #7
0
        static string GetFsWatcherDisabledExplanation()
        {
            if (PlatformIdentifier.IsWindows() || PlatformIdentifier.IsMac())
            {
                return(PlasticLocalization.GetString(
                           PlasticLocalization.Name.PendingChangesFilesystemWatcherDisabledExplanation)
                       .Replace("[[HELP_URL|{0}]]", "{0}"));
            }

            return(PlasticLocalization.GetString(
                       PlasticLocalization.Name.PendingChangesINotifyDisabledExplanation));
        }
예제 #8
0
        internal static string ForHistory()
        {
            if (PlatformIdentifier.IsWindows())
            {
                return(PlasticLocalization.GetString(
                           PlasticLocalization.Name.UnityHistoryShortcutForWindows));
            }

            if (PlatformIdentifier.IsMac())
            {
                return(PlasticLocalization.GetString(
                           PlasticLocalization.Name.UnityHistoryShortcutForMacOS));
            }

            return(string.Empty);
        }
예제 #9
0
        internal static string ForPlatform()
        {
            string fileName = Guid.NewGuid().ToString();

            if (PlatformIdentifier.IsWindows())
            {
                fileName += ".exe";
            }

            if (PlatformIdentifier.IsMac())
            {
                fileName += ".pkg.zip";
            }

            return(Path.Combine(
                       Path.GetTempPath(),
                       fileName));
        }
예제 #10
0
        internal static string GetPlasticExePath()
        {
            if (PlatformIdentifier.IsWindows())
            {
                return(FindTool.ObtainToolCommand(
                           Plastic.GUI_WINDOWS,
                           new List <String>()
                {
                    GetWindowsInstallationFolder()
                }));
            }

            if (PlatformIdentifier.IsMac())
            {
                return(GetToolCommand(Plastic.GUI_MACOS));
            }

            return(null);
        }
예제 #11
0
 internal static bool MustDisableFsWatcher()
 {
     return(PlatformIdentifier.IsWindows() &&
            MonoRuntime.IsRunningUnder35RuntimeOrOlder());
 }