WakaTime.PythonManager.GetPythonFileName C# (CSharp) Method

GetPythonFileName() static private method

static private GetPythonFileName ( ) : string
return string
        internal static string GetPythonFileName()
        {
            string name = "python-" + CurrentPythonVersion;

            // TODO
            // Maybe using Unity 32 but would use python 64?
            #if UNITY_EDITOR_64
            name += ".amd64";
            #endif

            name += ".msi";

            return name;
        }

Usage Example

Example #1
0
        static void DownloadCompleted()
        {
            EditorUtility.ClearProgressBar();

            if (Main.IsDebug)
            {
                UnityEngine.Debug.Log("Python downloaded: " + www.size.ToString());
            }
            string dir       = System.Environment.GetFolderPath(System.Environment.SpecialFolder.ApplicationData);
            string localFile = dir + PythonManager.GetPythonFileName();


            try {
                System.IO.FileStream stream = new System.IO.FileStream(localFile, System.IO.FileMode.Create, System.IO.FileAccess.Write);
                stream.Write(www.bytes, 0, www.bytes.Length);

                // close file stream
                stream.Close();

                www = null;
            } catch (Exception ex) {
                if (Main.IsDebug)
                {
                    UnityEngine.Debug.LogError("Python download failed: " + ex.Message);
                }
            }

            Install();
        }
All Usage Examples Of WakaTime.PythonManager::GetPythonFileName