-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit b8cf57f
Showing
10 changed files
with
1,249 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: Build Artifacts | ||
|
||
on: | ||
push: | ||
branches: | ||
- v2 | ||
workflow_dispatch: | ||
|
||
env: | ||
SOLUTION_FILE_PATH: . | ||
BUILD_CONFIGURATION: Release | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Setup VCPKG | ||
uses: lukka/run-vcpkg@v11 | ||
with: | ||
vcpkgGitCommitId: aafb8b71554a4590aa5108bdb5005d81d72db6c1 | ||
|
||
- name: Integrate vcpkg | ||
run: vcpkg integrate install | ||
|
||
- name: Add MSBuild to PATH | ||
uses: microsoft/[email protected] | ||
|
||
- name: Build | ||
working-directory: ${{env.GITHUB_WORKSPACE}} | ||
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}} | ||
|
||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: CarbonLauncher_${{env.BUILD_CONFIGURATION}} | ||
path: | | ||
x64\${{env.BUILD_CONFIGURATION}}\ | ||
- name: Create ZIP of Artifacts | ||
if: startsWith(github.ref, 'refs/tags/') | ||
run: | | ||
$zipPath = "release\artifacts.zip" | ||
$files = Get-ChildItem -Path "x64\${{env.BUILD_CONFIGURATION}}" -Filter *.dll -Recurse | ||
$files += "x64\${{env.BUILD_CONFIGURATION}}\CarbonLauncher.exe" | ||
if (!(Test-Path -Path "release")) { New-Item -ItemType Directory -Path "release" } | ||
Compress-Archive -Path $files -DestinationPath $zipPath | ||
- name: Create Release | ||
if: startsWith(github.ref, 'refs/tags/') | ||
uses: ncipollo/[email protected] | ||
with: | ||
artifacts: release\artifacts.zip | ||
draft: true | ||
makeLatest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
.vs | ||
vcpkg_installed | ||
x64 | ||
*.vcxproj.* | ||
imgui.ini |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
|
||
Microsoft Visual Studio Solution File, Format Version 12.00 | ||
# Visual Studio Version 17 | ||
VisualStudioVersion = 17.13.35507.96 d17.13 | ||
MinimumVisualStudioVersion = 10.0.40219.1 | ||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CarbonLauncher", "CarbonLauncher\CarbonLauncher.vcxproj", "{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}" | ||
EndProject | ||
Global | ||
GlobalSection(SolutionConfigurationPlatforms) = preSolution | ||
Debug|x64 = Debug|x64 | ||
Debug|x86 = Debug|x86 | ||
Release|x64 = Release|x64 | ||
Release|x86 = Release|x86 | ||
EndGlobalSection | ||
GlobalSection(ProjectConfigurationPlatforms) = postSolution | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Debug|x64.ActiveCfg = Debug|x64 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Debug|x64.Build.0 = Debug|x64 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Debug|x86.ActiveCfg = Debug|Win32 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Debug|x86.Build.0 = Debug|Win32 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Release|x64.ActiveCfg = Release|x64 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Release|x64.Build.0 = Release|x64 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Release|x86.ActiveCfg = Release|Win32 | ||
{E5A80EF0-1C60-4D13-8569-03CF1794CDB6}.Release|x86.Build.0 = Release|Win32 | ||
EndGlobalSection | ||
GlobalSection(SolutionProperties) = preSolution | ||
HideSolutionNode = FALSE | ||
EndGlobalSection | ||
GlobalSection(ExtensibilityGlobals) = postSolution | ||
SolutionGuid = {0197DFC4-D5CF-4C67-AEF4-436F47231050} | ||
EndGlobalSection | ||
EndGlobal |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,151 @@ | ||
<?xml version="1.0" encoding="utf-8"?> | ||
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
<ItemGroup Label="ProjectConfigurations"> | ||
<ProjectConfiguration Include="Debug|Win32"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|Win32"> | ||
<Configuration>Release</Configuration> | ||
<Platform>Win32</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Debug|x64"> | ||
<Configuration>Debug</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
<ProjectConfiguration Include="Release|x64"> | ||
<Configuration>Release</Configuration> | ||
<Platform>x64</Platform> | ||
</ProjectConfiguration> | ||
</ItemGroup> | ||
<ItemGroup> | ||
<ClCompile Include="src\main.cpp" /> | ||
<ClCompile Include="src\utils.cppm" /> | ||
</ItemGroup> | ||
<PropertyGroup Label="Globals"> | ||
<VCProjectVersion>17.0</VCProjectVersion> | ||
<Keyword>Win32Proj</Keyword> | ||
<ProjectGuid>{e5a80ef0-1c60-4d13-8569-03cf1794cdb6}</ProjectGuid> | ||
<RootNamespace>CarbonLauncher</RootNamespace> | ||
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v143</PlatformToolset> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v143</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>true</UseDebugLibraries> | ||
<PlatformToolset>v143</PlatformToolset> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration"> | ||
<ConfigurationType>Application</ConfigurationType> | ||
<UseDebugLibraries>false</UseDebugLibraries> | ||
<PlatformToolset>v143</PlatformToolset> | ||
<WholeProgramOptimization>true</WholeProgramOptimization> | ||
<CharacterSet>MultiByte</CharacterSet> | ||
</PropertyGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
<ImportGroup Label="ExtensionSettings"> | ||
</ImportGroup> | ||
<ImportGroup Label="Shared"> | ||
</ImportGroup> | ||
<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 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 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 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> | ||
<PropertyGroup Label="UserMacros" /> | ||
<PropertyGroup Label="Vcpkg"> | ||
<VcpkgEnableManifest>true</VcpkgEnableManifest> | ||
</PropertyGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<SDLCheck>true</SDLCheck> | ||
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<LanguageStandard>stdcpp20</LanguageStandard> | ||
<AdditionalIncludeDirectories>include</AdditionalIncludeDirectories> | ||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck>true</SDLCheck> | ||
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<LanguageStandard>stdcpp20</LanguageStandard> | ||
<AdditionalIncludeDirectories>include</AdditionalIncludeDirectories> | ||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<SDLCheck>true</SDLCheck> | ||
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<LanguageStandard>stdcpp20</LanguageStandard> | ||
<AdditionalIncludeDirectories>include</AdditionalIncludeDirectories> | ||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'"> | ||
<ClCompile> | ||
<WarningLevel>Level3</WarningLevel> | ||
<FunctionLevelLinking>true</FunctionLevelLinking> | ||
<IntrinsicFunctions>true</IntrinsicFunctions> | ||
<SDLCheck>true</SDLCheck> | ||
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions> | ||
<ConformanceMode>true</ConformanceMode> | ||
<LanguageStandard>stdcpp20</LanguageStandard> | ||
<AdditionalIncludeDirectories>include</AdditionalIncludeDirectories> | ||
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions> | ||
</ClCompile> | ||
<Link> | ||
<SubSystem>Console</SubSystem> | ||
<EnableCOMDATFolding>true</EnableCOMDATFolding> | ||
<OptimizeReferences>true</OptimizeReferences> | ||
<GenerateDebugInformation>true</GenerateDebugInformation> | ||
</Link> | ||
</ItemDefinitionGroup> | ||
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
<ImportGroup Label="ExtensionTargets"> | ||
</ImportGroup> | ||
</Project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
#define WIN32_LEAN_AND_MEAN | ||
#include <Windows.h> | ||
|
||
#include <spdlog/spdlog.h> | ||
|
||
#include <imgui.h> | ||
|
||
import utils; | ||
|
||
int main(int argc, char* argv[]) { | ||
Utils::Window window(800, 600, "Carbon Launcher"); | ||
|
||
Utils::Render(window, [&]() { | ||
ImGui::SetNextWindowPos(ImVec2(0, 0)); | ||
ImGui::SetNextWindowSize(ImVec2((float)window.width, (float)window.height)); | ||
bool popen = true; | ||
ImGui::Begin("Carbon Launcher", &popen, ImGuiWindowFlags_NoTitleBar | ImGuiWindowFlags_NoResize | ImGuiWindowFlags_NoMove | ImGuiWindowFlags_NoCollapse | ImGuiWindowFlags_NoBringToFrontOnFocus | ImGuiWindowFlags_NoSavedSettings | ImGuiWindowFlags_MenuBar); | ||
|
||
bool shouldOpenPopup = false; | ||
if (ImGui::BeginMainMenuBar()) { | ||
if (ImGui::BeginMenu("File")) { | ||
if (ImGui::MenuItem("Exit")) | ||
window.Quit(); | ||
|
||
ImGui::EndMenu(); | ||
} | ||
|
||
if (ImGui::BeginMenu("Help")) { | ||
if (ImGui::MenuItem("About")) { | ||
shouldOpenPopup = true; | ||
} | ||
|
||
ImGui::EndMenu(); | ||
} | ||
|
||
ImGui::EndMainMenuBar(); | ||
} | ||
|
||
if (shouldOpenPopup) { | ||
ImGui::OpenPopup("Info"); | ||
} | ||
|
||
bool isInfoPopupOpen = true; | ||
if (ImGui::BeginPopupModal("Info", &isInfoPopupOpen, ImGuiWindowFlags_AlwaysAutoResize)) { | ||
ImGui::Text("Carbon Launcher"); | ||
ImGui::Separator(); | ||
ImGui::Text("Version 0.1.0"); | ||
ImGui::Text("By Ben McAvoy"); | ||
|
||
if (!isInfoPopupOpen) | ||
ImGui::CloseCurrentPopup(); | ||
|
||
ImGui::EndPopup(); | ||
} | ||
|
||
ImGui::BeginChild("##gameControls", ImVec2(0, 64), true); | ||
|
||
static float framePadding = ImGui::GetStyle().FramePadding.y; | ||
if (ImGui::Button(Utils::IsGameOpen() ? "Kill Game" : "Open Game", ImVec2(0, 48))) { | ||
Utils::IsGameOpen() ? Utils::KillGame() : Utils::OpenGame(); | ||
} | ||
|
||
ImGui::EndChild(); | ||
|
||
ImGui::BeginChild("##content", ImVec2(0, 0), true); | ||
|
||
ImGui::Text("Game Status: %s", Utils::IsGameOpen() ? "Open" : "Closed"); | ||
|
||
ImGui::ShowDemoWindow(); | ||
|
||
ImGui::EndChild(); | ||
|
||
ImGui::End(); | ||
|
||
if (!popen) | ||
window.Quit(); | ||
}); | ||
|
||
return 0; | ||
} |
Oops, something went wrong.