/// <summary> /// Checks for the product update by requesting for update version info /// from configured download source path. This method will skip the /// update check if a newer version of the product is already installed. /// </summary> /// <param name="manager">Update manager instance using which product /// update check nees to be done.</param> internal static void CheckForProductUpdate(IUpdateManager manager) { //If we already have higher version installed, don't look for product update. if (manager.Configuration.DynamoLookUp != null && manager.Configuration.DynamoLookUp.LatestProduct > manager.ProductVersion) { return; } var downloadUri = new Uri(manager.Configuration.DownloadSourcePath); manager.CheckForProductUpdate(new UpdateRequest(downloadUri, manager)); }
/// <summary> /// Checks for the product update by requesting for update version info /// from configured download source path. This method will skip the /// update check if a newer version of the product is already installed. /// </summary> /// <param name="manager">Update manager instance using which product /// update check nees to be done.</param> internal static void CheckForProductUpdate(IUpdateManager manager) { //If we already have higher version installed, don't look for product update. if(manager.Configuration.DynamoLookUp != null && manager.Configuration.DynamoLookUp.LatestProduct > manager.ProductVersion) return; var downloadUri = new Uri(manager.Configuration.DownloadSourcePath); manager.CheckForProductUpdate(new UpdateRequest(downloadUri, manager)); }
/// <summary> /// Class constructor /// </summary> public DynamoController(string context, IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences, string corePath) { DebugSettings = new DebugSettings(); IsCrashing = false; dynSettings.Controller = this; Context = context; PreferenceSettings = preferences; ((PreferenceSettings) PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; SIUnit.LengthUnit = PreferenceSettings.LengthUnit; SIUnit.AreaUnit = PreferenceSettings.AreaUnit; SIUnit.VolumeUnit = PreferenceSettings.VolumeUnit; SIUnit.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation),dynSettings.DynamoLogger, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //Start heartbeat reporting //This needs to be done after the update manager has been initialised //so that the version number can be reported InstrumentationLogger.Start(); //create the model DynamoModel = new DynamoModel (); DynamoModel.AddHomeWorkspace(); SearchViewModel = new SearchViewModel(DynamoModel); DynamoModel.CurrentWorkspace = DynamoModel.HomeSpace; DynamoModel.CurrentWorkspace.X = 0; DynamoModel.CurrentWorkspace.Y = 0; // custom node loader CustomNodeManager = new CustomNodeManager(DynamoPathManager.Instance.UserDefinitions); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); DisposeLogic.IsShuttingDown = false; EngineController = new EngineController(this); CustomNodeManager.RecompileAllNodes(EngineController); //This is necessary to avoid a race condition by causing a thread join //inside the vm exec //TODO(Luke): Push this into a resync call with the engine controller ResetEngine(); dynSettings.DynamoLogger.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadNodeModels(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); Runner = new DynamoRunner(); }
/// <summary> /// Class constructor /// </summary> public DynamoController(string context, IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences) { DebugSettings = new DebugSettings(); IsCrashing = false; dynSettings.Controller = this; Context = context; //Start heartbeat reporting InstrumentationLogger.Start(); PreferenceSettings = preferences; ((PreferenceSettings)PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; SIUnit.LengthUnit = PreferenceSettings.LengthUnit; SIUnit.AreaUnit = PreferenceSettings.AreaUnit; SIUnit.VolumeUnit = PreferenceSettings.VolumeUnit; SIUnit.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.UpdateDownloaded += updateManager_UpdateDownloaded; UpdateManager.ShutdownRequested += updateManager_ShutdownRequested; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation), dynSettings.DynamoLogger, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //create the model DynamoModel = new DynamoModel(); DynamoModel.AddHomeWorkspace(); DynamoModel.CurrentWorkspace = DynamoModel.HomeSpace; DynamoModel.CurrentWorkspace.X = 0; DynamoModel.CurrentWorkspace.Y = 0; // custom node loader string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pluginsPath = Path.Combine(directory, "definitions"); CustomNodeManager = new CustomNodeManager(pluginsPath); SearchViewModel = new SearchViewModel(); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); DisposeLogic.IsShuttingDown = false; EngineController = new EngineController(this); //This is necessary to avoid a race condition by causing a thread join //inside the vm exec //TODO(Luke): Push this into a resync call with the engine controller ResetEngine(); dynSettings.DynamoLogger.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadNodeModels(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); Runner = new DynamoRunner(); }
/// <summary> /// Class constructor /// </summary> public DynamoController(ExecutionEnvironment env, Type viewModelType, string context, string commandFilePath, IUpdateManager updateManager, IUnitsManager units, IWatchHandler watchHandler, IPreferences preferences) { DynamoLogger.Instance.StartLogging(); dynSettings.Controller = this; this.Context = context; //Start heartbeat reporting Services.InstrumentationLogger.Start(); PreferenceSettings = preferences; ((PreferenceSettings) PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; UnitsManager = units; UnitsManager.LengthUnit = PreferenceSettings.LengthUnit; UnitsManager.AreaUnit = PreferenceSettings.AreaUnit; UnitsManager.VolumeUnit = PreferenceSettings.VolumeUnit; UnitsManager.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.UpdateDownloaded += updateManager_UpdateDownloaded; UpdateManager.ShutdownRequested += updateManager_ShutdownRequested; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation),DynamoLogger.Instance, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //create the view model to which the main window will bind //the DynamoModel is created therein this.DynamoViewModel = (DynamoViewModel)Activator.CreateInstance( viewModelType, new object[] { this, commandFilePath }); // custom node loader string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pluginsPath = Path.Combine(directory, "definitions"); CustomNodeManager = new CustomNodeManager(pluginsPath); SearchViewModel = new SearchViewModel(); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); FSchemeEnvironment = env; DynamoViewModel.Model.CurrentWorkspace.X = 0; DynamoViewModel.Model.CurrentWorkspace.Y = 0; DynamoLogger.Instance.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadBuiltinTypes(); //run tests if (FScheme.RunTests(DynamoLogger.Instance.Log)) { DynamoLogger.Instance.Log("All Tests Passed. Core library loaded OK."); } this.InfoBubbleViewModel = new InfoBubbleViewModel(); AddPythonBindings(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); }
/// <summary> /// Class constructor /// </summary> public DynamoController(ExecutionEnvironment env, Type viewModelType, string context, string commandFilePath, IUpdateManager updateManager, IUnitsManager units, IWatchHandler watchHandler, IPreferences preferences) { DynamoLogger.Instance.StartLogging(); dynSettings.Controller = this; this.Context = context; //Start heartbeat reporting Services.InstrumentationLogger.Start(); PreferenceSettings = preferences; ((PreferenceSettings)PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; UnitsManager = units; UnitsManager.LengthUnit = PreferenceSettings.LengthUnit; UnitsManager.AreaUnit = PreferenceSettings.AreaUnit; UnitsManager.VolumeUnit = PreferenceSettings.VolumeUnit; UnitsManager.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.UpdateDownloaded += updateManager_UpdateDownloaded; UpdateManager.ShutdownRequested += updateManager_ShutdownRequested; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation), DynamoLogger.Instance, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //create the view model to which the main window will bind //the DynamoModel is created therein this.DynamoViewModel = (DynamoViewModel)Activator.CreateInstance( viewModelType, new object[] { this, commandFilePath }); // custom node loader string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pluginsPath = Path.Combine(directory, "definitions"); CustomNodeManager = new CustomNodeManager(pluginsPath); SearchViewModel = new SearchViewModel(); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); FSchemeEnvironment = env; DynamoViewModel.Model.CurrentWorkspace.X = 0; DynamoViewModel.Model.CurrentWorkspace.Y = 0; DynamoLogger.Instance.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadBuiltinTypes(); //run tests if (FScheme.RunTests(DynamoLogger.Instance.Log)) { DynamoLogger.Instance.Log("All Tests Passed. Core library loaded OK."); } this.InfoBubbleViewModel = new InfoBubbleViewModel(); AddPythonBindings(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); }
/// <summary> /// Class constructor /// </summary> public DynamoController(Type viewModelType, string context, string commandFilePath, IUpdateManager updateManager, IWatchHandler watchHandler, IPreferences preferences) { DynamoLogger.Instance.StartLogging(); dynSettings.Controller = this; Context = context; //Start heartbeat reporting InstrumentationLogger.Start(); PreferenceSettings = preferences; ((PreferenceSettings) PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; SIUnit.LengthUnit = PreferenceSettings.LengthUnit; SIUnit.AreaUnit = PreferenceSettings.AreaUnit; SIUnit.VolumeUnit = PreferenceSettings.VolumeUnit; SIUnit.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.UpdateDownloaded += updateManager_UpdateDownloaded; UpdateManager.ShutdownRequested += updateManager_ShutdownRequested; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation),DynamoLogger.Instance, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //create the view model to which the main window will bind //the DynamoModel is created therein DynamoViewModel = (DynamoViewModel)Activator.CreateInstance( viewModelType, new object[] { this, commandFilePath }); // custom node loader string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pluginsPath = Path.Combine(directory, "definitions"); CustomNodeManager = new CustomNodeManager(pluginsPath); SearchViewModel = new SearchViewModel(); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); DynamoViewModel.Model.CurrentWorkspace.X = 0; DynamoViewModel.Model.CurrentWorkspace.Y = 0; DisposeLogic.IsShuttingDown = false; EngineController = new EngineController(this, false); //This is necessary to avoid a race condition by causing a thread join //inside the vm exec //TODO(Luke): Push this into a resync call with the engine controller ResetEngine(); DynamoLogger.Instance.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadNodeModels(); //run tests if (FScheme.RunTests(DynamoLogger.Instance.Log)) { DynamoLogger.Instance.Log("All Tests Passed. Core library loaded OK."); } InfoBubbleViewModel = new InfoBubbleViewModel(); AddPythonBindings(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); }
/// <summary> /// Class constructor /// </summary> public DynamoController(string context, IUpdateManager updateManager, ILogger logger, IWatchHandler watchHandler, IPreferences preferences) { IsCrashing = false; DynamoLogger = logger; dynSettings.Controller = this; Context = context; //Start heartbeat reporting InstrumentationLogger.Start(); PreferenceSettings = preferences; ((PreferenceSettings) PreferenceSettings).PropertyChanged += PreferenceSettings_PropertyChanged; BaseUnit.LengthUnit = PreferenceSettings.LengthUnit; BaseUnit.AreaUnit = PreferenceSettings.AreaUnit; BaseUnit.VolumeUnit = PreferenceSettings.VolumeUnit; BaseUnit.NumberFormat = PreferenceSettings.NumberFormat; UpdateManager = updateManager; UpdateManager.UpdateDownloaded += updateManager_UpdateDownloaded; UpdateManager.ShutdownRequested += updateManager_ShutdownRequested; UpdateManager.CheckForProductUpdate(new UpdateRequest(new Uri(Configurations.UpdateDownloadLocation),dynSettings.Controller.DynamoLogger, UpdateManager.UpdateDataAvailable)); WatchHandler = watchHandler; //create the model DynamoModel = new DynamoModel (); DynamoModel.AddHomeWorkspace(); DynamoModel.CurrentWorkspace = DynamoModel.HomeSpace; DynamoModel.CurrentWorkspace.X = 0; DynamoModel.CurrentWorkspace.Y = 0; // custom node loader string directory = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location); string pluginsPath = Path.Combine(directory, "definitions"); CustomNodeManager = new CustomNodeManager(pluginsPath); SearchViewModel = new SearchViewModel(); dynSettings.PackageLoader = new PackageLoader(); dynSettings.PackageLoader.DoCachedPackageUninstalls(); dynSettings.PackageLoader.LoadPackages(); DisposeLogic.IsShuttingDown = false; //This is necessary to avoid a race condition by causing a thread join //inside the vm exec //TODO(Luke): Push this into a resync call with the engine controller ResetEngine(); dynSettings.Controller.DynamoLogger.Log(String.Format( "Dynamo -- Build {0}", Assembly.GetExecutingAssembly().GetName().Version)); DynamoLoader.ClearCachedAssemblies(); DynamoLoader.LoadNodeModels(); InfoBubbleViewModel = new InfoBubbleViewModel(); MigrationManager.Instance.MigrationTargets.Add(typeof(WorkspaceMigrations)); evaluationWorker.DoWork += RunThread; }