Skip to content

Commit

Permalink
Merge pull request #7 from PathOfBuildingCommunity/poe2
Browse files Browse the repository at this point in the history
Add build configurations for PoE2 client
  • Loading branch information
Wires77 authored Jan 8, 2025
2 parents 087789e + d0e7bf3 commit 6feb94f
Show file tree
Hide file tree
Showing 4 changed files with 178 additions and 20 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,20 @@
name: Build EXE
on: [push, workflow_dispatch]
on: [push, workflow_dispatch]
jobs:
build_exe:
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Build EXE
run: 'msbuild PathOfBuilding-Launcher.vcxproj /p:configuration=release /p:platform=x64'
- name: Archive EXE
uses: actions/upload-artifact@v3
with:
name: Path of Building.exe
path: '${{ github.workspace }}/x64/Release/Path of Building.exe'
build_exes:
strategy:
matrix:
version: ['', -PoE2]
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup MSBuild
uses: microsoft/setup-msbuild@v1
- name: Build EXEs
run: 'msbuild PathOfBuilding-Launcher.vcxproj /p:configuration=release${{ matrix.version }} /p:platform=x64'
- name: Archive EXE
uses: actions/upload-artifact@v4
with:
name: Path of Building${{ matrix.version }}.exe
path: '${{ github.workspace }}/x64/Release${{ matrix.version }}/Path of Building${{ matrix.version }}.exe'
13 changes: 11 additions & 2 deletions Launcher.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -199,12 +199,16 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
}

// Check for the registry key left by the installer
// HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Path of Building Community\InstallLocation
// HKCU\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\Path of Building Community[-PoE2]\InstallLocation
{
DWORD dwType = 0;
DWORD dwSize = MAX_PATH;
wchar_t wszValue[MAX_PATH]{};
#ifndef GAMEVERSION_2
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);
#else
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);
#endif
if (dwStatus == ERROR_SUCCESS && dwSize > sizeof(wchar_t))
{
// Strip the quotes around the value
Expand All @@ -222,14 +226,18 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
if (SHGetSpecialFolderPath(nullptr, wszAppDataPath, CSIDL_APPDATA, false))
{
std::wstring basePath(wszAppDataPath);
#ifndef GAMEVERSION_2
basePath += L"\\Path of Building Community\\";
#else
basePath += L"\\Path of Building Community-PoE2\\";
#endif
if (FindLaunchLua(basePath, commandLine, firstLine))
{
return true;
}
}
}

#ifndef GAMEVERSION_2
// Look in the %PROGRAMDATA% folder, which is where the original PoB installer puts the lua files
{
wchar_t wszAppDataPath[MAX_PATH]{};
Expand All @@ -243,6 +251,7 @@ bool InsertLaunchLua(std::vector<std::wstring> &commandLine, std::string &firstL
}
}
}
#endif

return false;
}
Expand Down
18 changes: 15 additions & 3 deletions PathOfBuilding-Launcher.sln
Original file line number Diff line number Diff line change
@@ -1,26 +1,38 @@


Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio Version 16
VisualStudioVersion = 16.0.30907.101
# Visual Studio Version 17
VisualStudioVersion = 17.10.35027.167
MinimumVisualStudioVersion = 10.0.40219.1
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "PathOfBuilding-Launcher", "PathOfBuilding-Launcher.vcxproj", "{3772AF5F-3866-4768-994A-AB8B1647DBD8}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|x64 = Debug|x64
Debug|x86 = Debug|x86
Debug-PoE2|x64 = Debug-PoE2|x64
Debug-PoE2|x86 = Debug-PoE2|x86
Release|x64 = Release|x64
Release|x86 = Release|x86
Release-PoE2|x64 = Release-PoE2|x64
Release-PoE2|x86 = Release-PoE2|x86
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x64.ActiveCfg = Debug|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x64.Build.0 = Debug|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x86.ActiveCfg = Debug|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug|x86.Build.0 = Debug|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x64.ActiveCfg = Debug-PoE2|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x64.Build.0 = Debug-PoE2|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x86.ActiveCfg = Debug-PoE2|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Debug-PoE2|x86.Build.0 = Debug-PoE2|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x64.ActiveCfg = Release|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x64.Build.0 = Release|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x86.ActiveCfg = Release|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release|x86.Build.0 = Release|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x64.ActiveCfg = Release-PoE2|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x64.Build.0 = Release-PoE2|x64
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x86.ActiveCfg = Release-PoE2|Win32
{3772AF5F-3866-4768-994A-AB8B1647DBD8}.Release-PoE2|x86.Build.0 = Release-PoE2|Win32
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
Expand Down
134 changes: 134 additions & 0 deletions PathOfBuilding-Launcher.vcxproj
Original file line number Diff line number Diff line change
@@ -1,10 +1,26 @@
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug-PoE2|Win32">
<Configuration>Debug-PoE2</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug-PoE2|x64">
<Configuration>Debug-PoE2</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-PoE2|Win32">
<Configuration>Release-PoE2</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release-PoE2|x64">
<Configuration>Release-PoE2</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
Expand Down Expand Up @@ -32,26 +48,52 @@
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
Expand All @@ -60,32 +102,60 @@
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'" Label="PropertySheets">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>Path of Building</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'">
<LinkIncremental>true</LinkIncremental>
<TargetName>Path of Building-PoE2</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Path of Building</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Path of Building-PoE2</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>Path of Building</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'">
<LinkIncremental>true</LinkIncremental>
<TargetName>Path of Building-PoE2</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Path of Building</TargetName>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'">
<LinkIncremental>false</LinkIncremental>
<TargetName>Path of Building-PoE2</TargetName>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand All @@ -100,6 +170,20 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand All @@ -118,6 +202,24 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand All @@ -132,6 +234,20 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug-PoE2|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreadedDebug</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
Expand All @@ -150,6 +266,24 @@
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release-PoE2|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;GAMEVERSION_2;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
<LanguageStandard>stdcpp17</LanguageStandard>
<RuntimeLibrary>MultiThreaded</RuntimeLibrary>
</ClCompile>
<Link>
<SubSystem>Windows</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemGroup>
<ClCompile Include="Launcher.cpp" />
</ItemGroup>
Expand Down

0 comments on commit 6feb94f

Please sign in to comment.