# Installation

{% hint style="warning" %}

### Requirements

* [patch-manager-app](https://gamelauncher.gitbook.io/documentation/game-launcher/patch-manager-app "mention")
* [**Visual Studio Community**](https://visualstudio.microsoft.com/es/downloads/) **(2022)**

### Install required Visual Studio 2022 Components

**`Enable`` `***<mark style="color:orange;">**`.NET Desktop Development`**</mark>*

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2F56w2Nry6jslE2sYHA467%2Fimage.png?alt=media\&token=af8dba86-3336-4ef4-97c5-1c3266e19dc4)

**Add these Visual Studio Individual components:**

`.NET 8.0 Runtime`

`.NET Core Runtime 3.1`

`.NET Framework 4.8 SDK`

`.NET Framework 4.8 Targeting Pack`

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FN1VkJHmUoKSeSJCSMHdg%2Fimage.png?alt=media\&token=96c70111-fec8-47c8-b180-f74d0c715504)
{% endhint %}

## Installation

{% hint style="success" %}
Game Launcher is a standalone application. It works separated from Unity.
{% endhint %}

Select where you downloaded the Launcher:

{% tabs %}
{% tab title="From Asset Store" %} <mark style="color:yellow;">Request the Github Repository access by joining</mark> [Discord](https://discord.gg/rJq6cEresy)<mark style="color:yellow;">.</mark>\
\
Follow these steps if you own **Game Launche**r from **Unity Asset Store**

1. Create a new empty project
2. Download and Import ***Game Launcher Unity Package*** in Unity
3. Locate the *<mark style="color:red;">**GameLauncher.zip**</mark>* in ***GameLauncher/Installation*** in the Unity Package\
   (The zip name varies by the version)

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FQ4a1oKmJ2NH1D4wbzB3b%2FLocating%20GameLauncher%20zip%20file.gif?alt=media\&token=b61cc69d-486c-4de1-b73c-94e476fb24c6)

4. Move and Decompress *<mark style="color:red;">**zip**</mark>* **OUTSIDE THE UNITY PROJECT FOLDER**

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FELYVwLv6xAjzdNjFGLVt%2Fimage.png?alt=media&#x26;token=2c8ac452-321b-47fb-82c1-0279379bf858" alt=""><figcaption><p>GameLauncher zip decompressed (PRO Version - Contains GameLauncherCore folder)</p></figcaption></figure>

5. **Game Launcher doesn't run in Unity.** You can safely remove the Unity package from Game Launcher, as it is no longer in use.
   {% endtab %}

{% tab title="From Github Repository" %}

1. **Download the lastest&#x20;*****Source code zip*****&#x20;from the Github Repository**\
   Link: <https://github.com/GameLauncherUnity/GameLauncher-PRO/releases>\
   \
   (Example)\
   ![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FXJLtAL1NePd6pCKQXRKy%2Fimage.png?alt=media\&token=ea6b0419-b2c2-4db9-aab3-6684c9aa3e3e)\
   \
   2\. **Decompress** the zip in your preferred directory.\
   \
   **Recommendation of root directory name:**\
   \- Directory name: *<mark style="color:yellow;">**GameLauncherContent**</mark>*\
   \- Also create a *<mark style="color:yellow;">**Manager**</mark>* folder here too to place the [patch-manager-app](https://gamelauncher.gitbook.io/documentation/game-launcher/patch-manager-app "mention")\
   ![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FMvydBb7aGViWnbGb1PqD%2Fimage.png?alt=media\&token=7c0172f1-92a3-4f13-aa92-82cbbc9a4305)&#x20;
   {% endtab %}
   {% endtabs %}

2. Open *<mark style="color:purple;">**GameLauncher.sln**</mark>* in Visual Studio

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FUknjT8JFgt7x4C5FPxtn%2Fimage.png?alt=media&#x26;token=cc7d5dca-0d99-406e-8200-391f47059412" alt=""><figcaption></figcaption></figure>

2. Right Click in *<mark style="color:purple;">**GameLauncher**</mark>* solution -> Click on ***Rebuild Solution***

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FOOiPFAk7K7BTMXNA8qbG%2FRebuild%20Solution.gif?alt=media\&token=7e87a807-8b26-45ca-adb0-b2aa5e4d44ef)

3. Open *<mark style="color:green;">**MainWindow\.xaml**</mark>* and *<mark style="color:green;">**MainWindow\.xaml.cs**</mark>* files

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FYh2uNxLQMqaPB91ouVdQ%2Fimage.png?alt=media\&token=4253f0f4-3161-45eb-a34f-29c48021bbd6)

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2Fq7Y1hZByLOxU1aTgOodG%2Fimage.png?alt=media\&token=0d1480d4-3da0-413e-906e-f9d148417708)

> **At this point you will see the brand new Game Launcher UI!**

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FutyPBpr6drvUBwErIY5d%2Fimage.png?alt=media&#x26;token=21b5b1b1-e698-4cf9-9a08-ef1a80485f3e" alt=""><figcaption><p>Game Launcher Project in Visual Studio</p></figcaption></figure>

> Now continue creating the Self Patcher...

#### ll. Building the Self Patcher

The <mark style="color:orange;">SelfPatcher</mark> is the program that updates the **Launcher.**\
If it's not set, the Launcher will not be able to update itself.

1. **Switch** the **Visual Studio Environment** to ***Release***

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FcpBsxyU90F4SGqMeOeBM%2Fimage.png?alt=media&#x26;token=4129e68e-14a5-487a-a688-57bdc3fa6834" alt=""><figcaption><p>Switching Visual Studio Environment</p></figcaption></figure>

2. Right click in **SelfPatcherWinForms** -> **Build**

![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FOzrK3dCKxqimTCwYC4ub%2Fimage.png?alt=media\&token=708b2f44-738a-4a52-8f24-1fe6ec9f2ce5)

3. Again, **Right Click** on **SelfPatcherWinForms** -> **Open Folder in File Explorer** and Navigate to *<mark style="color:yellow;">**.../Build/Release**</mark>* folder and Copy the <mark style="color:red;">**SelfPatcher.exe**</mark> and <mark style="color:red;">**SelfPatcherCore.dll**</mark>
4. Open the [**Patch Manager**](https://gamelauncher.gitbook.io/documentation/game-launcher/patch-manager-app)**:**

{% tabs %}
{% tab title="New Manager (Recommended)" %}
The Manager requires the [**GameLauncherCore.dll**](#user-content-fn-1)[^1] to work. Let's create the DLL.

1. In Visual Studio, right click on the **GameLauncherCore** project -> **Build**
2. Again, right click on the **GameLauncherCore** project -> **Open Folder in File Explorer** and Navigate to *<mark style="color:yellow;">**.../Build/Release**</mark>* folder&#x20;
3. **Copy** the <mark style="color:red;">**GameLauncherCore.dll**</mark> in the same folder as the <mark style="color:red;">**PatchManager.exe**</mark>

**It must look like this**\
\
![](https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FHREAStxGwHBN074e7aQK%2Fimage.png?alt=media\&token=21de096b-1a78-405c-a876-81ec2d74d0e7)

After this, **Open** the <mark style="color:red;">**PatchManager.exe**</mark>
{% endtab %}

{% tab title="Unity Manager (Deprecated)" %}

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FQXrnwYIyfRveifGnId9V%2FUnity%20-%20Game%20Launcher%20UI%20Manager.gif?alt=media&#x26;token=2c067087-0113-44b9-b7f4-0b0565e5a6ed" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

5\. In the **Patch Manager -> Make sure to be in** [*<mark style="color:purple;">**Launcher Workspace**</mark>*](#user-content-fn-2)[^2]\
-> **Open Self Patcher Folder** -> **Paste here the files&#x20;**<mark style="color:red;">**SelfPatcher.exe**</mark> and <mark style="color:red;">**SelfPatcherCore.dll**</mark>

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FZlhu1vZpV37Fn62QfsgH%2Fimage.png?alt=media&#x26;token=264482a8-870f-4cfc-b99f-32381f064a38" alt=""><figcaption></figcaption></figure>

lll. Upload the content of *<mark style="color:yellow;">**"Upload my content"**</mark>* folder to your [**Host**](#user-content-fn-3)[^3]

{% hint style="success" %}
N**eed a** [**Host**](#user-content-fn-3)[^3]**?**\
We recommend **Hostinger as Host provider**

**Use this code to get a discount**

<https://hostinger.com/?REFERRALCODE=GAMELAUNCHER>
{% endhint %}

{% tabs %}
{% tab title="Setup your host" %}

1. Create a folder called *<mark style="color:yellow;">**GameLauncher**</mark>* inside your *<mark style="color:yellow;">**public\_html**</mark>* folder in Host (this will be your Host URL)
2. Upload the content of *<mark style="color:yellow;">**Upload my content**</mark>* folder to *<mark style="color:yellow;">**GameLauncher**</mark>* folder

> The *<mark style="color:yellow;">**Upload my content**</mark>* folder is located in the [*<mark style="color:red;">**GameLauncher.zip**</mark>*](#user-content-fn-4)[^4] content

*To upload your files use a File Manager like* [*WinSCP*](https://winscp.net/eng/download.php)

3\. In Visual Studio in **GameLauncher** project locate -> *<mark style="color:green;">**Models/Patcher/LauncherConfig.cs**</mark>*

And place your **HOST URL in the** HOST\_URL variable

{% hint style="info" %}
Example:

<https://game-launcher.net/GameLauncher/>
{% endhint %}

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2FTvkNcwrBFiFtUXEtrHZT%2FSet%20Host%20URL.gif?alt=media&#x26;token=0981d6fd-8802-48a3-9ac8-de6603076a4d" alt=""><figcaption><p>Placing the HOST URL in LauncherConfig.cs</p></figcaption></figure>

4. Also, place the **HOST URL** in the **Patch Manager**

   <figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2Ff58ImX5nm3EjTcKdimMI%2Fimage.png?alt=media&#x26;token=de991956-36cc-44ad-897d-8ef36eb2d108" alt=""><figcaption><p>HOST URL in the Patch Manager</p></figcaption></figure>

<br>

4. Set your custom MAINAPP\_EXECUTABLE name

**This will be the app that will be executed by the Launcher**

<figure><img src="https://4090346021-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FOQCKadC4SNL7ML9xwPi2%2Fuploads%2F89adohI3Jd4xtL0bIWCn%2Fimage.png?alt=media&#x26;token=da3bbfb6-ac54-4bce-9f4b-65c6de76f994" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

### **Installation finished!**

[tip-make-your-host-files-visible](https://gamelauncher.gitbook.io/documentation/getting-started/installation/tip-make-your-host-files-visible "mention")

### **Next steps**

**Proceed creating your Launcher!**

[Deploy your Launcher](https://gamelauncher.gitbook.io/documentation/creating-launcher-version/1.-deploy-your-launcher)

[^1]: Core Library to create the patches. You can create this .dll in Visual Studio.

[^2]: The Patch Manager works with two workspaces:\
    \
    (Purple) Launcher Workspace: For Launcher patches\
    (Cyan) App Workspace: For App/Game patches\
    \
    Switch between environments by using the Switch to App/Launcher button

[^3]: A file host, also known as a cloud-storage service, online file-storage provider, or cyberlocker, is a service that hosts user files on the internet

[^4]: The folder that you downloaded from Unity or from the Github Repository.
