Skip to content

Commit 9fdb4f3

Browse files
committed
feat: basic template
0 parents  commit 9fdb4f3

36 files changed

+35428
-0
lines changed

.gitattributes

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CarbonTemplateGUI/vendor/* linguist-vendored

.github/workflows/build.yml

+50
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
name: Build
2+
3+
on:
4+
push:
5+
tags:
6+
- "*"
7+
workflow_dispatch:
8+
9+
env:
10+
SOLUTION_FILE_PATH: .
11+
BUILD_CONFIGURATION: Release
12+
13+
permissions:
14+
contents: write
15+
16+
jobs:
17+
build:
18+
runs-on: windows-latest
19+
20+
steps:
21+
- uses: actions/checkout@v4
22+
23+
- name: Setup VCPKG
24+
uses: lukka/run-vcpkg@v11
25+
with:
26+
vcpkgGitCommitId: aafb8b71554a4590aa5108bdb5005d81d72db6c1
27+
28+
- name: Integrate vcpkg
29+
run: vcpkg integrate install
30+
31+
- name: Add MSBuild to PATH
32+
uses: microsoft/setup-msbuild@v1.0.2
33+
34+
- name: Build
35+
working-directory: ${{env.GITHUB_WORKSPACE}}
36+
run: msbuild /m /p:Configuration=${{env.BUILD_CONFIGURATION}} ${{env.SOLUTION_FILE_PATH}}
37+
38+
- name: Upload build artifacts
39+
uses: actions/upload-artifact@v4
40+
with:
41+
name: Mod_${{env.BUILD_CONFIGURATION}}
42+
path: |
43+
x64\${{env.BUILD_CONFIGURATION}}\
44+
45+
- name: Create Release
46+
uses: ncipollo/release-action@v1.14.0
47+
with:
48+
artifacts: x64/${{env.BUILD_CONFIGURATION}}/*.dll
49+
draft: true
50+
makeLatest: true

.github/workflows/setup.yml

+74
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Setup project
2+
3+
on:
4+
push:
5+
branches:
6+
- "*"
7+
pull_request:
8+
branches:
9+
- "*"
10+
11+
permissions:
12+
contents: write
13+
14+
jobs:
15+
rename:
16+
runs-on: ubuntu-latest
17+
18+
steps:
19+
- name: Checkout
20+
uses: actions/checkout@v4
21+
22+
- name: Ensure it's the initial commit
23+
id: check_commit
24+
run: |
25+
# If commit message doesn't contain "Initial", set output to false
26+
if [[ ! "${{ github.event.head_commit.message }}" =~ "Initial" ]]; then
27+
echo "Commit message does not contain 'Initial'. Skipping further steps."
28+
echo "skip=true" >> $GITHUB_ENV # Set environment variable to skip further steps
29+
fi
30+
31+
- name: Rename files
32+
if: env.skip != 'true'
33+
run: |
34+
REPO_NAME=$(basename ${GITHUB_REPOSITORY})
35+
mv CarbonTemplateGUI/CarbonTemplateGUI.vcxproj CarbonTemplateGUI/${REPO_NAME}.vcxproj
36+
mv CarbonTemplateGUI $REPO_NAME
37+
mv CarbonTemplateGUI.sln $REPO_NAME.sln
38+
39+
- name: Find and replace
40+
if: env.skip != 'true'
41+
run: |
42+
REPO_NAME=$(basename ${GITHUB_REPOSITORY})
43+
REPO_OWNER=$(echo ${GITHUB_REPOSITORY} | cut -d '/' -f 1)
44+
sed -i "s/CarbonTemplateGUI/${REPO_NAME}/g" $REPO_NAME/${REPO_NAME}.vcxproj
45+
sed -i "s/CarbonTemplateGUI/${REPO_NAME}/g" $REPO_NAME.sln
46+
sed -i "s/CarbonTemplateGUI/${REPO_NAME}/g" .gitattributes
47+
sed -i "s/CarbonTemplateGUI/${REPO_NAME}/g" DebugInjector/DebugInjector.vcxproj
48+
sed -i "s/REPONAME/${REPO_NAME}/g" manifest.json
49+
sed -i "s/REPOOWNER/${REPO_OWNER}/g" manifest.json
50+
sed -i "s/REPOOWNER/${REPO_OWNER}/g" manifest.json
51+
sed -i "s/CarbonTemplateGUI/${REPO_NAME}/g" README.new.md
52+
sed -i "s/BenMcAvoy, ScrappySM/${REPO_OWNER}/g" LICENSE
53+
sed -i "s|REPOLINK|https://github.com/${GITHUB_REPOSITORY}|g" manifest.json
54+
sed -i "s|RELEASES_LINK_URL|https://github.com/${GITHUB_REPOSITORY}/releases|g" README.new.md
55+
56+
- name: Update README to getting started
57+
if: env.skip != 'true'
58+
run: |
59+
rm README.md
60+
mv README.new.md README.md
61+
62+
- name: Delete this workflow
63+
if: env.skip != 'true'
64+
run: |
65+
rm .github/workflows/setup.yml
66+
67+
- name: Commit changes
68+
if: env.skip != 'true'
69+
run: |
70+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
71+
git config --global user.name "github-actions[bot]"
72+
git add -A
73+
git commit --amend --no-edit
74+
git push --force

.gitignore

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
.vs
2+
x64
3+
*.vcxproj.*
4+
vcpkg_installed

CarbonTemplateGUI.sln

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
2+
Microsoft Visual Studio Solution File, Format Version 12.00
3+
# Visual Studio Version 17
4+
VisualStudioVersion = 17.13.35617.110 d17.13
5+
MinimumVisualStudioVersion = 10.0.40219.1
6+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "DebugInjector", "DebugInjector\DebugInjector.vcxproj", "{538A268F-A231-4286-87FC-B85175C45B54}"
7+
EndProject
8+
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "CarbonTemplateGUI", "CarbonTemplateGUI\CarbonTemplateGUI.vcxproj", "{0D10045F-A8D3-4F5F-8356-7E340B85A48C}"
9+
EndProject
10+
Global
11+
GlobalSection(SolutionConfigurationPlatforms) = preSolution
12+
Debug|x64 = Debug|x64
13+
Debug|x86 = Debug|x86
14+
Release|x64 = Release|x64
15+
Release|x86 = Release|x86
16+
EndGlobalSection
17+
GlobalSection(ProjectConfigurationPlatforms) = postSolution
18+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Debug|x64.ActiveCfg = Debug|x64
19+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Debug|x64.Build.0 = Debug|x64
20+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Debug|x86.ActiveCfg = Debug|Win32
21+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Debug|x86.Build.0 = Debug|Win32
22+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Release|x64.ActiveCfg = Release|x64
23+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Release|x64.Build.0 = Release|x64
24+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Release|x86.ActiveCfg = Release|Win32
25+
{0D10045F-A8D3-4F5F-8356-7E340B85A48C}.Release|x86.Build.0 = Release|Win32
26+
{538A268F-A231-4286-87FC-B85175C45B54}.Debug|x64.ActiveCfg = Debug|x64
27+
{538A268F-A231-4286-87FC-B85175C45B54}.Debug|x64.Build.0 = Debug|x64
28+
{538A268F-A231-4286-87FC-B85175C45B54}.Debug|x86.ActiveCfg = Debug|Win32
29+
{538A268F-A231-4286-87FC-B85175C45B54}.Debug|x86.Build.0 = Debug|Win32
30+
{538A268F-A231-4286-87FC-B85175C45B54}.Release|x64.ActiveCfg = Release|x64
31+
{538A268F-A231-4286-87FC-B85175C45B54}.Release|x64.Build.0 = Release|x64
32+
{538A268F-A231-4286-87FC-B85175C45B54}.Release|x86.ActiveCfg = Release|Win32
33+
{538A268F-A231-4286-87FC-B85175C45B54}.Release|x86.Build.0 = Release|Win32
34+
EndGlobalSection
35+
GlobalSection(SolutionProperties) = preSolution
36+
HideSolutionNode = FALSE
37+
EndGlobalSection
38+
GlobalSection(ExtensibilityGlobals) = postSolution
39+
SolutionGuid = {9E339997-C41E-4410-9ED6-D93FE0E1B58B}
40+
EndGlobalSection
41+
EndGlobal
+201
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,201 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
3+
<ItemGroup Label="ProjectConfigurations">
4+
<ProjectConfiguration Include="Debug|Win32">
5+
<Configuration>Debug</Configuration>
6+
<Platform>Win32</Platform>
7+
</ProjectConfiguration>
8+
<ProjectConfiguration Include="Release|Win32">
9+
<Configuration>Release</Configuration>
10+
<Platform>Win32</Platform>
11+
</ProjectConfiguration>
12+
<ProjectConfiguration Include="Debug|x64">
13+
<Configuration>Debug</Configuration>
14+
<Platform>x64</Platform>
15+
</ProjectConfiguration>
16+
<ProjectConfiguration Include="Release|x64">
17+
<Configuration>Release</Configuration>
18+
<Platform>x64</Platform>
19+
</ProjectConfiguration>
20+
</ItemGroup>
21+
<PropertyGroup Label="Globals">
22+
<VCProjectVersion>17.0</VCProjectVersion>
23+
<Keyword>Win32Proj</Keyword>
24+
<ProjectGuid>{0d10045f-a8d3-4f5f-8356-7e340b85a48c}</ProjectGuid>
25+
<RootNamespace>CarbonTemplateGUI</RootNamespace>
26+
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
27+
</PropertyGroup>
28+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
29+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
30+
<ConfigurationType>DynamicLibrary</ConfigurationType>
31+
<UseDebugLibraries>true</UseDebugLibraries>
32+
<PlatformToolset>v143</PlatformToolset>
33+
<CharacterSet>MultiByte</CharacterSet>
34+
</PropertyGroup>
35+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
36+
<ConfigurationType>DynamicLibrary</ConfigurationType>
37+
<UseDebugLibraries>false</UseDebugLibraries>
38+
<PlatformToolset>v143</PlatformToolset>
39+
<WholeProgramOptimization>true</WholeProgramOptimization>
40+
<CharacterSet>MultiByte</CharacterSet>
41+
</PropertyGroup>
42+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
43+
<ConfigurationType>DynamicLibrary</ConfigurationType>
44+
<UseDebugLibraries>true</UseDebugLibraries>
45+
<PlatformToolset>v143</PlatformToolset>
46+
<CharacterSet>MultiByte</CharacterSet>
47+
</PropertyGroup>
48+
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
49+
<ConfigurationType>DynamicLibrary</ConfigurationType>
50+
<UseDebugLibraries>false</UseDebugLibraries>
51+
<PlatformToolset>v143</PlatformToolset>
52+
<WholeProgramOptimization>true</WholeProgramOptimization>
53+
<CharacterSet>MultiByte</CharacterSet>
54+
</PropertyGroup>
55+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
56+
<ImportGroup Label="ExtensionSettings">
57+
</ImportGroup>
58+
<ImportGroup Label="Shared">
59+
</ImportGroup>
60+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
61+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
62+
</ImportGroup>
63+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
64+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
65+
</ImportGroup>
66+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
67+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
68+
</ImportGroup>
69+
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
70+
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
71+
</ImportGroup>
72+
<PropertyGroup Label="UserMacros" />
73+
<PropertyGroup Label="Vcpkg">
74+
<VcpkgEnableManifest>true</VcpkgEnableManifest>
75+
<VcpkgEnabled>true</VcpkgEnabled>
76+
</PropertyGroup>
77+
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
78+
<VcpkgUseStatic>true</VcpkgUseStatic>
79+
<VcpkgUseMD>true</VcpkgUseMD>
80+
</PropertyGroup>
81+
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
82+
<VcpkgUseStatic>true</VcpkgUseStatic>
83+
<VcpkgUseMD>true</VcpkgUseMD>
84+
</PropertyGroup>
85+
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
86+
<VcpkgUseStatic>true</VcpkgUseStatic>
87+
<VcpkgUseMD>true</VcpkgUseMD>
88+
</PropertyGroup>
89+
<PropertyGroup Label="Vcpkg" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
90+
<VcpkgUseStatic>true</VcpkgUseStatic>
91+
<VcpkgUseMD>true</VcpkgUseMD>
92+
</PropertyGroup>
93+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
94+
<ClCompile>
95+
<WarningLevel>Level3</WarningLevel>
96+
<SDLCheck>true</SDLCheck>
97+
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
98+
<ConformanceMode>true</ConformanceMode>
99+
<LanguageStandard>stdcpp20</LanguageStandard>
100+
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)include;$(ProjectDir)vendor</AdditionalIncludeDirectories>
101+
<PrecompiledHeader>Use</PrecompiledHeader>
102+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
103+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
104+
</ClCompile>
105+
<Link>
106+
<SubSystem>Windows</SubSystem>
107+
<GenerateDebugInformation>true</GenerateDebugInformation>
108+
</Link>
109+
</ItemDefinitionGroup>
110+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
111+
<ClCompile>
112+
<WarningLevel>Level3</WarningLevel>
113+
<FunctionLevelLinking>true</FunctionLevelLinking>
114+
<IntrinsicFunctions>true</IntrinsicFunctions>
115+
<SDLCheck>true</SDLCheck>
116+
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
117+
<ConformanceMode>true</ConformanceMode>
118+
<LanguageStandard>stdcpp20</LanguageStandard>
119+
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)include;$(ProjectDir)vendor</AdditionalIncludeDirectories>
120+
<PrecompiledHeader>Use</PrecompiledHeader>
121+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
122+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
123+
</ClCompile>
124+
<Link>
125+
<SubSystem>Windows</SubSystem>
126+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
127+
<OptimizeReferences>true</OptimizeReferences>
128+
<GenerateDebugInformation>true</GenerateDebugInformation>
129+
</Link>
130+
</ItemDefinitionGroup>
131+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
132+
<ClCompile>
133+
<WarningLevel>Level3</WarningLevel>
134+
<SDLCheck>true</SDLCheck>
135+
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
136+
<ConformanceMode>true</ConformanceMode>
137+
<LanguageStandard>stdcpp20</LanguageStandard>
138+
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)include;$(ProjectDir)vendor</AdditionalIncludeDirectories>
139+
<PrecompiledHeader>Use</PrecompiledHeader>
140+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
141+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
142+
</ClCompile>
143+
<Link>
144+
<SubSystem>Windows</SubSystem>
145+
<GenerateDebugInformation>true</GenerateDebugInformation>
146+
</Link>
147+
</ItemDefinitionGroup>
148+
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
149+
<ClCompile>
150+
<WarningLevel>Level3</WarningLevel>
151+
<FunctionLevelLinking>true</FunctionLevelLinking>
152+
<IntrinsicFunctions>true</IntrinsicFunctions>
153+
<SDLCheck>true</SDLCheck>
154+
<PreprocessorDefinitions>NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
155+
<ConformanceMode>true</ConformanceMode>
156+
<LanguageStandard>stdcpp20</LanguageStandard>
157+
<AdditionalIncludeDirectories>$(ProjectDir);$(ProjectDir)include;$(ProjectDir)vendor</AdditionalIncludeDirectories>
158+
<PrecompiledHeader>Use</PrecompiledHeader>
159+
<PrecompiledHeaderFile>pch.h</PrecompiledHeaderFile>
160+
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
161+
</ClCompile>
162+
<Link>
163+
<SubSystem>Windows</SubSystem>
164+
<EnableCOMDATFolding>true</EnableCOMDATFolding>
165+
<OptimizeReferences>true</OptimizeReferences>
166+
<GenerateDebugInformation>true</GenerateDebugInformation>
167+
</Link>
168+
</ItemDefinitionGroup>
169+
<ItemGroup>
170+
<ClCompile Include="pch.cpp">
171+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">Create</PrecompiledHeader>
172+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">Create</PrecompiledHeader>
173+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">Create</PrecompiledHeader>
174+
<PrecompiledHeader Condition="'$(Configuration)|$(Platform)'=='Release|x64'">Create</PrecompiledHeader>
175+
</ClCompile>
176+
<ClCompile Include="src\dllmain.cpp" />
177+
<ClCompile Include="src\hook.cpp" />
178+
<ClCompile Include="src\main.cpp" />
179+
<ClCompile Include="vendor\kiero\kiero.cpp" />
180+
</ItemGroup>
181+
<ItemGroup>
182+
<ClInclude Include="include\hook.h" />
183+
<ClInclude Include="include\log.h" />
184+
<ClInclude Include="include\state.h" />
185+
<ClInclude Include="pch.h" />
186+
<ClInclude Include="vendor\carbon\console.h" />
187+
<ClInclude Include="vendor\carbon\contraption.h" />
188+
<ClInclude Include="vendor\carbon\lua\executor.h" />
189+
<ClInclude Include="vendor\carbon\lua\lauxlib.h" />
190+
<ClInclude Include="vendor\carbon\lua\lua.h" />
191+
<ClInclude Include="vendor\carbon\lua\lua.hpp" />
192+
<ClInclude Include="vendor\carbon\offsets.h" />
193+
<ClInclude Include="vendor\carbon\tools.h" />
194+
<ClInclude Include="vendor\carbon\utils.h" />
195+
<ClInclude Include="vendor\kiero\kiero.h" />
196+
<ClInclude Include="vendor\resources\font.h" />
197+
</ItemGroup>
198+
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
199+
<ImportGroup Label="ExtensionTargets">
200+
</ImportGroup>
201+
</Project>

0 commit comments

Comments
 (0)