Skip to content

Commit 615c88f

Browse files
authored
Major revamp to grammar of dev-client-winrt.rst
Organized sections more neatly and fixed '.. info::' with '.. tip::'. This should help new people understand what set-up steps to take when beginning the project.
1 parent 8a787ec commit 615c88f

File tree

1 file changed

+93
-102
lines changed

1 file changed

+93
-102
lines changed
Lines changed: 93 additions & 102 deletions
Original file line numberDiff line numberDiff line change
@@ -1,188 +1,179 @@
1-
Setting up a development game client (Windows 8.1+)
2-
=======================================================
1+
Setting Up a Development Game Client (Windows 8.1+)
2+
==================================================
33

44
Requirements
5-
-----------------
5+
------------
66

7-
* Visual Studio or Visual Studio build tools installed in the system
7+
* Visual Studio or Visual Studio Build Tools installed on your system
88
* `Microsoft Visual C++ Runtime Package 12.0 for x86 <https://github.com/M1k3G0/Win10_LTSC_VP9_Installer/blob/master/Microsoft.VCLibs.120.00_12.0.21005.1_x86__8wekyb3d8bbwe.appx>`_
99
* A copy of the Brave Frontier package (APPX) for Windows (`Microsoft Store link <https://www.microsoft.com/en-us/store/apps/brave-frontier/9nblggh3lh08&v=JIPsEVwowzA>`_)
10-
* Developer mode installed
10+
* Developer Mode enabled on your system
1111

1212
.. warning::
1313

14-
If the developer mode is not installed or enabled in Windows, the proxy will not work and you will not see the command prompt
14+
If Developer Mode is not installed or enabled in Windows, the proxy will not function, and you will not see the command prompt.
1515

16-
Cloning the repo
17-
-----------------------
16+
Cloning the Repository
17+
----------------------
18+
19+
To clone the server repository, run the following command:
20+
21+
::
1822

19-
Clone the server repository:
2023
git clone --depth=1 https://github.com/decompfrontier/server
2124

22-
Building the proxy
23-
-----------------------
25+
Building the Proxy
26+
------------------
2427

2528
.. warning::
2629

27-
The client is supported *ONLY* in 32-bit platforms. Make sure to use the MINGW32
28-
(i686-w64-mingw32) toolchain
30+
The client *only* supports 32-bit platforms. Ensure you use the MINGW32 (i686-w64-mingw32) toolchain.
2931

30-
Using cmake, configure the proxy to use either `debug-vs` if you are using Visual Studio
31-
as your compiler or `debug-mingw` if you are using MSYS/MinGW as your compiler. (cmake --preset debug-vs or debug-mingw)
32+
Using CMake, configure the proxy with one of the following options:
3233

33-
After you've completed the compilation, you should see inside your cmake build directory a `bin` folder,
34-
inside that folder you should find a `libcurl.dll`.
34+
* For Visual Studio as your compiler: ``cmake --preset debug-vs``
35+
* For MSYS/MinGW as your compiler: ``cmake --preset debug-mingw``
3536

36-
Keep track of that file as it's going to be required later for the tutorial.
37+
After compilation, navigate to your CMake build directory. Inside the ``bin`` folder, you should find a ``libcurl.dll`` file. Keep track of this file, as it will be required later in the tutorial.
3738

38-
Generating the UWP development certificates
39-
-------------------------------------------------------
39+
Generating UWP Development Certificates
40+
---------------------------------------
4041

4142
.. warning::
42-
It is recommended that you remove this certificates when they are no longer necessary to prevent them from being used to compromise system trust.
43-
44-
.. important::
4543

46-
All the following commands are executed in a `Powershell`, please make sure
47-
to execute one otherwise the system won't be able to find the required applications.
44+
It is recommended to remove these certificates when they are no longer needed to prevent them from compromising system trust.
4845

49-
.. info::
50-
51-
If you have already generated a PFX certificate before for deploying applications to the Windows
52-
Store, or you have already followed up this part of the tutorial, skip directory to the `Modifying Brave Frontier APPX`
53-
section.
46+
.. important::
5447

55-
.. info::
48+
All commands in this section must be executed in PowerShell. Ensure you are using PowerShell, or the system will not recognize the required applications.
5649

57-
This section contains a simplified step adopted from `the following page <https://learn.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing>`_ in MSDN
50+
.. note::
5851

59-
In order to install custom Windows Store apps, one should first generate a development certificate to
60-
allow the installation.
52+
If you have previously generated a PFX certificate for deploying applications to the Windows Store or have already completed this section, skip ahead to the "Modifying Brave Frontier APPX" section.
6153

62-
Run the following command to create a certificate:
54+
.. hint::
6355

56+
This section provides a simplified process adapted from `this MSDN page <https://learn.microsoft.com/en-us/windows/msix/package/create-certificate-package-signing>`_.
6457

65-
New-SelfSignedCertificate -Type Custom -Subject "CN=<Name>" -KeyUsage DigitalSignature -FriendlyName "Your friendly name goes here" -CertStoreLocation "Cert:\\CurrentUser\\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
58+
To install custom Windows Store apps, you must first generate a development certificate. Run the following command in PowerShell to create a certificate:
6659

67-
.. info::
68-
69-
Replace <Name> with any name you want (like My BraveFrontier) and write down this name, it's going
70-
to be required later in the tutorial.
60+
::
7161

72-
Remember the Thumbprint as it's going to be used to export the certificate.
62+
New-SelfSignedCertificate -Type Custom -Subject "CN=<Name>" -KeyUsage DigitalSignature -FriendlyName "Your friendly name goes here" -CertStoreLocation "Cert:\CurrentUser\My" -TextExtension @("2.5.29.37={text}1.3.6.1.5.5.7.3.3", "2.5.29.19={text}")
7363

74-
Run the following commands to export the certificate:
64+
.. note::
7565

76-
$password = ConvertTo-SecureString -String <Your Password> -Force -AsPlainText
66+
Replace ``<Name>`` with a name of your choice (e.g., "My BraveFrontier"). Write down this name, as it will be needed later.
7767

78-
Export-PfxCertificate -cert "Cert:\\CurrentUser\\My\\<Certificate Thumbprint>" -FilePath MyKey.pfx -Password $password
68+
Take note of the certificate's **Thumbprint**, as it will be used to export the certificate. Then, run the following commands to export it:
7969

80-
.. info::
70+
::
8171

82-
Replace <Your Password> with a possibly strong password.
72+
$password = ConvertTo-SecureString -String "<Your Password>" -Force -AsPlainText
73+
Export-PfxCertificate -cert "Cert:\CurrentUser\My\<Certificate Thumbprint>" -FilePath MyKey.pfx -Password $password
8374

84-
Replace <Certificate Thumbprint> with the Thumbprint shown before.
75+
.. note::
8576

86-
You should now have a `MyKey.pfx` file, keep track of this file as this is the certificate that we're going
87-
to use to sign our hacked Brave Frontier client.
77+
- Replace ``<Your Password>`` with a strong password of your choosing.
78+
- Replace ``<Certificate Thumbprint>`` with the Thumbprint from the previous step.
8879

89-
Installing the certificate
90-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
80+
You should now have a ``MyKey.pfx`` file. Keep this file safe, as it will be used to sign the modified Brave Frontier client.
9181

92-
Open your MyKey.pfx file this will bring the Certificate Import Wizard.
82+
Installing the Certificate
83+
~~~~~~~~~~~~~~~~~~~~~~~~~~
9384

94-
Select `Local Machine`, then go next up to the certificate store, you have to select `Place all certificates in the
95-
following store`, browse a store and select `Trusted Root Certification Authorities`, then press Finish and then Yes.
85+
1. Open the ``MyKey.pfx`` file to launch the Certificate Import Wizard.
86+
2. Select ``Local Machine`` and proceed.
87+
3. When prompted for the certificate store, choose ``Place all certificates in the following store``.
88+
4. Browse and select ``Trusted Root Certification Authorities``.
89+
5. Click ``Finish``, then confirm with ``Yes`` when prompted.
9690

9791
.. image::
9892
../../images/certpath_win.png
9993

10094
Modifying Brave Frontier APPX
101-
------------------------------------
95+
-----------------------------
10296

10397
.. important::
10498

105-
All the following commands are executed in a `Developet command prompt for VS`, please make sure
106-
to execute one otherwise the system won't be able to find the required applications.
99+
All commands in this section must be executed in a Developer Command Prompt for Visual Studio. Ensure you use this environment, or the required tools will not be recognized.
107100

108-
Run the following command to unpack the game client:
101+
To unpack the game client, run the following command:
109102

110-
makeappx unpack /p gumi.BraveFrontier_2.19.6.0_x86__tdae4wqex79w6.appx /d BraveFrontierAppxClient
103+
::
111104

112-
A new folder called `BraveFrontierAppxClient` should be created now, this folder contains the extracted game client that
113-
we're going to modify.
105+
makeappx unpack /p gumi.BraveFrontier_2.19.6.0_x86__tdae4wqex79w6.appx /d BraveFrontierAppxClient
114106

115-
Copy the file `libcurl.dll` from the previous part of the tutorial and place it in the root of the `BraveFrontierAppxClient` directory,
116-
when asked to replace the original file say Yes.
107+
A new folder named ``BraveFrontierAppxClient`` will be created, containing the extracted game client files for modification.
117108

118-
Remove the following files from the `BraveFrontierAppxClient` directory:
109+
1. Copy the ``libcurl.dll`` file from the "Building the Proxy" section and place it in the root of the ``BraveFrontierAppxClient`` directory. When prompted to replace the original file, select ``Yes``.
110+
2. Delete the following files from the ``BraveFrontierAppxClient`` directory:
111+
- ``AppxMetadata``
112+
- ``AppxSignature.p7x``
113+
- ``AppxBlockMap.xml``
114+
- ``ApplicationInsights.config``
115+
3. Open ``AppxManifest.xml`` in a text editor (e.g., Notepad++) and locate this line:
119116

120-
* AppxMetadata
121-
* AppxSignature.p7x
122-
* AppxBlockMap.xml
123-
* ApplicationInsights.config
117+
::
124118

125-
Open the file `AppxManifest.xml` with any text editor (like Notepad++) and search for the following string:
119+
<Identity Name="gumi.BraveFrontier" Publisher="CN=5AA816A3-ED94-4AA2-A2B4-3ADDA1FABFB6" Version="2.19.6.0" ProcessorArchitecture="x86" />
126120

127-
<Identity Name="gumi.BraveFrontier" Publisher="CN=5AA816A3-ED94-4AA2-A2B4-3ADDA1FABFB6" Version="2.19.6.0" ProcessorArchitecture="x86" />
121+
Replace ``CN=5AA816A3-ED94-4AA2-A2B4-3ADDA1FABFB6`` with ``CN=<Name>``, where ``<Name>`` matches the name used during certificate generation (e.g., "My BraveFrontier"). This ensures the application installs correctly.
128122

129-
Replace the part `CN=5AA816A3-ED94-4AA2-A2B4-3ADDA1FABFB6` with `CN=<Name>`, this name has to match the exact name that you used during the
130-
certificate generation process, otherwise the application will not install.
123+
4. (Optional) Modify the ``Properties`` tag to customize the app’s display details, such as:
131124

132-
You can also modify, if you want, the `Properties` tag to change the display of the application (like display name or publisher) by
133-
modifying this part of the file:
125+
::
134126

135-
<Properties>
136-
<DisplayName>Brave Frontier</DisplayName>
127+
<Properties>
128+
<DisplayName>Brave Frontier</DisplayName>
129+
<PublisherDisplayName>株式会社gumi</PublisherDisplayName>
130+
<Logo>Assets\StoreLogo.png</Logo>
131+
</Properties>
137132

138-
<PublisherDisplayName>株式会社gumi</PublisherDisplayName>
133+
5. (Optional) To change the app’s name in the Windows Start menu, edit this tag:
139134

140-
<Logo>Assets\StoreLogo.png</Logo>
135+
::
141136

142-
</Properties>
137+
<m2:VisualElements DisplayName="Brave Frontier"
143138

144-
If you want to modify the name of the application that you will see in the Windows start menu, modify this `DisplayName` tag:
139+
6. Save and close the file.
145140

146-
<m2:VisualElements DisplayName="Brave Frontier"
141+
Next, pack and sign the modified client with these commands:
147142

148-
Save and close this file, then run the following commands to pack and sign the modified client:
143+
::
149144

150145
makeappx pack /d BraveFrontierAppxClient /p BraveFrontierPatched.appx
151-
152146
SignTool sign /a /v /fd SHA256 /f MyKey.pfx /p "<Your Password>" BraveFrontierPatched.appx
153147

154148
.. note::
155149

156-
Replace <Your Password> with the password used before for exporting the certificate
150+
Replace ``<Your Password>`` with the password used when exporting the certificate.
157151

158-
Running the game
159-
-------------------------
152+
Running the Game
153+
----------------
160154

161-
Install the newly generated file `BraveFrontierPatched.appx`` and run the client, if you have done
162-
all the steps correctly, a console should spawn alongside the game client like so:
155+
Install the newly generated ``BraveFrontierPatched.appx`` file and launch the client. If all steps were followed correctly, a console window should appear alongside the game client, as shown below:
163156

164157
.. image::
165158
../../images/bf_appx_patched.png
166159

167-
.. failure ::
168-
169-
If you don't see a console opening, it means that you have either not installed the patched `libcurl.dll` or
170-
you have generated the `deploy` preset, which is not supported in this build.
171-
172-
You will also not see the console opening if you haven't enabled Developer mode on your Windows PC.
160+
.. warning::
173161

174-
Connecting to the server
175-
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
162+
If no console appears, check the following:
163+
- Ensure the patched ``libcurl.dll`` was correctly installed.
164+
- Verify you did not use the ``deploy`` preset, as it is not supported in this build.
165+
- Confirm Developer Mode is enabled on your Windows PC.
176166

177-
A default limitation in UWP apps won't allow UWP apps to communicate to localhost resulting in the game
178-
never connecting to the server.
167+
Connecting to the Server
168+
~~~~~~~~~~~~~~~~~~~~~~~~
179169

180-
You can solve this by downloading the `Enable Loopback Utility <https://telerik-fiddler.s3.amazonaws.com/fiddler/addons/enableloopbackutility.exe>`_ ,
181-
select the Brave Frontier application.
170+
Due to a default limitation in UWP apps, they cannot communicate with localhost, preventing the game from connecting to the server. To resolve this:
182171

183-
The utility should be configured like so, remember to press `Save Changes` and restart the game.
172+
1. Download the `Enable Loopback Utility <https://telerik-fiddler.s3.amazonaws.com/fiddler/addons/enableloopbackutility.exe>`_.
173+
2. Run the utility and select the Brave Frontier application.
174+
3. Configure it as shown below, then click ``Save Changes`` and restart the game:
184175

185176
.. image::
186177
../../images/loopback_win.png
187178

188-
If you have started the game server, you should see Brave Frontier welcoming you to the login screen.
179+
If the game server is running, you should now see the Brave Frontier login screen upon launching the game.

0 commit comments

Comments
 (0)