Skip to content

Commit

Permalink
Merge pull request #666 from mcneel/AndyPayne/Compute286
Browse files Browse the repository at this point in the history
adding version number to program.cs. Making Rhino.Inside.Resolver not…
  • Loading branch information
andyopayne authored Jun 5, 2024
2 parents 99dacbe + 79e2011 commit ed3cbfc
Show file tree
Hide file tree
Showing 2 changed files with 17 additions and 2 deletions.
18 changes: 16 additions & 2 deletions src/compute.geometry/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ static void Main(string[] args)
Logging.Init();

RhinoInside.Resolver.Initialize();
RhinoInside.Resolver.UseLatest = true;
RhinoInside.Resolver.UseLatest = false;
#if DEBUG
// Uncomment the following to debug with core Rhino source. This
// tells compute to use a different RhinoCore than what RhinoInside thinks
Expand All @@ -40,10 +40,11 @@ static void Main(string[] args)
StartTime = DateTime.Now;
Shutdown.RegisterStartTime(StartTime);
Log.Information($"Child process started at " + StartTime.ToLocalTime().ToString());

ParseCommandLineArgs(args);

RhinoInside.Resolver.LoadRhino();

LogVersions();
var host = Host.CreateDefaultBuilder(args)
.ConfigureWebHostDefaults(webBuilder =>
{
Expand Down Expand Up @@ -124,8 +125,21 @@ static void ParseCommandLineArgs(string[] args)
}
}
}
private static void LogVersions()
{
string compute_version = null, rhino_version = null;
try
{
compute_version = System.Reflection.Assembly.GetExecutingAssembly().GetName().Version.ToString();
rhino_version = typeof(Rhino.RhinoApp).Assembly.GetName().Version.ToString();
}
catch { }
Log.Information("Compute {ComputeVersion}, Rhino {RhinoVersion}", compute_version, rhino_version);
Log.Debug("Rhino system directory: {Path}", RhinoInside.Resolver.RhinoSystemDirectory);
}
}


public class RhinoGetModule : ICarterModule
{
public void AddRoutes(IEndpointRouteBuilder app)
Expand Down
1 change: 1 addition & 0 deletions src/compute.geometry/compute.geometry.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
<AppendTargetFrameworkToOutputPath>False</AppendTargetFrameworkToOutputPath>
<AppendRuntimeIdentifierToOutputPath>False</AppendRuntimeIdentifierToOutputPath>
<EnableWindowsTargeting>True</EnableWindowsTargeting>
<Version>8.0.0</Version>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)'=='Debug'">
<OutputPath>..\bin\Debug\$(AssemblyName)</OutputPath>
Expand Down

0 comments on commit ed3cbfc

Please sign in to comment.