//Store values in the volatile SessionState static void Init() { Installer.CheckRootFolder(); PackageVersionCheck.CheckForUpdate(); PostProcessingInstallation.CheckInstallation(); PostProcessingInstallation.FindInstallationDir(); }
//Check if SC Post Effects folder is placed inside PostProcessing folder public static void CheckRootFolder() { //For the package manager PPS version, asset folder can sit anywhere if (PostProcessingInstallation.Config == PostProcessingInstallation.Configuration.PackageManager) { IS_CORRECT_BASE_FOLDER = true; return; } SCPE.PACKAGE_ROOT_FOLDER = SCPE.GetRootFolder(); PostProcessingInstallation.FindInstallationDir(); //When already installed, root folder may be in PPS installation dir if (PostProcessingInstallation.IS_INSTALLED) { IS_CORRECT_BASE_FOLDER = (SCPE.PACKAGE_PARENT_FOLDER == PostProcessingInstallation.PPS_INSTALLATION_DIR); //Debug.Log(SCPE.PACKAGE_PARENT_FOLDER + " == " + PostProcessingInstallation.PPS_INSTALLATION_DIR); } //When not installed, installation will be in "Assets/PostProcessing/" else { IS_CORRECT_BASE_FOLDER = (SCPE.PACKAGE_PARENT_FOLDER == "Assets/PostProcessing/"); } #if SCPE_DEV && !PACKAGE_MANAGER Debug.Log("<b>Installer</b> Correct folder location: " + IS_CORRECT_BASE_FOLDER); #endif }
//Store values in the volatile SessionState static void InitInstallation() { //Installer.CheckRootFolder(); PackageVersionCheck.CheckForUpdate(); PostProcessingInstallation.CheckPPSInstallation(); PostProcessingInstallation.FindInstallationDir(); installationVerified = true; }