Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

adding version number to program.cs. Making Rhino.Inside.Resolver not… #666

Merged
merged 1 commit into from
Jun 5, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading