|
1 | | -Setting up a development game client (Windows 8.1+) |
2 | | -======================================================= |
| 1 | +Setting Up a Development Game Client (Windows 8.1+) |
| 2 | +================================================== |
3 | 3 |
|
4 | 4 | Requirements |
5 | | ------------------ |
| 5 | +------------ |
6 | 6 |
|
7 | | -* Visual Studio or Visual Studio build tools installed in the system |
| 7 | +* Visual Studio or Visual Studio Build Tools installed on your system |
8 | 8 | * `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>`_ |
9 | 9 | * 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 |
11 | 11 |
|
12 | 12 | .. warning:: |
13 | 13 |
|
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. |
15 | 15 |
|
16 | | -Cloning the repo |
17 | | ------------------------ |
| 16 | +Cloning the Repository |
| 17 | +---------------------- |
| 18 | + |
| 19 | +To clone the server repository, run the following command: |
| 20 | + |
| 21 | +:: |
18 | 22 |
|
19 | | -Clone the server repository: |
20 | 23 | git clone --depth=1 https://github.com/decompfrontier/server |
21 | 24 |
|
22 | | -Building the proxy |
23 | | ------------------------ |
| 25 | +Building the Proxy |
| 26 | +------------------ |
24 | 27 |
|
25 | 28 | .. warning:: |
26 | 29 |
|
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. |
29 | 31 |
|
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: |
32 | 33 |
|
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`` |
35 | 36 |
|
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. |
37 | 38 |
|
38 | | -Generating the UWP development certificates |
39 | | -------------------------------------------------------- |
| 39 | +Generating UWP Development Certificates |
| 40 | +--------------------------------------- |
40 | 41 |
|
41 | 42 | .. 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:: |
45 | 43 |
|
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. |
48 | 45 |
|
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:: |
54 | 47 |
|
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. |
56 | 49 |
|
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:: |
58 | 51 |
|
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. |
61 | 53 |
|
62 | | -Run the following command to create a certificate: |
| 54 | +.. hint:: |
63 | 55 |
|
| 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>`_. |
64 | 57 |
|
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: |
66 | 59 |
|
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 | +:: |
71 | 61 |
|
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}") |
73 | 63 |
|
74 | | -Run the following commands to export the certificate: |
| 64 | +.. note:: |
75 | 65 |
|
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. |
77 | 67 |
|
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: |
79 | 69 |
|
80 | | -.. info:: |
| 70 | +:: |
81 | 71 |
|
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 |
83 | 74 |
|
84 | | - Replace <Certificate Thumbprint> with the Thumbprint shown before. |
| 75 | +.. note:: |
85 | 76 |
|
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. |
88 | 79 |
|
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. |
91 | 81 |
|
92 | | -Open your MyKey.pfx file this will bring the Certificate Import Wizard. |
| 82 | +Installing the Certificate |
| 83 | +~~~~~~~~~~~~~~~~~~~~~~~~~~ |
93 | 84 |
|
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. |
96 | 90 |
|
97 | 91 | .. image:: |
98 | 92 | ../../images/certpath_win.png |
99 | 93 |
|
100 | 94 | Modifying Brave Frontier APPX |
101 | | ------------------------------------- |
| 95 | +----------------------------- |
102 | 96 |
|
103 | 97 | .. important:: |
104 | 98 |
|
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. |
107 | 100 |
|
108 | | -Run the following command to unpack the game client: |
| 101 | +To unpack the game client, run the following command: |
109 | 102 |
|
110 | | - makeappx unpack /p gumi.BraveFrontier_2.19.6.0_x86__tdae4wqex79w6.appx /d BraveFrontierAppxClient |
| 103 | +:: |
111 | 104 |
|
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 |
114 | 106 |
|
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. |
117 | 108 |
|
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: |
119 | 116 |
|
120 | | -* AppxMetadata |
121 | | -* AppxSignature.p7x |
122 | | -* AppxBlockMap.xml |
123 | | -* ApplicationInsights.config |
| 117 | + :: |
124 | 118 |
|
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" /> |
126 | 120 |
|
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. |
128 | 122 |
|
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: |
131 | 124 |
|
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 | + :: |
134 | 126 |
|
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> |
137 | 132 |
|
138 | | - <PublisherDisplayName>株式会社gumi</PublisherDisplayName> |
| 133 | +5. (Optional) To change the app’s name in the Windows Start menu, edit this tag: |
139 | 134 |
|
140 | | - <Logo>Assets\StoreLogo.png</Logo> |
| 135 | + :: |
141 | 136 |
|
142 | | - </Properties> |
| 137 | + <m2:VisualElements DisplayName="Brave Frontier" |
143 | 138 |
|
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. |
145 | 140 |
|
146 | | - <m2:VisualElements DisplayName="Brave Frontier" |
| 141 | +Next, pack and sign the modified client with these commands: |
147 | 142 |
|
148 | | -Save and close this file, then run the following commands to pack and sign the modified client: |
| 143 | +:: |
149 | 144 |
|
150 | 145 | makeappx pack /d BraveFrontierAppxClient /p BraveFrontierPatched.appx |
151 | | - |
152 | 146 | SignTool sign /a /v /fd SHA256 /f MyKey.pfx /p "<Your Password>" BraveFrontierPatched.appx |
153 | 147 |
|
154 | 148 | .. note:: |
155 | 149 |
|
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. |
157 | 151 |
|
158 | | -Running the game |
159 | | -------------------------- |
| 152 | +Running the Game |
| 153 | +---------------- |
160 | 154 |
|
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: |
163 | 156 |
|
164 | 157 | .. image:: |
165 | 158 | ../../images/bf_appx_patched.png |
166 | 159 |
|
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:: |
173 | 161 |
|
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. |
176 | 166 |
|
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 | +~~~~~~~~~~~~~~~~~~~~~~~~ |
179 | 169 |
|
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: |
182 | 171 |
|
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: |
184 | 175 |
|
185 | 176 | .. image:: |
186 | 177 | ../../images/loopback_win.png |
187 | 178 |
|
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