Skip to content

Updated build-contrib.md to make it an actually decent setup guide #5

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
123 changes: 84 additions & 39 deletions docs/build-contrib.md
Original file line number Diff line number Diff line change
@@ -1,58 +1,95 @@
# Setup

## Prerequisites
## Part 1: Prerequisites

### To launch
1. [Developer Mode enabled](#enabling-developer-mode)
2. Windows 10 (or later)
3. Windows App SDK
4. Visual Studio 2022 OR WinDbg (for debugging if needed)
5. Make sure you select the "Desktop development with C++" workload.
6. Visual C++ Redistributables (unsure which are needed)
7. Graphics Tools (from `Settings > Apps > Optional Features` (Windows 10) or `Settings > System > Optional Features` (Windows 11))
8. The latest [release](https://github.com/WinDurango/WinDurango/releases)/[artifact](https://github.com/WinDurango/WinDurango/actions/workflows/msbuild.yml)
1. Your computer must be 64 bit and running Windows 10 or 11

### To build
2. Enable Developer Mode
- For Windows 10: Settings > Windows Update > For Developers
- For Windows 11: Settings > System > For Developers
3. Download the `Windows App SDK` at https://learn.microsoft.com/en-us/windows/apps/windows-app-sdk/downloads

4. Download the [2012 Visual C++ Redistributables](https://www.microsoft.com/en-us/download/details.aspx?id=30679) and the [Latest Visual C++ Redistributables](https://learn.microsoft.com/en-us/cpp/windows/latest-supported-vc-redist?view=msvc-170#latest-microsoft-visual-c-redistributable-version)

5. Download Graphics Tools
- For Windows 10: Settings > Apps > Optional Features
- For Windows 11: Settings > System > Optional Features

6. Download `Visual Studio 2022 Community` at https://visualstudio.microsoft.com/downloads/ and then in the Visual Studio Installer, goto the `Workloads` tab and select `Desktop development with C++`

7. Have a decrypted copy of your Xbox One game. This can be legally obtained from an exploited Xbox One with Durango Dumpling.

8. Download the latest release https://github.com/WinDurango/WinDurango/releases or artifact release https://github.com/WinDurango/WinDurango/actions of Windurango. (Note: You need to be signed into a github account in order to download the latest artifact from Github actions). If you want better performance you may also download the other `d3d11_x.dll` and use it instead of the default one.

### To build
1. Everything from [the launch requirements](#to-launch) (except for the release/artifact)
2. Windows 10 (or later)
3. Windows App SDK
4. Visual Studio 2022
5. Git
6. Windows 11 SDK version 10.0.17134.0 or later
7. The following from the Visual Studio Installer
- Desktop Development with C++
- Windows Application Development
- MSVC (143) C++ Build Tools
- C++ (143) Universal Windows Platform Tools
- .NET Desktop Development
- Game Development with C++
8. The project cloned to a folder

3. Windows 10 (or later)

5. Windows App SDK

7. Visual Studio 2022

9. Git

11. Windows 11 SDK version 10.0.17134.0 or later

13. The following from the Visual Studio Installer

- In the workloads tab, select

- .NET desktop development
- Desktop development with C++
- Game development with C++

## Running the package
- In the workloads tab, select

To run the package, you need to setup the [Launch prerequisites](#to-launch) and have already [registered the package](#registering-the-uwp-package).
You'll need to also copy in all the DLLs from the latest [release](https://github.com/WinDurango/WinDurango/releases)/[artifact](https://github.com/WinDurango/WinDurango/actions/workflows/msbuild.yml) into your app's Mount folder (the folder that has the EXE).

After that, you just need to open the app through the start menu. (or other preferred way of running UWP apps)
- MSVC v143 - VS 2022 C++ x64/x86 build tools (Latest)
- C++ Universal Windows Platform support for v143 build tools (ARM64/ARM64EC)
- Windows 11 SDK (latest version)


11. The project cloned to a folder

## Part 2: Registering and Running the UWP Package

### Option 1: Using the UI

Note: As of writing this, Windurango UI is relatively unstable and sometimes just doesn't work. If you are having trouble with the UI, see the next section on Using Powershell

1. Download the latest artifact release https://github.com/WinDurango/WinDurango.UI/actions of Windurango UI. (Note: You need to be signed into a github account in order to download the latest artifact from Github actions). Extract the .zip file to somewhere accessible.

2. Locate the "Mount" Folder in your Xbox Game files (For Minecraft you should see Minecraft.Client.exe in it.) Copy the mount folder to an easily accessible location (ie: your documents folder or the root of your hard drive). Don't worry about the EmbeddedXvd folder or era.vbi file as they are not needed.

3. Extract all of the `.dll` files from Windurango and place them into the Mount folder. If you want to use the other `d3d11_x.dll`, copy it to the mount folder and replace the default one with it.

4. Run the `Windurango UI.exe` from the Windurango UI folder. Note: Windows Smart Screen may give a warning, just launch the program anyway.

5. Select the `Install Package` option

6. In the pop-up file explorer window, navigate to the "mount" folder of your game. Once you have it selected or you are inside it, select the folder.

7. A prompt should appear with the name of the game, the publisher, and the file path. Select `Install`

8. The game should install and appear on the main menu of Windurango UI and in the Windows Start Menu.

9. From here, you should be able to launch the game from your start menu. A cmd window should also appear and various logs should show up. Dont worry if a million errors show up, that is normal since this is still very early in development. If the game closes almost instantly with no error messages, then you are likely missing dependencies from Visual Studio.

## Registering the UWP package
### Option 2: Using Powershell

You cannot normally run a UWP app's EXE file directly, instead you have to register the UWP app and launch it from the Start Menu/a Debugger.
1. Locate the "Mount" Folder in your Xbox Game files (For Minecraft you should see Minecraft.Client.exe in it.) Copy the mount folder to an easily accessible location (ie: your documents folder or the root of your hard drive). Don't worry about the EmbeddedXvd folder or era.vbi file as they are not needed.

1. [Enable Developer Mode](#enabling-developer-mode)
2. Go to the Mount folder of your game (where the EXE sits)
3. Open Powershell.exe to that directory
4. Run `Add-AppXPackage -Register .\AppxManifest.xml`
2. Extract all of the `.dll` files from Windurango and place them into the Mount folder. If you want to use the other `d3d11_x.dll`, copy it to the mount folder and replace the default one with it.

## Enabling Developer Mode
3. Open windows Powershell and navigate to your mount folder. The easiest way to do this is to copy the file path in File Exploerer by clicking on the top file path bar and pressing ctl+c once it is highlighted. Then in Powershell, type in the command `cd File Path` where `File Path` is where you paste the file path you just copied. Use quotation marks if there is a space in the file path (ie `C:\Users\User Name\Xbox Game` should be `"C:\Users\User Name\Xbox Game"`. Alternatively you can simply use a file path without spaces, such as `C:\Xbox_Game`)

To register UWP apps, you have to enable Developer Mode.
4. Once in the mount folder, run `Add-AppxPackage -Path AppxManifest.xml -Register` (or `Add-AppXPackage -Register .\AppxManifest.xml`). This will add the game to your start menu. (Note: This step requires [Developer mode](#to-launch) to be enabled otherwise you will get an error)

1. Go to For Developers in Settings (path differs depending on Windows version, read below)
- Settings > Windows Update > For Developers (Windows 10)
- Settings > System > For Developers (Windows 11)
2. Enable Developer Mode
5. From here, you should be able to launch the game from your start menu. A cmd window should also appear and various logs should show up. Dont worry if a million errors show up, that is normal since this is still very early in development. If the game closes almost instantly with no error messages, then you are likely missing dependencies from Visual Studio.

Note: If you decide to use Windurango UI after already installing the game through Powershell, the UI has a feature to add games that are already installed, either by detecting them or by selecting the game from a list of installed UWP apps. However, this feature sometimes doesnt work and may require uninstalling and reinstalling the game via the UI instead of Powershell. If you have saves you want to backup before doing this, see [Managing Saves](#managing-saves)

# Building

Expand Down Expand Up @@ -88,5 +125,13 @@ TODO: DO THE REST SINCE THIS CHANGED LOTS
### Generating IDLs from WinMDs
TODO

### Installing Mods
Mods are in the .dll file format. They can be installed through Windurango UI or manually in File Explorer.
In your mount folder, create a new folder called mods and copy whatever mod .dll files you have to it. Note that many mods are extremely version specific (ex. a minecraft mod for version 1.61.0.1 will crash on version 1.61.0.2) so make sure you have the correct version of either the game or the mod (Note to mod devs: PLEASE specify the version of the game you used to make the mod to aleviate this issue).

### Managing Saves
To locate your saves, go to your User folder and then AppData\Local\Packages\NameOfXboxGame\LocalState\WinDurango\UserStorage. For Minecraft, the directory is AppData\Local\Packages\Minecraft_zjr0dfhgjwvde\LocalState\WinDurango\UserStorage.
The easiest way to manage and rename save files is through Windurango UI, which has a feature to manage and rename save files.

# Contributing
TODO