Skip to content

Commit 4025666

Browse files
committed
Merge branch 'master' into contentmanager-add-to-consist-info
Pull in recent changes from upstream (openrails).
2 parents dcf765f + 511df24 commit 4025666

File tree

262 files changed

+25387
-14047
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

262 files changed

+25387
-14047
lines changed

Source/ContentChecker/ContentChecker.csproj

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,8 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>Exe</OutputType>
5-
<UseWindowsForms>true</UseWindowsForms>
6-
<ImportWindowsDesktopTargets>true</ImportWindowsDesktopTargets>
76
<IsPublishable>False</IsPublishable>
87
<AssemblyTitle>Open Rails Content Checker</AssemblyTitle>
98
<Description>Open Rails Transport Simulator</Description>

Source/ContentChecker/Loader.cs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@
4343
using System.Linq;
4444
using System.Text;
4545
using Microsoft.Xna.Framework.Graphics;
46-
using System.Windows.Forms;
4746

4847
namespace ContentChecker
4948
{
@@ -70,7 +69,7 @@ abstract class Loader
7069
/// <summary> The number of files that were actually loaded </summary>
7170
public int FilesLoaded { get; protected set; }
7271
/// <summary> The number of files that were not loaded but skipped </summary>
73-
public int FilesSkipped {get; protected set;}
72+
public int FilesSkipped { get; protected set; }
7473

7574
/// <summary> The action to take when an additonal file has been identified. This is intended to be set externally </summary>
7675
protected Action<string, Loader> AddAdditionalFileAction { get; set; }
@@ -158,17 +157,13 @@ protected static GraphicsDevice GetGraphicsDevice()
158157
{
159158
if (_graphicsDevice == null)
160159
{
161-
// We use a Windows.Forms Control instead of an xna GAME because it is much easier to use.
162-
var _c = new Control();
163-
164160
// Details probably do not matter too much
165161
PresentationParameters parameters = new PresentationParameters()
166162
{
167163
BackBufferWidth = 100,
168164
BackBufferHeight = 100,
169165
BackBufferFormat = SurfaceFormat.Color,
170166
//DepthStencilFormat = DepthFormat.Depth24,
171-
DeviceWindowHandle = _c.Handle,
172167
PresentationInterval = PresentInterval.Immediate,
173168
IsFullScreen = false,
174169
};

Source/ContentChecker/Program.cs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,11 +77,10 @@ static bool OptionsContain(string[] args, IEnumerable<string> optionNames) {
7777
/// </summary>
7878
static void ShowHelp()
7979
{
80-
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
81-
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
80+
Console.WriteLine("{0} {1}", ApplicationInfo.ApplicationName, VersionInfo.VersionOrBuild);
8281
Console.WriteLine();
8382
Console.WriteLine("Usage:");
84-
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(version.FileName));
83+
Console.WriteLine(" {0} [options] <FILE> [...]", Path.GetFileNameWithoutExtension(ApplicationInfo.ProcessFile));
8584
Console.WriteLine();
8685
Console.WriteLine("Arguments:");
8786
Console.WriteLine(" <FILE> Data files to check; may contain wildcards");

Source/Contrib/ActivityEditor/ActivityEditor/ActivityEditor.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>WinExe</OutputType>
56
<AssemblyName>Contrib.ActivityEditor</AssemblyName>
67
<ApplicationIcon>..\..\..\ORTS.ico</ApplicationIcon>

Source/Contrib/ActivityEditor/LibAE/LibAE.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>Library</OutputType>
56
<AssemblyName>Contrib.LibAE</AssemblyName>
67
<IsPublishable>False</IsPublishable>

Source/Contrib/ContentManager/ContentManager.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>WinExe</OutputType>
56
<RootNamespace>ORTS.ContentManager</RootNamespace>
67
<AssemblyName>Contrib.ContentManager</AssemblyName>

Source/Contrib/ContentManager/ContentManagerGUI.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,8 @@ void searchBox_TextChanged(object sender, EventArgs e)
274274
var content = pending[path];
275275
pending.Remove(path);
276276

277-
if (content.Name.ToLowerInvariant().Contains(search))
277+
// do not add root element to search results, see bug 1944070
278+
if (content.Type != ContentType.Root && content.Name.ToLowerInvariant().Contains(search))
278279
finds.Add(new SearchResult(content, path));
279280

280281
foreach (var child in ((ContentType[])Enum.GetValues(typeof(ContentType))).SelectMany(ct => content.Get(ct)))

Source/Contrib/DataCollector/DataCollector.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>Exe</OutputType>
56
<RootNamespace>ORTS.DataCollector</RootNamespace>
67
<AssemblyName>Contrib.DataCollector</AssemblyName>

Source/Contrib/DataCollector/Program.cs

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@
1919
using ORTS.Common;
2020
using System;
2121
using System.Collections.Generic;
22-
using System.Diagnostics;
2322
using System.IO;
2423
using System.Linq;
2524

@@ -39,11 +38,10 @@ static void Main(string[] args)
3938

4039
static void ShowHelp()
4140
{
42-
var version = FileVersionInfo.GetVersionInfo(typeof(Program).Assembly.Location);
43-
Console.WriteLine("{0} {1}", version.FileDescription, VersionInfo.VersionOrBuild);
41+
Console.WriteLine("{0} {1}", ApplicationInfo.ApplicationName, VersionInfo.VersionOrBuild);
4442
Console.WriteLine();
4543
Console.WriteLine("Usage:");
46-
Console.WriteLine(" {0} [options] [<PATH> [...]]", Path.GetFileNameWithoutExtension(version.FileName));
44+
Console.WriteLine(" {0} [options] [<PATH> [...]]", Path.GetFileNameWithoutExtension(ApplicationInfo.ProcessFile));
4745
Console.WriteLine();
4846
Console.WriteLine("Arguments:");
4947
Console.WriteLine(" <PATH> Directories to scan for specific options");

Source/Contrib/DataConverter/DataConverter.csproj

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
<Project Sdk="Microsoft.NET.Sdk">
22
<PropertyGroup>
3-
<TargetFramework>net472</TargetFramework>
3+
<TargetFramework Condition="'$(BuildDotNet)' == 'true'">net6-windows</TargetFramework>
4+
<TargetFramework Condition="'$(TargetFramework)' == ''">net472</TargetFramework>
45
<OutputType>Exe</OutputType>
56
<RootNamespace>Orts.DataConverter</RootNamespace>
67
<AssemblyName>Contrib.DataConverter</AssemblyName>

0 commit comments

Comments
 (0)