Esempio n. 1
0
        private static Process RunUi()
        {
            var uiProcess = new Process();

            if (Environment.OSVersion.Platform == PlatformID.MacOSX || Environment.OSVersion.Platform == PlatformID.Unix)
            {
                uiProcess.StartInfo.FileName               = "/bin/bash";
                uiProcess.StartInfo.Arguments              = "-c \"npm run electron\"";
                uiProcess.StartInfo.WorkingDirectory       = ElectronUtils.FindElectronUiDirectory("Electron", Environment.CurrentDirectory);
                uiProcess.StartInfo.RedirectStandardOutput = true;
                uiProcess.StartInfo.UseShellExecute        = false;
            }
            else
            {
                uiProcess.StartInfo.FileName  = "cmd";
                uiProcess.StartInfo.Arguments = "/C npm run electron";
                uiProcess.StartInfo.RedirectStandardOutput = true;
                uiProcess.StartInfo.WorkingDirectory       = ElectronUtils.FindElectronUiDirectory("Electron", Environment.CurrentDirectory);
            }

            uiProcess.Start();
            return(uiProcess);
        }
Esempio n. 2
0
        public void ShouldFindFolderInCurrentLevel(string folderName, string rootFolderName, string result)
        {
            var path = ElectronUtils.FindElectronUiDirectory(folderName, rootFolderName);

            Assert.Equal(path, result);
        }