Example #1
0
        private void Verify()
        {
            verifyInProgress   = true;
            verificationPassed = false;
            verifications.Clear();

            foreach (string dir in GetLevelPaths())
            {
                string levelName = Path.GetFileName(dir);

                VerificationResult result = new VerificationResult();
                result.sourceSize = DirectoryUtil.GetSize(dir);

                result.documentationExists = Directory.Exists(GetDocuPath(levelName));

                result.distroPathAndroid   = GetServerDataPath() + "/Levels/" + levelName + "/Android";
                result.distroExistsAndroid = Directory.Exists(result.distroPathAndroid);
                result.distroSizeAndroid   = DirectoryUtil.GetSize(result.distroPathAndroid);

                result.distroPathStandalone   = GetServerDataPath() + "/Levels/" + levelName + "/StandaloneWindows64";
                result.distroExistsStandalone = Directory.Exists(result.distroPathStandalone);
                result.distroSizeStandalone   = DirectoryUtil.GetSize(result.distroPathStandalone);

                verifications.Add(levelName, result);
            }
            verifyInProgress   = false;
            verificationPassed = true; // TODO: do some actual checks
        }
Example #2
0
        private void Verify()
        {
            verifyInProgress   = true;
            verificationPassed = false;
            worldListMismatch  = false;
            verifications.Clear();

            IEnumerable <TextureImporter> uncompressed = GetUncompressedTextures();

            uncompressedTextures = uncompressed.Count();

            foreach (string dir in GetWorldPaths())
            {
                string worldName = Path.GetFileName(dir);

                VerificationResult result = new VerificationResult();
                result.sourceSize = DirectoryUtil.GetSize(dir);

                result.documentationPath   = GetDocuArchivePath(worldName);
                result.documentationExists = File.Exists(result.documentationPath);

                result.distroPathAndroid   = GetServerDataPath() + "/Worlds/" + worldName + "/Android";
                result.distroExistsAndroid = Directory.Exists(result.distroPathAndroid);
                result.distroSizeAndroid   = DirectoryUtil.GetSize(result.distroPathAndroid);

                result.distroPathStandaloneWin   = GetServerDataPath() + "/Worlds/" + worldName + "/StandaloneWindows64";
                result.distroExistsStandaloneWin = Directory.Exists(result.distroPathStandaloneWin);
                result.distroSizeStandaloneWin   = DirectoryUtil.GetSize(result.distroPathStandaloneWin);

                result.distroPathStandaloneLinux   = GetServerDataPath() + "/Worlds/" + worldName + "/StandaloneLinux64";
                result.distroExistsStandaloneLinux = Directory.Exists(result.distroPathStandaloneLinux);
                result.distroSizeStandaloneLinux   = DirectoryUtil.GetSize(result.distroPathStandaloneLinux);

                verifications.Add(worldName, result);

                if (userWorlds != null && userWorlds.Count(w => w.key == worldName) == 0)
                {
                    Debug.LogError($"Found unregistered world: {worldName}");
                    worldListMismatch = true;
                }
            }

            verifyInProgress   = false;
            verificationPassed = !worldListMismatch && !SDKUtil.invalidAPIToken && !SDKUtil.networkIssue; // TODO: do some actual checks
        }