Skip to content

Commit b4c9c22

Browse files
committed
remove unnecessary --rename crap and normalize startup dump
1 parent 90daa7f commit b4c9c22

File tree

4 files changed

+10
-34
lines changed

4 files changed

+10
-34
lines changed

Intersect.Client/Program.cs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
using System.Reflection;
22
using Intersect.Framework.Reflection;
33

4-
Console.WriteLine($"Starting {Assembly.GetExecutingAssembly().GetMetadataName()} in {Environment.CurrentDirectory}...");
4+
var executingAssembly = Assembly.GetExecutingAssembly();
5+
Console.WriteLine(
6+
$"Starting {executingAssembly.GetMetadataName()} in {Environment.CurrentDirectory}...\n\t{string.Join(' ', args)}"
7+
);
58

69
Intersect.Client.Core.Program.Main(Assembly.GetExecutingAssembly(), args);

Intersect.Editor/Core/Program.cs

Lines changed: 3 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -36,46 +36,18 @@ static Program()
3636
}
3737
}
3838

39-
private static bool IsRename(string arg)
40-
{
41-
return string.Equals("--rename", arg, StringComparison.OrdinalIgnoreCase);
42-
}
43-
44-
private static bool IsNotRename(string arg)
45-
{
46-
return !IsRename(arg);
47-
}
48-
4939
/// <summary>
5040
/// The main entry point for the application.
5141
/// </summary>
5242
[STAThread]
5343
public static void Main(string[] args)
5444
{
5545
var executingAssembly = Assembly.GetExecutingAssembly();
56-
var executingAssemblyName = executingAssembly.GetName();
57-
System.Console.WriteLine(
58-
$@"{executingAssemblyName.Name} {executingAssembly.GetVersionName()}\n\t{string.Join(' ', args)}"
46+
Console.WriteLine(
47+
$"Starting {executingAssembly.GetMetadataName()} in {Environment.CurrentDirectory}...\n\t{string.Join(' ', args)}"
5948
);
6049

61-
var rename = args.SkipWhile(IsNotRename).Take(2).LastOrDefault();
62-
// var restartArgs = args.Where((arg, index) => IsNotRename(arg) && (index < 1 || IsNotRename(args[index - 1])))
63-
// .ToArray();
64-
// Console.WriteLine($"Replacement args: {string.Join(' ', restartArgs)}");
65-
// Environment.Exit(1);
66-
if (!string.IsNullOrWhiteSpace(rename))
67-
{
68-
if (!ProcessHelper.TryReplaceTargetWithEntryAssembly(rename))
69-
{
70-
Console.Error.WriteLine(
71-
$"Failed to replace \"{rename}\" with current executable to complete the auto-update process."
72-
);
73-
Environment.Exit(1);
74-
}
75-
}
76-
77-
// Console.WriteLine($"rename={rename}");
78-
// Environment.Exit(0);
50+
var executingAssemblyName = executingAssembly.GetName();
7951

8052
LoggingLevelSwitch loggingLevelSwitch =
8153
new(Debugger.IsAttached ? LogEventLevel.Debug : LogEventLevel.Information);

Intersect.Editor/Properties/launchSettings.json

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
{
22
"profiles": {
33
"Intersect.Editor": {
4-
"commandLineArgs": "--rename \"Intersect Editor.exe\"",
54
"commandName": "Project",
65
"workingDirectory": "$(ProjectDir)../assets/development/client"
76
}

Intersect.Server/Program.cs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,9 @@ public static void Main(string[] args)
2323
try
2424
{
2525
var executingAssembly = Assembly.GetExecutingAssembly();
26-
Console.WriteLine($"Starting {executingAssembly.GetMetadataName()}...");
26+
Console.WriteLine(
27+
$"Starting {executingAssembly.GetMetadataName()} in {Environment.CurrentDirectory}...\n\t{string.Join(' ', args)}"
28+
);
2729

2830
ServerContext.ServerContextFactory = (options, logger, packetHelper) =>
2931
new FullServerContext(executingAssembly, options, logger, packetHelper);

0 commit comments

Comments
 (0)