Skip to content

Commit 6feb94f

Browse files
authored
Merge pull request #7 from PathOfBuildingCommunity/poe2
Add build configurations for PoE2 client
2 parents 087789e + d0e7bf3 commit 6feb94f

File tree

4 files changed

+178
-20
lines changed

4 files changed

+178
-20
lines changed

.github/workflows/main.yml

+18-15
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,20 @@
11
name: Build EXE
2-
on: [push, workflow_dispatch]
2+
on: [push, workflow_dispatch]
33
jobs:
4-
build_exe:
5-
runs-on: windows-latest
6-
steps:
7-
- name: Checkout
8-
uses: actions/checkout@v4
9-
- name: Setup MSBuild
10-
uses: microsoft/setup-msbuild@v1
11-
- name: Build EXE
12-
run: 'msbuild PathOfBuilding-Launcher.vcxproj /p:configuration=release /p:platform=x64'
13-
- name: Archive EXE
14-
uses: actions/upload-artifact@v3
15-
with:
16-
name: Path of Building.exe
17-
path: '${{ github.workspace }}/x64/Release/Path of Building.exe'
4+
build_exes:
5+
strategy:
6+
matrix:
7+
version: ['', -PoE2]
8+
runs-on: windows-latest
9+
steps:
10+
- name: Checkout
11+
uses: actions/checkout@v4
12+
- name: Setup MSBuild
13+
uses: microsoft/setup-msbuild@v1
14+
- name: Build EXEs
15+
run: 'msbuild PathOfBuilding-Launcher.vcxproj /p:configuration=release${{ matrix.version }} /p:platform=x64'
16+
- name: Archive EXE
17+
uses: actions/upload-artifact@v4
18+
with:
19+
name: Path of Building${{ matrix.version }}.exe
20+
path: '${{ github.workspace }}/x64/Release${{ matrix.version }}/Path of Building${{ matrix.version }}.exe'

Launcher.cpp

+11-2
Original file line numberDiff line numberDiff line change
@@ -199,12 +199,16 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
199199
}
200200

201201
// Check for the registry key left by the installer
202-
// HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Path of Building Community\InstallLocation
202+
// HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Path of Building Community[-PoE2]\InstallLocation
203203
{
204204
DWORD dwType = 0;
205205
DWORD dwSize = MAX_PATH;
206206
wchar_t wszValue[MAX_PATH]{};
207+
#ifndef GAMEVERSION_2
207208
DWORD dwStatus = RegGetValue(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Path of Building Community", L"InstallLocation", RRF_RT_REG_SZ, &dwType, wszValue, &dwSize);
209+
#else
210+
DWORD dwStatus = RegGetValue(HKEY_CURRENT_USER, L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Uninstall\\Path of Building Community-PoE2", L"InstallLocation", RRF_RT_REG_SZ, &dwType, wszValue, &dwSize);
211+
#endif
208212
if (dwStatus == ERROR_SUCCESS && dwSize > sizeof(wchar_t))
209213
{
210214
// Strip the quotes around the value
@@ -222,14 +226,18 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
222226
if (SHGetSpecialFolderPath(nullptr, wszAppDataPath, CSIDL_APPDATA, false))
223227
{
224228
std::wstring basePath(wszAppDataPath);
229+
#ifndef GAMEVERSION_2
225230
basePath += L"\\Path of Building Community\\";
231+
#else
232+
basePath += L"\\Path of Building Community-PoE2\\";
233+
#endif
226234
if (FindLaunchLua(basePath, commandLine, firstLine))
227235
{
228236
return true;
229237
}
230238
}
231239
}
232-
240+
#ifndef GAMEVERSION_2
233241
// Look in the %PROGRAMDATA% folder, which is where the original PoB installer puts the lua files
234242
{
235243
wchar_t wszAppDataPath[MAX_PATH]{};
@@ -243,6 +251,7 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
243251
}
244252
}
245253
}
254+
#endif
246255

247256
return false;
248257
}

PathOfBuilding-Launcher.sln

+15-3
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,38 @@
1-
1+
22
Microsoft Visual Studio Solution File, Format Version 12.00
3-
# Visual Studio Version 16
4-
VisualStudioVersion = 16.0.30907.101
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.10.35027.167
55
MinimumVisualStudioVersion = 10.0.40219.1
66
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PathOfBuilding-Launcher", "PathOfBuilding-Launcher.vcxproj", "{3772AF5F-3866-4768-994A-AB8B1647DBD8}"
77
EndProject
88
Global
99
GlobalSection(SolutionConfigurationPlatforms) = preSolution
1010
Debug|x64 = Debug|x64
1111
Debug|x86 = Debug|x86
12+
Debug-PoE2|x64 = Debug-PoE2|x64
13+
Debug-PoE2|x86 = Debug-PoE2|x86
1214
Release|x64 = Release|x64
1315
Release|x86 = Release|x86
16+
Release-PoE2|x64 = Release-PoE2|x64
17+
Release-PoE2|x86 = Release-PoE2|x86
1418
EndGlobalSection
1519
GlobalSection(ProjectConfigurationPlatforms) = postSolution
1620
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x64.ActiveCfg = Debug|x64
1721
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x64.Build.0 = Debug|x64
1822
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x86.ActiveCfg = Debug|Win32
1923
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x86.Build.0 = Debug|Win32
24+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x64.ActiveCfg = Debug-PoE2|x64
25+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x64.Build.0 = Debug-PoE2|x64
26+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x86.ActiveCfg = Debug-PoE2|Win32
27+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x86.Build.0 = Debug-PoE2|Win32
2028
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x64.ActiveCfg = Release|x64
2129
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x64.Build.0 = Release|x64
2230
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x86.ActiveCfg = Release|Win32
2331
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x86.Build.0 = Release|Win32
32+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x64.ActiveCfg = Release-PoE2|x64
33+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x64.Build.0 = Release-PoE2|x64
34+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x86.ActiveCfg = Release-PoE2|Win32
35+
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x86.Build.0 = Release-PoE2|Win32
2436
EndGlobalSection
2537
GlobalSection(SolutionProperties) = preSolution
2638
HideSolutionNode = FALSE

PathOfBuilding-Launcher.vcxproj

+134
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,26 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
33
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug-PoE2|Win32">
5+
<Configuration>Debug-PoE2</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Debug-PoE2|x64">
9+
<Configuration>Debug-PoE2</Configuration>
10+
<Platform>x64</Platform>
11+
</ProjectConfiguration>
412
<ProjectConfiguration Include="Debug|Win32">
513
<Configuration>Debug</Configuration>
614
<Platform>Win32</Platform>
715
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release-PoE2|Win32">
17+
<Configuration>Release-PoE2</Configuration>
18+
<Platform>Win32</Platform>
19+
</ProjectConfiguration>
20+
<ProjectConfiguration Include="Release-PoE2|x64">
21+
<Configuration>Release-PoE2</Configuration>
22+
<Platform>x64</Platform>
23+
</ProjectConfiguration>
824
<ProjectConfiguration Include="Release|Win32">
925
<Configuration>Release</Configuration>
1026
<Platform>Win32</Platform>
@@ -32,26 +48,52 @@
3248
<PlatformToolset>v142</PlatformToolset>
3349
<CharacterSet>Unicode</CharacterSet>
3450
</PropertyGroup>
51+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'" Label="Configuration">
52+
<ConfigurationType>Application</ConfigurationType>
53+
<UseDebugLibraries>true</UseDebugLibraries>
54+
<PlatformToolset>v142</PlatformToolset>
55+
<CharacterSet>Unicode</CharacterSet>
56+
</PropertyGroup>
3557
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
3658
<ConfigurationType>Application</ConfigurationType>
3759
<UseDebugLibraries>false</UseDebugLibraries>
3860
<PlatformToolset>v142</PlatformToolset>
3961
<WholeProgramOptimization>true</WholeProgramOptimization>
4062
<CharacterSet>Unicode</CharacterSet>
4163
</PropertyGroup>
64+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'" Label="Configuration">
65+
<ConfigurationType>Application</ConfigurationType>
66+
<UseDebugLibraries>false</UseDebugLibraries>
67+
<PlatformToolset>v142</PlatformToolset>
68+
<WholeProgramOptimization>true</WholeProgramOptimization>
69+
<CharacterSet>Unicode</CharacterSet>
70+
</PropertyGroup>
4271
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
4372
<ConfigurationType>Application</ConfigurationType>
4473
<UseDebugLibraries>true</UseDebugLibraries>
4574
<PlatformToolset>v142</PlatformToolset>
4675
<CharacterSet>Unicode</CharacterSet>
4776
</PropertyGroup>
77+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'" Label="Configuration">
78+
<ConfigurationType>Application</ConfigurationType>
79+
<UseDebugLibraries>true</UseDebugLibraries>
80+
<PlatformToolset>v142</PlatformToolset>
81+
<CharacterSet>Unicode</CharacterSet>
82+
</PropertyGroup>
4883
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
4984
<ConfigurationType>Application</ConfigurationType>
5085
<UseDebugLibraries>false</UseDebugLibraries>
5186
<PlatformToolset>v142</PlatformToolset>
5287
<WholeProgramOptimization>true</WholeProgramOptimization>
5388
<CharacterSet>Unicode</CharacterSet>
5489
</PropertyGroup>
90+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'" Label="Configuration">
91+
<ConfigurationType>Application</ConfigurationType>
92+
<UseDebugLibraries>false</UseDebugLibraries>
93+
<PlatformToolset>v142</PlatformToolset>
94+
<WholeProgramOptimization>true</WholeProgramOptimization>
95+
<CharacterSet>Unicode</CharacterSet>
96+
</PropertyGroup>
5597
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
5698
<ImportGroup Label="ExtensionSettings">
5799
</ImportGroup>
@@ -60,32 +102,60 @@
60102
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61103
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62104
</ImportGroup>
105+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'" Label="PropertySheets">
106+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
107+
</ImportGroup>
63108
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64109
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65110
</ImportGroup>
111+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'" Label="PropertySheets">
112+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
113+
</ImportGroup>
66114
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67115
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68116
</ImportGroup>
117+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'" Label="PropertySheets">
118+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
119+
</ImportGroup>
69120
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70121
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71122
</ImportGroup>
123+
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'" Label="PropertySheets">
124+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
125+
</ImportGroup>
72126
<PropertyGroup Label="UserMacros" />
73127
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
74128
<LinkIncremental>true</LinkIncremental>
75129
<TargetName>Path of Building</TargetName>
76130
</PropertyGroup>
131+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'">
132+
<LinkIncremental>true</LinkIncremental>
133+
<TargetName>Path of Building-PoE2</TargetName>
134+
</PropertyGroup>
77135
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
78136
<LinkIncremental>false</LinkIncremental>
79137
<TargetName>Path of Building</TargetName>
80138
</PropertyGroup>
139+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'">
140+
<LinkIncremental>false</LinkIncremental>
141+
<TargetName>Path of Building-PoE2</TargetName>
142+
</PropertyGroup>
81143
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
82144
<LinkIncremental>true</LinkIncremental>
83145
<TargetName>Path of Building</TargetName>
84146
</PropertyGroup>
147+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'">
148+
<LinkIncremental>true</LinkIncremental>
149+
<TargetName>Path of Building-PoE2</TargetName>
150+
</PropertyGroup>
85151
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
86152
<LinkIncremental>false</LinkIncremental>
87153
<TargetName>Path of Building</TargetName>
88154
</PropertyGroup>
155+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'">
156+
<LinkIncremental>false</LinkIncremental>
157+
<TargetName>Path of Building-PoE2</TargetName>
158+
</PropertyGroup>
89159
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
90160
<ClCompile>
91161
<WarningLevel>Level3</WarningLevel>
@@ -100,6 +170,20 @@
100170
<GenerateDebugInformation>true</GenerateDebugInformation>
101171
</Link>
102172
</ItemDefinitionGroup>
173+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'">
174+
<ClCompile>
175+
<WarningLevel>Level3</WarningLevel>
176+
<SDLCheck>true</SDLCheck>
177+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
178+
<ConformanceMode>true</ConformanceMode>
179+
<LanguageStandard>stdcpp17</LanguageStandard>
180+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
181+
</ClCompile>
182+
<Link>
183+
<SubSystem>Windows</SubSystem>
184+
<GenerateDebugInformation>true</GenerateDebugInformation>
185+
</Link>
186+
</ItemDefinitionGroup>
103187
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
104188
<ClCompile>
105189
<WarningLevel>Level3</WarningLevel>
@@ -118,6 +202,24 @@
118202
<GenerateDebugInformation>true</GenerateDebugInformation>
119203
</Link>
120204
</ItemDefinitionGroup>
205+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'">
206+
<ClCompile>
207+
<WarningLevel>Level3</WarningLevel>
208+
<FunctionLevelLinking>true</FunctionLevelLinking>
209+
<IntrinsicFunctions>true</IntrinsicFunctions>
210+
<SDLCheck>true</SDLCheck>
211+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
212+
<ConformanceMode>true</ConformanceMode>
213+
<LanguageStandard>stdcpp17</LanguageStandard>
214+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
215+
</ClCompile>
216+
<Link>
217+
<SubSystem>Windows</SubSystem>
218+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
219+
<OptimizeReferences>true</OptimizeReferences>
220+
<GenerateDebugInformation>true</GenerateDebugInformation>
221+
</Link>
222+
</ItemDefinitionGroup>
121223
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
122224
<ClCompile>
123225
<WarningLevel>Level3</WarningLevel>
@@ -132,6 +234,20 @@
132234
<GenerateDebugInformation>true</GenerateDebugInformation>
133235
</Link>
134236
</ItemDefinitionGroup>
237+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'">
238+
<ClCompile>
239+
<WarningLevel>Level3</WarningLevel>
240+
<SDLCheck>true</SDLCheck>
241+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
242+
<ConformanceMode>true</ConformanceMode>
243+
<LanguageStandard>stdcpp17</LanguageStandard>
244+
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
245+
</ClCompile>
246+
<Link>
247+
<SubSystem>Windows</SubSystem>
248+
<GenerateDebugInformation>true</GenerateDebugInformation>
249+
</Link>
250+
</ItemDefinitionGroup>
135251
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
136252
<ClCompile>
137253
<WarningLevel>Level3</WarningLevel>
@@ -150,6 +266,24 @@
150266
<GenerateDebugInformation>true</GenerateDebugInformation>
151267
</Link>
152268
</ItemDefinitionGroup>
269+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'">
270+
<ClCompile>
271+
<WarningLevel>Level3</WarningLevel>
272+
<FunctionLevelLinking>true</FunctionLevelLinking>
273+
<IntrinsicFunctions>true</IntrinsicFunctions>
274+
<SDLCheck>true</SDLCheck>
275+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
276+
<ConformanceMode>true</ConformanceMode>
277+
<LanguageStandard>stdcpp17</LanguageStandard>
278+
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
279+
</ClCompile>
280+
<Link>
281+
<SubSystem>Windows</SubSystem>
282+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
283+
<OptimizeReferences>true</OptimizeReferences>
284+
<GenerateDebugInformation>true</GenerateDebugInformation>
285+
</Link>
286+
</ItemDefinitionGroup>
153287
<ItemGroup>
154288
<ClCompile Include="Launcher.cpp" />
155289
</ItemGroup>

0 commit comments

Comments
 (0)