diff options
| -rw-r--r-- | ModLauncher/App.config | 6 | ||||
| -rw-r--r-- | ModLauncher/ModLauncher.csproj | 102 | ||||
| -rw-r--r-- | ModLauncher/Program.cs | 33 | ||||
| -rw-r--r-- | ModLauncher/Properties/AssemblyInfo.cs | 36 | ||||
| -rw-r--r-- | ModLauncher/Properties/Resources.Designer.cs | 71 | ||||
| -rw-r--r-- | ModLauncher/Properties/Resources.resx | 117 | ||||
| -rw-r--r-- | ModLauncher/Properties/Settings.Designer.cs | 30 | ||||
| -rw-r--r-- | ModLauncher/Properties/Settings.settings | 7 | ||||
| -rw-r--r-- | ModLauncher/README.txt | 9 | ||||
| -rw-r--r-- | ShiftOS.Modding.VB.LegacySkinConverter/My Project/AssemblyInfo.vb | 10 | ||||
| -rw-r--r-- | ShiftOS.Modding.VB.LegacySkinConverter/My Project/Resources.Designer.vb | 25 | ||||
| -rw-r--r-- | ShiftOS.Modding.VB.LegacySkinConverter/My Project/Settings.Designer.vb | 62 | ||||
| -rw-r--r-- | ShiftOS.Modding.VB.LegacySkinConverter/ShiftOS.Modding.VB.LegacySkinConverter.vbproj | 7 | ||||
| -rw-r--r-- | ShiftOS_TheReturn.sln | 6 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/AudioManager.cs | 8 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/CrashHandler.cs | 18 | ||||
| -rw-r--r-- | ShiftOS_TheReturn/SaveSystem.cs | 5 |
17 files changed, 488 insertions, 64 deletions
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 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5.2" /> + </startup> +</configuration>
\ 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 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="14.0" DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> + <Import Project="$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props" Condition="Exists('$(MSBuildExtensionsPath)\$(MSBuildToolsVersion)\Microsoft.Common.props')" /> + <PropertyGroup> + <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> + <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> + <ProjectGuid>{AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}</ProjectGuid> + <OutputType>WinExe</OutputType> + <AppDesignerFolder>Properties</AppDesignerFolder> + <RootNamespace>ModLauncher</RootNamespace> + <AssemblyName>ModLauncher</AssemblyName> + <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugSymbols>true</DebugSymbols> + <DebugType>full</DebugType> + <Optimize>false</Optimize> + <OutputPath>bin\Debug\</OutputPath> + <DefineConstants>DEBUG;TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Release|AnyCPU' "> + <PlatformTarget>AnyCPU</PlatformTarget> + <DebugType>pdbonly</DebugType> + <Optimize>true</Optimize> + <OutputPath>bin\Release\</OutputPath> + <DefineConstants>TRACE</DefineConstants> + <ErrorReport>prompt</ErrorReport> + <WarningLevel>4</WarningLevel> + </PropertyGroup> + <ItemGroup> + <Reference Include="System" /> + <Reference Include="System.Core" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Deployment" /> + <Reference Include="System.Drawing" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Windows.Forms" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + <EmbeddedResource Include="Properties\Resources.resx"> + <Generator>ResXFileCodeGenerator</Generator> + <LastGenOutput>Resources.Designer.cs</LastGenOutput> + <SubType>Designer</SubType> + </EmbeddedResource> + <Compile Include="Properties\Resources.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Resources.resx</DependentUpon> + </Compile> + <None Include="Properties\Settings.settings"> + <Generator>SettingsSingleFileGenerator</Generator> + <LastGenOutput>Settings.Designer.cs</LastGenOutput> + </None> + <Compile Include="Properties\Settings.Designer.cs"> + <AutoGen>True</AutoGen> + <DependentUpon>Settings.settings</DependentUpon> + <DesignTimeSharedInput>True</DesignTimeSharedInput> + </Compile> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <ItemGroup> + <ProjectReference Include="..\ShiftOS.Modding.VB.LegacySkinConverter\ShiftOS.Modding.VB.LegacySkinConverter.vbproj"> + <Project>{a8cba038-c147-4a8d-b170-de6d9ece8364}</Project> + <Name>ShiftOS.Modding.VB.LegacySkinConverter</Name> + </ProjectReference> + <ProjectReference Include="..\ShiftOS.Modding.VirtualMachine\ShiftOS.Modding.VirtualMachine.csproj"> + <Project>{ff0b1831-ac9f-4093-9747-ddae4467516a}</Project> + <Name>ShiftOS.Modding.VirtualMachine</Name> + </ProjectReference> + <ProjectReference Include="..\ShiftOS.WinForms\ShiftOS.WinForms.csproj"> + <Project>{2295d2e2-3a00-4e02-b66f-b961ac329fe6}</Project> + <Name>ShiftOS.WinForms</Name> + </ProjectReference> + <ProjectReference Include="..\ShiftOS_TheReturn\ShiftOS.Engine.csproj"> + <Project>{7C979B07-0585-4033-A110-E5555B9D6651}</Project> + <Name>ShiftOS.Engine</Name> + </ProjectReference> + </ItemGroup> + <ItemGroup> + <Content Include="README.txt" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> + <!-- To modify your build process, add your task inside one of the targets below and uncomment it. + Other similar extension points exist, see Microsoft.Common.targets. + <Target Name="BeforeBuild"> + </Target> + <Target Name="AfterBuild"> + </Target> + --> +</Project>
\ 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 + { + /// <summary> + /// The main entry point for the application. + /// </summary> + [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 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 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. +// </auto-generated> +//------------------------------------------------------------------------------ + +namespace ModLauncher.Properties +{ + + + /// <summary> + /// A strongly-typed resource class, for looking up localized strings, etc. + /// </summary> + // 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() + { + } + + /// <summary> + /// Returns the cached ResourceManager instance used by this class. + /// </summary> + [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; + } + } + + /// <summary> + /// Overrides the current thread's CurrentUICulture property for all + /// resource lookups using this strongly typed resource class. + /// </summary> + [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 @@ +<?xml version="1.0" encoding="utf-8"?> +<root> + <!-- + Microsoft ResX Schema + + Version 2.0 + + The primary goals of this format is to allow a simple XML format + that is mostly human readable. The generation and parsing of the + various data types are done through the TypeConverter classes + associated with the data types. + + Example: + + ... ado.net/XML headers & schema ... + <resheader name="resmimetype">text/microsoft-resx</resheader> + <resheader name="version">2.0</resheader> + <resheader name="reader">System.Resources.ResXResourceReader, System.Windows.Forms, ...</resheader> + <resheader name="writer">System.Resources.ResXResourceWriter, System.Windows.Forms, ...</resheader> + <data name="Name1"><value>this is my long string</value><comment>this is a comment</comment></data> + <data name="Color1" type="System.Drawing.Color, System.Drawing">Blue</data> + <data name="Bitmap1" mimetype="application/x-microsoft.net.object.binary.base64"> + <value>[base64 mime encoded serialized .NET Framework object]</value> + </data> + <data name="Icon1" type="System.Drawing.Icon, System.Drawing" mimetype="application/x-microsoft.net.object.bytearray.base64"> + <value>[base64 mime encoded string representing a byte array form of the .NET Framework object]</value> + <comment>This is a comment</comment> + </data> + + There are any number of "resheader" rows that contain simple + name/value pairs. + + Each data row contains a name, and value. The row also contains a + type or mimetype. Type corresponds to a .NET class that support + text/value conversion through the TypeConverter architecture. + Classes that don't support this are serialized and stored with the + mimetype set. + + The mimetype is used for serialized objects, and tells the + ResXResourceReader how to depersist the object. This is currently not + extensible. For a given mimetype the value must be set accordingly: + + Note - application/x-microsoft.net.object.binary.base64 is the format + that the ResXResourceWriter will generate, however the reader can + read any of the formats listed below. + + mimetype: application/x-microsoft.net.object.binary.base64 + value : The object must be serialized with + : System.Serialization.Formatters.Binary.BinaryFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.soap.base64 + value : The object must be serialized with + : System.Runtime.Serialization.Formatters.Soap.SoapFormatter + : and then encoded with base64 encoding. + + mimetype: application/x-microsoft.net.object.bytearray.base64 + value : The object must be serialized into a byte array + : using a System.ComponentModel.TypeConverter + : and then encoded with base64 encoding. + --> + <xsd:schema id="root" xmlns="" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:msdata="urn:schemas-microsoft-com:xml-msdata"> + <xsd:element name="root" msdata:IsDataSet="true"> + <xsd:complexType> + <xsd:choice maxOccurs="unbounded"> + <xsd:element name="metadata"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" /> + <xsd:attribute name="type" type="xsd:string" /> + <xsd:attribute name="mimetype" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="assembly"> + <xsd:complexType> + <xsd:attribute name="alias" type="xsd:string" /> + <xsd:attribute name="name" type="xsd:string" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="data"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + <xsd:element name="comment" type="xsd:string" minOccurs="0" msdata:Ordinal="2" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" msdata:Ordinal="1" /> + <xsd:attribute name="type" type="xsd:string" msdata:Ordinal="3" /> + <xsd:attribute name="mimetype" type="xsd:string" msdata:Ordinal="4" /> + </xsd:complexType> + </xsd:element> + <xsd:element name="resheader"> + <xsd:complexType> + <xsd:sequence> + <xsd:element name="value" type="xsd:string" minOccurs="0" msdata:Ordinal="1" /> + </xsd:sequence> + <xsd:attribute name="name" type="xsd:string" use="required" /> + </xsd:complexType> + </xsd:element> + </xsd:choice> + </xsd:complexType> + </xsd:element> + </xsd:schema> + <resheader name="resmimetype"> + <value>text/microsoft-resx</value> + </resheader> + <resheader name="version"> + <value>2.0</value> + </resheader> + <resheader name="reader"> + <value>System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> + <resheader name="writer"> + <value>System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089</value> + </resheader> +</root>
\ 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 @@ +//------------------------------------------------------------------------------ +// <auto-generated> +// 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. +// </auto-generated> +//------------------------------------------------------------------------------ + +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 @@ +<?xml version='1.0' encoding='utf-8'?> +<SettingsFile xmlns="http://schemas.microsoft.com/VisualStudio/2004/01/settings" CurrentProfile="(Default)"> + <Profiles> + <Profile Name="(Default)" /> + </Profiles> + <Settings /> +</SettingsFile> 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 diff --git a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/AssemblyInfo.vb b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/AssemblyInfo.vb index 9326cc7..42f5b7b 100644 --- a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/AssemblyInfo.vb +++ b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/AssemblyInfo.vb @@ -8,11 +8,11 @@ Imports System.Runtime.InteropServices ' Review the values of the assembly attributes -<Assembly: AssemblyTitle("ShiftOS.Modding.VB.LegacySkinConverter")> -<Assembly: AssemblyDescription("")> -<Assembly: AssemblyCompany("")> +<Assembly: AssemblyTitle("ShiftOS legacy skin converter")> +<Assembly: AssemblyDescription("A demonstration of how simple it is to interface with the ShiftOS engine")> +<Assembly: AssemblyCompany("ShiftOS")> <Assembly: AssemblyProduct("ShiftOS.Modding.VB.LegacySkinConverter")> -<Assembly: AssemblyCopyright("Copyright © 2017")> +<Assembly: AssemblyCopyright("Copyright © Michael VanOverbeek 2017")> <Assembly: AssemblyTrademark("")> <Assembly: ComVisible(False)> @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices ' by using the '*' as shown below: ' <Assembly: AssemblyVersion("1.0.*")> -<Assembly: AssemblyVersion("1.0.0.0")> +<Assembly: AssemblyVersion("1.0")> <Assembly: AssemblyFileVersion("1.0.0.0")> diff --git a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Resources.Designer.vb b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Resources.Designer.vb index 5fc46e0..68c522a 100644 --- a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Resources.Designer.vb +++ b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Resources.Designer.vb @@ -11,9 +11,10 @@ Option Strict On Option Explicit On +Imports System Namespace My.Resources - + '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 @@ -21,20 +22,20 @@ Namespace My.Resources '''<summary> ''' A strongly-typed resource class, for looking up localized strings, etc. '''</summary> - <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ + <Global.System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0"), _ + Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ + Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ + Global.Microsoft.VisualBasic.HideModuleNameAttribute()> _ Friend Module Resources - + Private resourceMan As Global.System.Resources.ResourceManager - + Private resourceCulture As Global.System.Globalization.CultureInfo - + '''<summary> ''' Returns the cached ResourceManager instance used by this class. '''</summary> - <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend ReadOnly Property ResourceManager() As Global.System.Resources.ResourceManager Get If Object.ReferenceEquals(resourceMan, Nothing) Then @@ -44,17 +45,17 @@ Namespace My.Resources Return resourceMan End Get End Property - + '''<summary> ''' Overrides the current thread's CurrentUICulture property for all ''' resource lookups using this strongly typed resource class. '''</summary> - <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + <Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Friend Property Culture() As Global.System.Globalization.CultureInfo Get Return resourceCulture End Get - Set(ByVal value As Global.System.Globalization.CultureInfo) + Set resourceCulture = value End Set End Property diff --git a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Settings.Designer.vb b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Settings.Designer.vb index b219bbc..2ef0172 100644 --- a/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Settings.Designer.vb +++ b/ShiftOS.Modding.VB.LegacySkinConverter/My Project/Settings.Designer.vb @@ -13,42 +13,42 @@ Option Explicit On Namespace My - - <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ - Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "11.0.0.0"), _ - Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + + <Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute(), _ + Global.System.CodeDom.Compiler.GeneratedCodeAttribute("Microsoft.VisualStudio.Editors.SettingsDesigner.SettingsSingleFileGenerator", "14.0.0.0"), _ + Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ Partial Friend NotInheritable Class MySettings Inherits Global.System.Configuration.ApplicationSettingsBase - - Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings), MySettings) - + + Private Shared defaultInstance As MySettings = CType(Global.System.Configuration.ApplicationSettingsBase.Synchronized(New MySettings()),MySettings) + #Region "My.Settings Auto-Save Functionality" #If _MyType = "WindowsForms" Then - Private Shared addedHandler As Boolean + Private Shared addedHandler As Boolean - Private Shared addedHandlerLockObject As New Object + Private Shared addedHandlerLockObject As New Object - <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ - Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) - If My.Application.SaveMySettingsOnExit Then - My.Settings.Save() - End If - End Sub + <Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), Global.System.ComponentModel.EditorBrowsableAttribute(Global.System.ComponentModel.EditorBrowsableState.Advanced)> _ + Private Shared Sub AutoSaveSettings(ByVal sender As Global.System.Object, ByVal e As Global.System.EventArgs) + If My.Application.SaveMySettingsOnExit Then + My.Settings.Save() + End If + End Sub #End If #End Region - + Public Shared ReadOnly Property [Default]() As MySettings Get - + #If _MyType = "WindowsForms" Then - If Not addedHandler Then - SyncLock addedHandlerLockObject - If Not addedHandler Then - AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings - addedHandler = True - End If - End SyncLock - End If + If Not addedHandler Then + SyncLock addedHandlerLockObject + If Not addedHandler Then + AddHandler My.Application.Shutdown, AddressOf AutoSaveSettings + addedHandler = True + End If + End SyncLock + End If #End If Return defaultInstance End Get @@ -57,13 +57,13 @@ Namespace My End Namespace Namespace My - - <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ - Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ - Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ + + <Global.Microsoft.VisualBasic.HideModuleNameAttribute(), _ + Global.System.Diagnostics.DebuggerNonUserCodeAttribute(), _ + Global.System.Runtime.CompilerServices.CompilerGeneratedAttribute()> _ Friend Module MySettingsProperty - - <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ + + <Global.System.ComponentModel.Design.HelpKeywordAttribute("My.Settings")> _ Friend ReadOnly Property Settings() As Global.ShiftOS.Modding.VB.LegacySkinConverter.My.MySettings Get Return Global.ShiftOS.Modding.VB.LegacySkinConverter.My.MySettings.Default diff --git a/ShiftOS.Modding.VB.LegacySkinConverter/ShiftOS.Modding.VB.LegacySkinConverter.vbproj b/ShiftOS.Modding.VB.LegacySkinConverter/ShiftOS.Modding.VB.LegacySkinConverter.vbproj index f0e5cc2..3a53cc8 100644 --- a/ShiftOS.Modding.VB.LegacySkinConverter/ShiftOS.Modding.VB.LegacySkinConverter.vbproj +++ b/ShiftOS.Modding.VB.LegacySkinConverter/ShiftOS.Modding.VB.LegacySkinConverter.vbproj @@ -5,12 +5,13 @@ <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> <ProjectGuid>{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}</ProjectGuid> - <OutputType>Exe</OutputType> - <StartupObject>ShiftOS.Modding.VB.LegacySkinConverter.Module1</StartupObject> + <OutputType>Library</OutputType> + <StartupObject> + </StartupObject> <RootNamespace>ShiftOS.Modding.VB.LegacySkinConverter</RootNamespace> <AssemblyName>ShiftOS.Modding.VB.LegacySkinConverter</AssemblyName> <FileAlignment>512</FileAlignment> - <MyType>Console</MyType> + <MyType>Windows</MyType> <TargetFrameworkVersion>v4.5.2</TargetFrameworkVersion> <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> </PropertyGroup> diff --git a/ShiftOS_TheReturn.sln b/ShiftOS_TheReturn.sln index 65165ab..98857fa 100644 --- a/ShiftOS_TheReturn.sln +++ b/ShiftOS_TheReturn.sln @@ -17,6 +17,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ShiftOS.Modding.VirtualMach EndProject Project("{F184B08F-C81C-45F6-A57F-5ABD9991F28F}") = "ShiftOS.Modding.VB.LegacySkinConverter", "ShiftOS.Modding.VB.LegacySkinConverter\ShiftOS.Modding.VB.LegacySkinConverter.vbproj", "{A8CBA038-C147-4A8D-B170-DE6D9ECE8364}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ModLauncher", "ModLauncher\ModLauncher.csproj", "{AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -51,6 +53,10 @@ Global {A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Debug|Any CPU.Build.0 = Debug|Any CPU {A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Release|Any CPU.ActiveCfg = Release|Any CPU {A8CBA038-C147-4A8D-B170-DE6D9ECE8364}.Release|Any CPU.Build.0 = Release|Any CPU + {AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}.Debug|Any CPU.Build.0 = Debug|Any CPU + {AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}.Release|Any CPU.ActiveCfg = Release|Any CPU + {AEACB7B5-E8FC-4569-BBD3-5053A694D6EC}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE diff --git a/ShiftOS_TheReturn/AudioManager.cs b/ShiftOS_TheReturn/AudioManager.cs index 5923aa1..1ea4575 100644 --- a/ShiftOS_TheReturn/AudioManager.cs +++ b/ShiftOS_TheReturn/AudioManager.cs @@ -67,7 +67,13 @@ namespace ShiftOS.Engine _out.Volume = volume; } - + internal static void Kill() + { + _running = false; + _out.Stop(); + _out.Dispose(); + _reader.Dispose(); + } } public interface IAudioProvider diff --git a/ShiftOS_TheReturn/CrashHandler.cs b/ShiftOS_TheReturn/CrashHandler.cs index 331a55a..a723136 100644 --- a/ShiftOS_TheReturn/CrashHandler.cs +++ b/ShiftOS_TheReturn/CrashHandler.cs @@ -95,20 +95,14 @@ namespace ShiftOS.Engine public static void Start(Exception e) { - if (SaveSystem.CurrentSave != null) - { - TerminalBackend.InvokeCommand("sos.save"); //save ShiftOS to disk before killing the session - } - - //Close ALL FORMS in the current session. - while (Application.OpenForms.Count != 0) - { - Application.OpenForms[0].Dispose(); - } - - //Disconnect us from the ShiftOS multi-user domain. + if(SaveSystem.CurrentSave != null) + TerminalBackend.InvokeCommand("sos.save"); + AudioManager.Kill(); ServerManager.Disconnect(); + while (Application.OpenForms.Count > 0) + Application.OpenForms[0].Close(); + //Set our global exception variable, and show the exception dialog. HandledException = e; System.Reflection.Assembly assembly = System.Reflection.Assembly.GetExecutingAssembly(); diff --git a/ShiftOS_TheReturn/SaveSystem.cs b/ShiftOS_TheReturn/SaveSystem.cs index 4934221..d2cc521 100644 --- a/ShiftOS_TheReturn/SaveSystem.cs +++ b/ShiftOS_TheReturn/SaveSystem.cs @@ -58,6 +58,11 @@ namespace ShiftOS.Engine /// <param name="useDefaultUI">Whether ShiftOS should initiate it's Windows Forms front-end.</param> public static void Begin(bool useDefaultUI = true) { + AppDomain.CurrentDomain.UnhandledException += (o, a) => + { + CrashHandler.Start((Exception)a.ExceptionObject); + }; + if (!System.IO.File.Exists(Paths.SaveFile)) { var root = new ShiftOS.Objects.ShiftFS.Directory(); |
