Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
pinzart committed Oct 31, 2023
1 parent 4f279a9 commit 171acad
Show file tree
Hide file tree
Showing 16 changed files with 220 additions and 333 deletions.
6 changes: 3 additions & 3 deletions src/AssemblySharedInfoGenerator/AssemblySharedInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
// associated with an assembly.
[assembly: AssemblyCompany("Autodesk, Inc")]
[assembly: AssemblyProduct("Dynamo")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2023")]
[assembly: AssemblyCopyright("Copyright © Autodesk, Inc 2023")]
[assembly: AssemblyTrademark("")]

//In order to begin building localizable applications, set
Expand Down Expand Up @@ -45,7 +45,7 @@
// to distinguish one build from another. AssemblyFileVersion is specified
// in AssemblyVersionInfo.cs so that it can be easily incremented by the
// automated build process.
[assembly: AssemblyVersion("3.0.0.5795")]
[assembly: AssemblyVersion("3.0.0.6650")]


// By default, the "Product version" shown in the file properties window is
Expand All @@ -64,4 +64,4 @@
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyFileVersion("3.0.0.5795")]
[assembly: AssemblyFileVersion("3.0.0.6650")]
5 changes: 5 additions & 0 deletions src/Directory.Build.props
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<Project>
<PropertyGroup>
<SolutionDir>D:\dev\dynamo\DynamoDS\src\</SolutionDir>
</PropertyGroup>
</Project>
385 changes: 102 additions & 283 deletions src/DynamoCore.sln

Large diffs are not rendered by default.

12 changes: 5 additions & 7 deletions src/DynamoCore/Configuration/PathManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ internal static string BuiltinPackagesDirectory
{
if (builtinPackagesDirectory == null)
{
builtinPackagesDirectory = Path.Combine(Path.GetDirectoryName(Assembly.GetAssembly(typeof(PathManager)).Location), builtinPackagesDirName, @"Packages");
builtinPackagesDirectory = Path.Combine(AppContext.BaseDirectory, builtinPackagesDirName, @"Packages");
}
return builtinPackagesDirectory;
}
Expand Down Expand Up @@ -345,7 +345,7 @@ public bool ResolveDocumentPath(ref string document)
document = Path.GetFileName(document);

// Search alongside the main assembly location...
var executingAssemblyPathName = Assembly.GetExecutingAssembly().Location;
var executingAssemblyPathName = AppContext.BaseDirectory;
var rootModuleDirectory = Path.GetDirectoryName(executingAssemblyPathName);
document = Path.Combine(rootModuleDirectory, document);

Expand Down Expand Up @@ -391,8 +391,7 @@ internal PathManager(PathManagerParams pathManagerParams)
{
// If the caller does not provide an alternative core path,
// use the default folder in which DynamoCore.dll resides.
var dynamoCorePath = Assembly.GetExecutingAssembly().Location;
corePath = Path.GetDirectoryName(dynamoCorePath);
corePath = AppContext.BaseDirectory;
}

dynamoCoreDir = corePath;
Expand All @@ -419,9 +418,8 @@ internal PathManager(PathManagerParams pathManagerParams)
minorFileVersion = pathManagerParams.MinorFileVersion;
if (majorFileVersion == 0 && (minorFileVersion == 0))
{
var v = FileVersionInfo.GetVersionInfo(assemblyPath);
majorFileVersion = v.FileMajorPart;
minorFileVersion = v.FileMinorPart;
majorFileVersion = 3;
minorFileVersion = 0;
}

BuildUserSpecificDirectories();
Expand Down
1 change: 1 addition & 0 deletions src/DynamoCore/Configuration/PreferenceSettings.cs
Original file line number Diff line number Diff line change
Expand Up @@ -978,6 +978,7 @@ public bool SaveInternal(string preferenceFilePath)
/// </returns>
public static PreferenceSettings Load(string filePath)
{
return new PreferenceSettings();
// Constructor will be called anyway in either condition below so no need to initialize now.
PreferenceSettings settings = null;

Expand Down
25 changes: 15 additions & 10 deletions src/DynamoCore/Core/NodeModelAssemblyLoader.cs
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,9 @@ var assembly in

// find all the dlls registered in all search paths
// and concatenate with all dlls in the current directory
var allDynamoAssemblyPaths = nodeDirectories.SelectMany(
path => Directory.GetFiles(path, "*.dll", SearchOption.TopDirectoryOnly));
var allDynamoAssemblyPaths = new List<string>();
/*nodeDirectories.SelectMany(
path => Directory.GetFiles(path, "*.dll", SearchOption.TopDirectoryOnly));*/

// add the core assembly to get things like code block nodes and watches.
//allDynamoAssemblyPaths.Add(Path.Combine(DynamoPathManager.Instance.MainExecPath, "DynamoCore.dll"));
Expand All @@ -131,19 +132,23 @@ var assembly in
var result = new List<TypeLoadData>();
var result2 = new List<TypeLoadData>();

foreach (var assemblyPath in allDynamoAssemblyPaths)
var allAsses = new List<string>
{
Path.Combine(AppContext.BaseDirectory, "CoreNodeModels.dll"),
Path.Combine(AppContext.BaseDirectory, "GeometryUI.dll"),
Path.Combine(AppContext.BaseDirectory, "Migrations.dll"),
Path.Combine(AppContext.BaseDirectory, "UnitsNodeModels.dll"),
Path.Combine(AppContext.BaseDirectory, "Watch3DNodeModels.dll")
};

foreach (var assemblyPath in allAsses)
{
var fn = Path.GetFileName(assemblyPath);

if (fn == null)
continue;

// if the assembly has already been loaded, then
// skip it, otherwise cache it.
if (LoadedAssemblyNames.Contains(fn))
if (LoadedAssemblyNames.Contains(assemblyPath))
continue;

LoadedAssemblyNames.Add(fn);
LoadedAssemblyNames.Add(assemblyPath);

try
{
Expand Down
8 changes: 3 additions & 5 deletions src/DynamoCore/DynamoCore.csproj
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk">
<Project Sdk="Microsoft.NET.Sdk">
<ImportGroup Label="PropertySheets">
<Import Project="$(SolutionDir)Config\CS_SDK.props" />
</ImportGroup>
Expand Down Expand Up @@ -28,8 +28,8 @@
<ItemGroup Label="Common dependencies">
<PackageReference Include="Autodesk.IDSDK" Version="1.1.6" />
<PackageReference Include="Greg" Version="3.0.0.2955" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="3.0.0.2855" GeneratePathProperty="true" />
<PackageReference Include="DynamoVisualProgramming.LibG_230_0_0" Version="3.0.0.2880" GeneratePathProperty="true" />
<PackageReference Include="DynamoVisualProgramming.LibG_229_0_0" Version="2.18.0.665" GeneratePathProperty="true" />
<PackageReference Include="DynamoVisualProgramming.LibG_228_0_0" Version="2.18.0.665" GeneratePathProperty="true" />
<PackageReference Include="Newtonsoft.Json" Version="13.0.1" CopyXML="true" />
<PackageReference Include="RestSharp" Version="109.0.1" CopyXML="true" />
<PackageReference Include="Lucene.Net" Version="4.8.0-beta00016" />
Expand Down Expand Up @@ -149,8 +149,6 @@
<Copy SourceFiles="@(LibGProtoGeometryXml)" DestinationFolder="$(OutputPath)" />
<Copy SourceFiles="@(LibGProtoGeometryXml)" DestinationFolder="$(OutputPath)\$(UICulture)" />
<Copy SourceFiles="@(LibGProtoGeometryUICulture)" DestinationFolder="$(OutputPath)\$(UICulture)" />
<Copy Condition="$(Platform.Contains('Linux'))" SourceFiles="@(LibG229Deps)" DestinationFolder="$(OutputPath)libg_229_0_0\asm_deps\" />
<Copy Condition="$(Platform.Contains('Linux'))" SourceFiles="@(LibG230Deps)" DestinationFolder="$(OutputPath)libg_230_0_0\asm_deps\" />
<Exec Command="$(PowerShellCommand) -ExecutionPolicy ByPass -Command Copy-Item -Path $(LibGProtoGeometryLibGLocale) -Destination $(OutputPath) -Recurse -Force" />
<Copy SourceFiles="@(LibG230)" DestinationFolder="$(OutputPath)libg_230_0_0\" />
<Copy SourceFiles="@(LibG229)" DestinationFolder="$(OutputPath)libg_229_0_0\" />
Expand Down
6 changes: 1 addition & 5 deletions src/DynamoCore/Models/DynamoModel.cs
Original file line number Diff line number Diff line change
Expand Up @@ -944,11 +944,7 @@ protected DynamoModel(IStartConfiguration config)
}

UpdateManager.Log += UpdateManager_Log;
if (!IsTestMode && !IsHeadless && !IsServiceMode)
{
DefaultUpdateManager.CheckForProductUpdate(UpdateManager);
}


Logger.Log(string.Format("Dynamo -- Build {0}",
Assembly.GetExecutingAssembly().GetName().Version));

Expand Down
4 changes: 2 additions & 2 deletions src/DynamoCore/Scheduler/DynamoScheduler.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.Threading;

Expand Down Expand Up @@ -163,7 +163,7 @@ internal DynamoScheduler(ISchedulerThread schedulerThread, TaskProcessMode proce
// scheduler as soon as this method is invoked. It is important for
// this call to be made at the very end of the constructor so we are
// sure everything in the scheduler is ready for access.
this.schedulerThread.Initialize(this);
//this.schedulerThread.Initialize(this);
}

/// <summary>
Expand Down
5 changes: 3 additions & 2 deletions src/DynamoCore/Updates/UpdateManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,7 @@ public static bool TryGetConfigFilePath(out string filePath)
{
string location = Assembly.GetExecutingAssembly().Location;
// ReSharper disable once AssignNullToNotNullAttribute, location is always available
filePath = Path.Combine(Path.GetDirectoryName(location), DEFAULT_CONFIG_FILE_S);
filePath = Path.Combine(AppContext.BaseDirectory, DEFAULT_CONFIG_FILE_S);
return File.Exists(filePath);
}

Expand Down Expand Up @@ -806,6 +806,7 @@ void UpdateManager_PropertyChanged(object sender, PropertyChangedEventArgs e)
/// </summary>
public void CheckForProductUpdate(IAsynchronousRequest request)
{
return;
OnLog(new LogEventArgs("RequestUpdateVersionInfo", LogLevel.File));
OnLog(new LogEventArgs(Properties.Resources.RequestingVersionUpdate, LogLevel.Console));

Expand Down Expand Up @@ -941,7 +942,7 @@ public void HostApplicationBeginQuit()
if (string.IsNullOrEmpty(UpdateFileLocation) || !File.Exists(UpdateFileLocation))
return;

var currDir = Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location);
var currDir = AppContext.BaseDirectory;
var updater = Path.Combine(currDir, INSTALLUPDATE_EXE);

// Double check that that the updater program exists.
Expand Down
4 changes: 2 additions & 2 deletions src/DynamoUtilities/DebugModes.cs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
using System;
using System;
using System.Collections.Generic;
using System.IO;
using System.Reflection;
Expand Down Expand Up @@ -95,7 +95,7 @@ internal static void LoadDebugModesStatusFromConfig(string configPath)
static DebugModes()
{
RegisterDebugModes();
LoadDebugModesStatusFromConfig(Path.Combine(Path.GetDirectoryName(Assembly.GetExecutingAssembly().Location), "debug.config"));
LoadDebugModesStatusFromConfig(Path.Combine(AppContext.BaseDirectory, "debug.config"));
}

/// <summary>
Expand Down
2 changes: 1 addition & 1 deletion src/Engine/ProtoCore/FFI/FFIExecutionManager.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ public static FFIExecutionManager Instance

public Assembly LoadAssembly(string name)
{
System.Diagnostics.Debug.Write("Trying to load assembly: " + name);
System.Console.WriteLine("Trying to load assembly: " + name);
if (System.IO.File.Exists(name))
{
try
Expand Down
4 changes: 2 additions & 2 deletions src/Engine/ProtoCore/FFI/ImportModuleHandler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public ProtoCore.AST.AssociativeAST.ImportNode Import(string moduleName, string
ProtoCore.AST.AssociativeAST.ImportNode node = new ProtoCore.AST.AssociativeAST.ImportNode();
node.ModuleName = moduleName;

string modulePathFileName = FileUtils.GetDSFullPathName(moduleName, _coreObj.Options);
string modulePathFileName = Path.Combine(AppContext.BaseDirectory, moduleName);//FileUtils.GetDSFullPathName(moduleName, _coreObj.Options);

// Tracking directory paths for all imported DS files during preload assembly stage so that they can be accessed by Graph compiler before execution - pratapa
if (_coreObj.IsParsingPreloadedAssembly)
Expand All @@ -61,7 +61,7 @@ public ProtoCore.AST.AssociativeAST.ImportNode Import(string moduleName, string

if (modulePathFileName == null || !File.Exists(modulePathFileName))
{
System.Diagnostics.Debug.Write(@"Cannot import file: '" + modulePathFileName);
System.Console.WriteLine(@"Cannot import file: '" + modulePathFileName);
_coreObj.LogWarning(ProtoCore.BuildData.WarningID.FileNotFound, string.Format(Resources.kFileNotFound, modulePathFileName));
return null;
}
Expand Down
6 changes: 1 addition & 5 deletions src/Libraries/CoreNodeModels/CoreNodeModels.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -50,11 +50,7 @@
<Name>CoreNodes</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\DynamoConversions\DynamoConversions.csproj">
<Project>{c5adc05b-34e8-47bf-8e78-9c7bf96418c2}</Project>
<Name>DynamoConversions</Name>
<Private>False</Private>
</ProjectReference>
<ProjectReference Include="..\DynamoConversions\DynamoConversions.csproj" />
<ProjectReference Include="..\VMDataBridge\VMDataBridge.csproj">
<Project>{ccb6e56b-2da1-4eba-a1f9-e8510e129d12}</Project>
<Name>VMDataBridge</Name>
Expand Down
2 changes: 1 addition & 1 deletion src/Libraries/DynamoUnits/Utilities.cs
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ static Utilities()
/// </summary>
internal static void Initialize()
{
var assemblyFilePath = Assembly.GetExecutingAssembly().Location;
var assemblyFilePath = AppContext.BaseDirectory;

var config = ConfigurationManager.OpenExeConfiguration(assemblyFilePath);
var key = config.AppSettings.Settings["schemaPath"];
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
<?xml version="1.0"?>
<?dll version="1.0"?>
<package xmlns="http://schemas.microsoft.com/packaging/2012/06/nuspec.xsd">
<metadata>
<id>DynamoVisualProgramming.ServiceCoreRuntime</id>
<version>$Version$</version>
<id>DynamoVisualProgramming.Engine</id>
<version>1.0.0</version>
<authors>Autodesk</authors>
<owners>Autodesk</owners>
<license type="expression">Apache-2.0</license>
Expand All @@ -11,12 +11,80 @@
<description>Assemblies required to start a DynamoModel and execute DesignScript code bundled along with their dependencies.
Built targeting linux. </description>
<copyright>Copyright Autodesk 2023</copyright>
<dependencies>
<dependencies>
<group targetFramework="net6.0">
<dependency id="Autodesk.IDSDK" version="1.1.6" />
<dependency id="DynamoVisualProgramming.Analytics" version="4.1.0.2437" />
<dependency id="ForgeUnits.NET" version="4.1.1" />
<dependency id="ForgeUnits.Schemas" version="1.0.1" />
<dependency id="Greg" version="3.0.0.2955" />
<dependency id="Lucene.Net" version="4.8.0-beta00016" />
<dependency id="Lucene.Net.Analysis.Common" version="4.8.0-beta00016" />
<dependency id="Lucene.Net.QueryParser" version="4.8.0-beta00016" />
<dependency id="MIConvexHull" version="1.1.17.411" />
<dependency id="Microsoft.Win32.Registry" version="4.7.0" />
<dependency id="Newtonsoft.Json" version="13.0.1" />
<dependency id="RestSharp" version="109.0.1" />
<dependency id="SoapFormatter" version="1.0.11" />
<dependency id="StarMath" version="2.0.17.1019" />
<dependency id="System.CodeDom" version="6.0.0" />
<dependency id="System.Configuration.ConfigurationManager" version="5.0.0" />
<dependency id="System.Drawing.Common" version="6.0.0" />
</group>
</dependencies>
</metadata>
<files>
<file src="**" target="lib\net6.0\" exclude="en-US\fallback_docs\*"/>
<file src="DynamoUtilities.dll" target="lib\net6.0" />
<file src="DynamoCore.dll" target="lib\net6.0" />
<file src="DynamoCore.customization.dll" target="lib\net6.0" />
<file src="GraphLayout.dll" target="lib\net6.0" />
<file src="ProtoAssociative.dll" target="lib\net6.0" />
<file src="ProtoCore.dll" target="lib\net6.0" />
<file src="ProtoImperative.dll" target="lib\net6.0" />
<file src="ProtoScript.dll" target="lib\net6.0" />
<file src="DSCoreNodes.dll" target="lib\net6.0" />
<file src="DSCoreNodes.customization.dll" target="lib\net6.0" />
<file src="VMDataBridge.dll" target="lib\net6.0" />
<file src="DesignScriptBuiltin.dll" target="lib\net6.0" />
<file src="DesignScriptBuiltin.customization.dll" target="lib\net6.0" />
<file src="BuiltIn.ds" target="lib\net6.0" />
<file src="DynamoServices.dll" target="lib\net6.0" />
<file src="DynamoConversions.dll" target="lib\net6.0" />
<file src="DSCoreNodes_DynamoCustomization.xml" target="lib\net6.0" />
<file src="Analysis.dll" target="lib\net6.0" />
<file src="Analysis.customization.dll" target="lib\net6.0" />
<file src="GeometryColor.dll" target="lib\net6.0" />
<file src="GeometryColor.customization.dll" target="lib\net6.0" />
<file src="Tessellation.customization.dll" target="lib\net6.0" />
<file src="Tessellation.dll" target="lib\net6.0" />
<file src="DynamoUnits.dll" target="lib\net6.0" />
<file src="DynamoUnits.customization.dll" target="lib\net6.0" />

<file src="D:\dev\test projects\c#\DynamoWasm\DynamoVisualProgramming.Engine.1.0.16\lib\net6.0\ProtoGeometry.dll" target="lib\net6.0" />
<file src="D:\dev\test projects\c#\DynamoWasm\DynamoVisualProgramming.Engine.1.0.16\lib\net6.0\LibG.Interface.dll" target="lib\net6.0" />
<file src="D:\dev\test projects\c#\DynamoWasm\DynamoVisualProgramming.Engine.1.0.16\lib\net6.0\LibG.Managed.dll" target="lib\net6.0" />
<file src="D:\dev\test projects\c#\DynamoWasm\DynamoVisualProgramming.Engine.1.0.16\lib\net6.0\LibG.ProtoInterface.dll" target="lib\net6.0" />
<file src="D:\dev\test projects\c#\DynamoWasm\DynamoVisualProgramming.Engine.1.0.16\lib\en-US\ProtoGeometry.resources.dll" target="lib\en-US" />

<file src="nodes\CoreNodeModels.dll" target="lib\net6.0" />
<file src="nodes\CoreNodeModels.customization.dll" target="lib\net6.0" />
<file src="nodes\en-US\CoreNodeModels.resources.dll" target="lib\en-US" />
<file src="nodes\GeometryUI.dll" target="lib\net6.0" />
<file src="nodes\GeometryUI.customization.dll" target="lib\nodes" />
<file src="nodes\en-US\GeometryUI.resources.dll" target="lib\en-US" />
<file src="nodes\UnitsNodeModels.dll" target="lib\net6.0" />
<file src="nodes\UnitsNodeModels.customization.dll" target="lib\net6.0" />
<file src="nodes\en-US\UnitsNodeModels.resources.dll" target="lib\en-US" />
<file src="nodes\Watch3DNodeModels.customization.dll" target="lib\net6.0" />
<file src="nodes\Watch3DNodeModels.dll" target="lib\net6.0" />
<file src="nodes\en-US\Watch3DNodeModels.resources.dll" target="lib\en-US" />

<file src="en-US\DesignScriptBuiltin.resources.dll" target="lib\en-US" />
<file src="en-US\DSCoreNodes.resources.dll" target="lib\en-US" />
<file src="en-US\DynamoCore.resources.dll" target="lib\en-US" />
<file src="en-US\DynamoUtilities.resources.dll" target="lib\en-US" />
<file src="en-US\ProtoAssociative.resources.dll" target="lib\en-US" />
<file src="en-US\ProtoImperative.resources.dll" target="lib\en-US" />
<file src="en-US\ProtoCore.resources.dll" target="lib\en-US" />
</files>
</package>

0 comments on commit 171acad

Please sign in to comment.