mirror of
https://github.com/alee14-projects/Unicity.git
synced 2025-01-22 07:53:19 -05:00
Added launcher
This commit is contained in:
parent
cc845ca858
commit
52a942a380
6 changed files with 140 additions and 1 deletions
6
Unicity.DevLauncher/App.config
Normal file
6
Unicity.DevLauncher/App.config
Normal file
|
@ -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>
|
37
Unicity.DevLauncher/Program.cs
Normal file
37
Unicity.DevLauncher/Program.cs
Normal file
|
@ -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 });
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
36
Unicity.DevLauncher/Properties/AssemblyInfo.cs
Normal file
36
Unicity.DevLauncher/Properties/AssemblyInfo.cs
Normal file
|
@ -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")]
|
54
Unicity.DevLauncher/Unicity.DevLauncher.csproj
Normal file
54
Unicity.DevLauncher/Unicity.DevLauncher.csproj
Normal file
|
@ -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>
|
|
@ -9,4 +9,4 @@ void main()
|
|||
{
|
||||
gl_Position = vec4(aPos, 1.0f);
|
||||
vertexColor = vec4(aColor, 1.0f);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue