21
21
using Orts . Simulation ;
22
22
using ORTS . Common ;
23
23
using System . IO ;
24
- using System . Windows . Forms ;
25
24
using Orts . Common ;
26
- using System . Diagnostics ;
27
25
28
26
namespace SimulatorTester
29
27
{
@@ -37,23 +35,22 @@ static void Main(string[] args)
37
35
38
36
if ( files . Count != 1 || options . Contains ( "help" , StringComparer . InvariantCultureIgnoreCase ) )
39
37
{
40
- var version = FileVersionInfo . GetVersionInfo ( Application . ExecutablePath ) ;
41
- Console . WriteLine ( "{0} {1}" , version . FileDescription , VersionInfo . VersionOrBuild ) ;
38
+ Console . WriteLine ( "{0} {1}" , ApplicationInfo . ApplicationName , VersionInfo . VersionOrBuild ) ;
42
39
Console . WriteLine ( ) ;
43
40
Console . WriteLine ( "Usage:" ) ;
44
- Console . WriteLine ( " {0} [options] <SAVE_FILE>" , Path . GetFileNameWithoutExtension ( Application . ExecutablePath ) ) ;
41
+ Console . WriteLine ( " {0} [options] <SAVE_FILE>" , Path . GetFileNameWithoutExtension ( ApplicationInfo . ProcessFile ) ) ;
45
42
Console . WriteLine ( ) ;
46
43
Console . WriteLine ( "Arguments:" ) ;
47
- Console . WriteLine ( " <SAVE_FILE> {0} save file to use" , Application . ProductName ) ;
44
+ Console . WriteLine ( " <SAVE_FILE> {0} save file to use" , ApplicationInfo . ProductName ) ;
48
45
Console . WriteLine ( ) ;
49
46
Console . WriteLine ( "Options:" ) ;
50
47
Console . WriteLine ( " /quiet Do not show summary of simulation (only exit code is set)" ) ;
51
- Console . WriteLine ( " /verbose Show version and settings (similar to a {0} log)" , Application . ProductName ) ;
48
+ Console . WriteLine ( " /verbose Show version and settings (similar to a {0} log)" , ApplicationInfo . ProductName ) ;
52
49
Console . WriteLine ( " /fps <FPS> Set the simulation frame-rate [default: 10]" ) ;
53
50
Console . WriteLine ( " /help Show help and usage information" ) ;
54
- Console . WriteLine ( " ...and any standard {0} option" , Application . ProductName ) ;
51
+ Console . WriteLine ( " ...and any standard {0} option" , ApplicationInfo . ProductName ) ;
55
52
Console . WriteLine ( ) ;
56
- Console . WriteLine ( "The {0} takes a save file and:" , version . FileDescription ) ;
53
+ Console . WriteLine ( "The {0} takes a save file and:" , ApplicationInfo . ApplicationName ) ;
57
54
Console . WriteLine ( " - Loads the same activity as contained in the save file" ) ;
58
55
Console . WriteLine ( " - Runs the simulation at the specified FPS for the same duration as the save file" ) ;
59
56
Console . WriteLine ( " - Compares the final position with that contained in the save file" ) ;
@@ -65,15 +62,15 @@ static void Main(string[] args)
65
62
66
63
if ( settings . Verbose )
67
64
{
68
- Console . WriteLine ( "This is a log file for {0}. Please include this file in bug reports." , Application . ProductName ) ;
65
+ Console . WriteLine ( "This is a log file for {0}. Please include this file in bug reports." , ApplicationInfo . ProductName ) ;
69
66
LogSeparator ( ) ;
70
67
71
68
SystemInfo . WriteSystemDetails ( Console . Out ) ;
72
69
LogSeparator ( ) ;
73
70
74
71
Console . WriteLine ( "Version = {0}" , VersionInfo . Version . Length > 0 ? VersionInfo . Version : "<none>" ) ;
75
72
Console . WriteLine ( "Build = {0}" , VersionInfo . Build ) ;
76
- Console . WriteLine ( "Executable = {0}" , Path . GetFileName ( Application . ExecutablePath ) ) ;
73
+ Console . WriteLine ( "Executable = {0}" , Path . GetFileName ( ApplicationInfo . ProcessFile ) ) ;
77
74
foreach ( var arg in args )
78
75
Console . WriteLine ( "Argument = {0}" , arg ) ;
79
76
LogSeparator ( ) ;
0 commit comments