From 318fef283e57221349eb6412db63d63399f4fb86 Mon Sep 17 00:00:00 2001 From: Michael Date: Fri, 3 Feb 2017 19:44:01 -0500 Subject: Fix crash handler --- ModLauncher/App.config | 6 ++ ModLauncher/ModLauncher.csproj | 102 +++++++++++++++++++++++ ModLauncher/Program.cs | 33 ++++++++ ModLauncher/Properties/AssemblyInfo.cs | 36 +++++++++ ModLauncher/Properties/Resources.Designer.cs | 71 ++++++++++++++++ ModLauncher/Properties/Resources.resx | 117 +++++++++++++++++++++++++++ ModLauncher/Properties/Settings.Designer.cs | 30 +++++++ ModLauncher/Properties/Settings.settings | 7 ++ ModLauncher/README.txt | 9 +++ 9 files changed, 411 insertions(+) create mode 100644 ModLauncher/App.config create mode 100644 ModLauncher/ModLauncher.csproj create mode 100644 ModLauncher/Program.cs create mode 100644 ModLauncher/Properties/AssemblyInfo.cs create mode 100644 ModLauncher/Properties/Resources.Designer.cs create mode 100644 ModLauncher/Properties/Resources.resx create mode 100644 ModLauncher/Properties/Settings.Designer.cs create mode 100644 ModLauncher/Properties/Settings.settings create mode 100644 ModLauncher/README.txt (limited to 'ModLauncher') diff --git a/ModLauncher/App.config b/ModLauncher/App.config new file mode 100644 index 0000000..88fa402 --- /dev/null +++ b/ModLauncher/App.config @@ -0,0 +1,6 @@ + + + + + + \ No newline at end of file diff --git a/ModLauncher/ModLauncher.csproj b/ModLauncher/ModLauncher.csproj new file mode 100644 index 0000000..7021bfe --- /dev/null +++ b/ModLauncher/ModLauncher.csproj @@ -0,0 +1,102 @@ + + + + + Debug + AnyCPU + {AEACB7B5-E8FC-4569-BBD3-5053A694D6EC} + WinExe + Properties + ModLauncher + ModLauncher + v4.5.2 + 512 + true + + + AnyCPU + true + full + false + bin\Debug\ + DEBUG;TRACE + prompt + 4 + + + AnyCPU + pdbonly + true + bin\Release\ + TRACE + prompt + 4 + + + + + + + + + + + + + + + + + + + ResXFileCodeGenerator + Resources.Designer.cs + Designer + + + True + Resources.resx + + + SettingsSingleFileGenerator + Settings.Designer.cs + + + True + Settings.settings + True + + + + + + + + {a8cba038-c147-4a8d-b170-de6d9ece8364} + ShiftOS.Modding.VB.LegacySkinConverter + + + {ff0b1831-ac9f-4093-9747-ddae4467516a} + ShiftOS.Modding.VirtualMachine + + + {2295d2e2-3a00-4e02-b66f-b961ac329fe6} + ShiftOS.WinForms + + + {7C979B07-0585-4033-A110-E5555B9D6651} + ShiftOS.Engine + + + + + + + + \ No newline at end of file diff --git a/ModLauncher/Program.cs b/ModLauncher/Program.cs new file mode 100644 index 0000000..66e9726 --- /dev/null +++ b/ModLauncher/Program.cs @@ -0,0 +1,33 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using System.Windows.Forms; +using ShiftOS.Engine; + +namespace ModLauncher +{ + [Namespace("modlauncher")] + public static class Program + { + /// + /// The main entry point for the application. + /// + [STAThread] + static void Main() + { + ShiftOS.WinForms.Program.Main(); + } + + [Command("throwcrash")] + public static bool ThrowCrash() + { + new Thread(() => + { + throw new Exception("User triggered crash using modlauncher.throwcrash command."); + }).Start(); + return true; + } + } +} diff --git a/ModLauncher/Properties/AssemblyInfo.cs b/ModLauncher/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..c81934b --- /dev/null +++ b/ModLauncher/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("ModLauncher")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("ModLauncher")] +[assembly: AssemblyCopyright("Copyright © 2017")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// The following GUID is for the ID of the typelib if this project is exposed to COM +[assembly: Guid("aeacb7b5-e8fc-4569-bbd3-5053a694d6ec")] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/ModLauncher/Properties/Resources.Designer.cs b/ModLauncher/Properties/Resources.Designer.cs new file mode 100644 index 0000000..f9213a0 --- /dev/null +++ b/ModLauncher/Properties/Resources.Designer.cs @@ -0,0 +1,71 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ModLauncher.Properties +{ + + + /// + /// A strongly-typed resource class, for looking up localized strings, etc. + /// + // This class was auto-generated by the StronglyTypedResourceBuilder + // class via a tool like ResGen or Visual Studio. + // To add or remove a member, edit your .ResX file then rerun ResGen + // with the /str option, or rebuild your VS project. + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")] + [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + internal class Resources + { + + private static global::System.Resources.ResourceManager resourceMan; + + private static global::System.Globalization.CultureInfo resourceCulture; + + [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] + internal Resources() + { + } + + /// + /// Returns the cached ResourceManager instance used by this class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Resources.ResourceManager ResourceManager + { + get + { + if ((resourceMan == null)) + { + global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("ModLauncher.Properties.Resources", typeof(Resources).Assembly); + resourceMan = temp; + } + return resourceMan; + } + } + + /// + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// + [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] + internal static global::System.Globalization.CultureInfo Culture + { + get + { + return resourceCulture; + } + set + { + resourceCulture = value; + } + } + } +} diff --git a/ModLauncher/Properties/Resources.resx b/ModLauncher/Properties/Resources.resx new file mode 100644 index 0000000..af7dbeb --- /dev/null +++ b/ModLauncher/Properties/Resources.resx @@ -0,0 +1,117 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + text/microsoft-resx + + + 2.0 + + + System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + + System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 + + \ No newline at end of file diff --git a/ModLauncher/Properties/Settings.Designer.cs b/ModLauncher/Properties/Settings.Designer.cs new file mode 100644 index 0000000..fcf42de --- /dev/null +++ b/ModLauncher/Properties/Settings.Designer.cs @@ -0,0 +1,30 @@ +//------------------------------------------------------------------------------ +// +// This code was generated by a tool. +// Runtime Version:4.0.30319.42000 +// +// Changes to this file may cause incorrect behavior and will be lost if +// the code is regenerated. +// +//------------------------------------------------------------------------------ + +namespace ModLauncher.Properties +{ + + + [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] + [global::System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0")] + internal sealed partial class Settings : global::System.Configuration.ApplicationSettingsBase + { + + private static Settings defaultInstance = ((Settings)(global::System.Configuration.ApplicationSettingsBase.Synchronized(new Settings()))); + + public static Settings Default + { + get + { + return defaultInstance; + } + } + } +} diff --git a/ModLauncher/Properties/Settings.settings b/ModLauncher/Properties/Settings.settings new file mode 100644 index 0000000..3964565 --- /dev/null +++ b/ModLauncher/Properties/Settings.settings @@ -0,0 +1,7 @@ + + + + + + + diff --git a/ModLauncher/README.txt b/ModLauncher/README.txt new file mode 100644 index 0000000..f9499eb --- /dev/null +++ b/ModLauncher/README.txt @@ -0,0 +1,9 @@ +What the hell is ModLauncher doing...? + +Well - it's a mod launcher. Simple as that. When debugging +ShiftOS, if you want to write a mod for the game, set this +project as startup - then add a reference to the mod's project. +Then when you hit F5, ShiftOS will launch with the mod you added +loaded up. This is useful because without it, you would have to +make your mod an EXE file and bootstrap the ShiftOS launch sequence +yourself. This takes care of that for you. \ No newline at end of file -- cgit v1.2.3