aboutsummaryrefslogtreecommitdiff
path: root/Unicity.DevLauncher
diff options
context:
space:
mode:
authorAdrian Ulbrich <adrian.ulbrich.2003@gmail.com>2019-11-10 04:38:54 +0100
committerAdrian Ulbrich <adrian.ulbrich.2003@gmail.com>2019-11-10 04:38:54 +0100
commit52a942a38066557250f9a0bedbd820f1e004bcea (patch)
treeb1e6477eb100ca3cd156db099dccab5229305cf1 /Unicity.DevLauncher
parentcc845ca858be069ea6349e2da0c28ff891abd1a7 (diff)
downloadUnicity-52a942a38066557250f9a0bedbd820f1e004bcea.tar.gz
Unicity-52a942a38066557250f9a0bedbd820f1e004bcea.tar.bz2
Unicity-52a942a38066557250f9a0bedbd820f1e004bcea.zip
Added launcher
Diffstat (limited to 'Unicity.DevLauncher')
-rw-r--r--Unicity.DevLauncher/App.config6
-rw-r--r--Unicity.DevLauncher/Program.cs37
-rw-r--r--Unicity.DevLauncher/Properties/AssemblyInfo.cs36
-rw-r--r--Unicity.DevLauncher/Unicity.DevLauncher.csproj54
4 files changed, 133 insertions, 0 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