diff options
| author | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-10 04:38:54 +0100 |
|---|---|---|
| committer | Adrian Ulbrich <adrian.ulbrich.2003@gmail.com> | 2019-11-10 04:38:54 +0100 |
| commit | 52a942a38066557250f9a0bedbd820f1e004bcea (patch) | |
| tree | b1e6477eb100ca3cd156db099dccab5229305cf1 | |
| parent | cc845ca858be069ea6349e2da0c28ff891abd1a7 (diff) | |
| download | Unicity-52a942a38066557250f9a0bedbd820f1e004bcea.tar.gz Unicity-52a942a38066557250f9a0bedbd820f1e004bcea.tar.bz2 Unicity-52a942a38066557250f9a0bedbd820f1e004bcea.zip | |
Added launcher
| -rw-r--r-- | Unicity.DevLauncher/App.config | 6 | ||||
| -rw-r--r-- | Unicity.DevLauncher/Program.cs | 37 | ||||
| -rw-r--r-- | Unicity.DevLauncher/Properties/AssemblyInfo.cs | 36 | ||||
| -rw-r--r-- | Unicity.DevLauncher/Unicity.DevLauncher.csproj | 54 | ||||
| -rw-r--r-- | Unicity.Renderer/Resources/vertexShader.vert | 2 | ||||
| -rw-r--r-- | Unicity.sln | 6 |
6 files changed, 140 insertions, 1 deletions
diff --git a/Unicity.DevLauncher/App.config b/Unicity.DevLauncher/App.config new file mode 100644 index 0000000..56efbc7 --- /dev/null +++ b/Unicity.DevLauncher/App.config @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="utf-8" ?> +<configuration> + <startup> + <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> + </startup> +</configuration>
\ No newline at end of file diff --git a/Unicity.DevLauncher/Program.cs b/Unicity.DevLauncher/Program.cs new file mode 100644 index 0000000..41f6924 --- /dev/null +++ b/Unicity.DevLauncher/Program.cs @@ -0,0 +1,37 @@ +using System; +using System.IO; +using System.IO.Compression; +using System.Net; +using System.Reflection; + +namespace Unicity.DevLauncher +{ + class Program + { + const string devUrl = "https://dl.dropboxusercontent.com/s/2rfo1tycz73rr5s/dev.zip"; + static string tempDir = Path.GetTempPath() + "unicity"; + + static void Main(string[] args) + { + if (Directory.Exists(tempDir)) + { + Directory.Delete(tempDir, true); + } + Directory.CreateDirectory(tempDir); + + using (WebClient client = new WebClient()) + { + System.Console.WriteLine("Downloading latest build..."); + client.DownloadFile(devUrl, tempDir + "/game.zip"); + Console.WriteLine("Extracting files..."); + ZipFile.ExtractToDirectory(tempDir + "/game.zip", tempDir + "/game"); + + Console.WriteLine("Launching game..."); + Assembly assembly = Assembly.LoadFrom(Path.GetFullPath(tempDir + "/game/dotnet-framework-all/Unicity.Game.exe")); + Type program = assembly.GetType("Unicity.Game.Program"); + MethodInfo main = program.GetMethod("Main", BindingFlags.NonPublic | BindingFlags.Static); + main.Invoke(null, new object[] { args }); + } + } + } +} diff --git a/Unicity.DevLauncher/Properties/AssemblyInfo.cs b/Unicity.DevLauncher/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..ebc189e --- /dev/null +++ b/Unicity.DevLauncher/Properties/AssemblyInfo.cs @@ -0,0 +1,36 @@ +using System.Reflection; +using System.Runtime.CompilerServices; +using System.Runtime.InteropServices; + +// Allgemeine Informationen über eine Assembly werden über die folgenden +// Attribute gesteuert. Ändern Sie diese Attributwerte, um die Informationen zu ändern, +// die einer Assembly zugeordnet sind. +[assembly: AssemblyTitle("Unicity.DevLauncher")] +[assembly: AssemblyDescription("")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("")] +[assembly: AssemblyProduct("Unicity.DevLauncher")] +[assembly: AssemblyCopyright("Copyright © 2019")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Durch Festlegen von ComVisible auf FALSE werden die Typen in dieser Assembly +// für COM-Komponenten unsichtbar. Wenn Sie auf einen Typ in dieser Assembly von +// COM aus zugreifen müssen, sollten Sie das ComVisible-Attribut für diesen Typ auf "True" festlegen. +[assembly: ComVisible(false)] + +// Die folgende GUID bestimmt die ID der Typbibliothek, wenn dieses Projekt für COM verfügbar gemacht wird +[assembly: Guid("85c151c3-42fe-4a80-af5c-b4782c0f1ae1")] + +// Versionsinformationen für eine Assembly bestehen aus den folgenden vier Werten: +// +// Hauptversion +// Nebenversion +// Buildnummer +// Revision +// +// Sie können alle Werte angeben oder Standardwerte für die Build- und Revisionsnummern verwenden, +// indem Sie "*" wie unten gezeigt eingeben: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0.0")] +[assembly: AssemblyFileVersion("1.0.0.0")] diff --git a/Unicity.DevLauncher/Unicity.DevLauncher.csproj b/Unicity.DevLauncher/Unicity.DevLauncher.csproj new file mode 100644 index 0000000..30d1cd7 --- /dev/null +++ b/Unicity.DevLauncher/Unicity.DevLauncher.csproj @@ -0,0 +1,54 @@ +<?xml version="1.0" encoding="utf-8"?> +<Project ToolsVersion="15.0" 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>{85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}</ProjectGuid> + <OutputType>Exe</OutputType> + <RootNamespace>Unicity.DevLauncher</RootNamespace> + <AssemblyName>Unicity.DevLauncher</AssemblyName> + <TargetFrameworkVersion>v4.7.2</TargetFrameworkVersion> + <FileAlignment>512</FileAlignment> + <AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects> + <Deterministic>true</Deterministic> + </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.IO.Compression.FileSystem" /> + <Reference Include="System.Xml.Linq" /> + <Reference Include="System.Data.DataSetExtensions" /> + <Reference Include="Microsoft.CSharp" /> + <Reference Include="System.Data" /> + <Reference Include="System.Net.Http" /> + <Reference Include="System.Xml" /> + </ItemGroup> + <ItemGroup> + <Compile Include="Program.cs" /> + <Compile Include="Properties\AssemblyInfo.cs" /> + </ItemGroup> + <ItemGroup> + <None Include="App.config" /> + </ItemGroup> + <Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" /> +</Project>
\ No newline at end of file diff --git a/Unicity.Renderer/Resources/vertexShader.vert b/Unicity.Renderer/Resources/vertexShader.vert index 7d1ab7f..33ead73 100644 --- a/Unicity.Renderer/Resources/vertexShader.vert +++ b/Unicity.Renderer/Resources/vertexShader.vert @@ -9,4 +9,4 @@ void main() { gl_Position = vec4(aPos, 1.0f); vertexColor = vec4(aColor, 1.0f); -}
\ No newline at end of file +} diff --git a/Unicity.sln b/Unicity.sln index 5abddca..c3938c5 100644 --- a/Unicity.sln +++ b/Unicity.sln @@ -9,6 +9,8 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unicity.Game", "Unicity.Gam EndProject Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unicity.Renderer", "Unicity.Renderer\Unicity.Renderer.csproj", "{7C0C6E9F-6BC9-4825-B657-8DACE26CF4FD}" EndProject +Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Unicity.DevLauncher", "Unicity.DevLauncher\Unicity.DevLauncher.csproj", "{85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}" +EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution Debug|Any CPU = Debug|Any CPU @@ -27,6 +29,10 @@ Global {7C0C6E9F-6BC9-4825-B657-8DACE26CF4FD}.Debug|Any CPU.Build.0 = Debug|Any CPU {7C0C6E9F-6BC9-4825-B657-8DACE26CF4FD}.Release|Any CPU.ActiveCfg = Release|Any CPU {7C0C6E9F-6BC9-4825-B657-8DACE26CF4FD}.Release|Any CPU.Build.0 = Release|Any CPU + {85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}.Debug|Any CPU.ActiveCfg = Debug|Any CPU + {85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}.Debug|Any CPU.Build.0 = Debug|Any CPU + {85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}.Release|Any CPU.ActiveCfg = Release|Any CPU + {85C151C3-42FE-4A80-AF5C-B4782C0F1AE1}.Release|Any CPU.Build.0 = Release|Any CPU EndGlobalSection GlobalSection(SolutionProperties) = preSolution HideSolutionNode = FALSE |
