Skip to content

Commit 17bb60d

Browse files
committed
feat: add ecsact unreal codegen tool
1 parent 7b97a5e commit 17bb60d

File tree

6 files changed

+58
-2
lines changed

6 files changed

+58
-2
lines changed

BUILD.bazel

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,14 @@ bzlws_copy(
55
srcs = [
66
"@ecsact_cli",
77
"@ecsact_lsp_server",
8-
],
8+
] + select({
9+
"@platforms//os:windows": [
10+
"@ecsact_unreal_codegen_win64//file",
11+
],
12+
"@platforms//os:linux": [
13+
"@ecsact_unreal_codegen_linux//file",
14+
],
15+
}),
916
out = "dist/bin/{FILENAME}",
1017
force = True,
1118
)

CheckDist.sh

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,5 +15,6 @@ echo
1515
[ ! -d "dist/include/ecsact" ] && echo "Missing ecsact include directory" && exit 1
1616
[ ! -f "dist/bin/ecsact" ] && echo "Missing ecsact CLI" && exit 1
1717
[ ! -f "dist/bin/ecsact_lsp_server" ] && echo "Missing ecsact lsp CLI" && exit 1
18+
[ ! -f "dist/bin/EcsactUnrealCodegen" ] && echo "Missing EcsatUnrealCodegen tool" && exit 1
1819

1920
exit 0

CreateMsix.ps1

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,8 @@ try
3838

3939
$ExecutablesToSign = @(
4040
'.\dist\bin\ecsact.exe',
41-
'.\dist\bin\ecsact_lsp_server.exe'
41+
'.\dist\bin\ecsact_lsp_server.exe',
42+
'.\dist\bin\EcsactUnrealCodegen.exe'
4243
)
4344

4445
foreach($Executable in $ExecutablesToSign)

MODULE.bazel

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,24 @@ bazel_dep(name = "boost.process", version = "1.83.0.bzl.2")
2626
bazel_dep(name = "bzlws", version = "0.2.0")
2727
bazel_dep(name = "ecsact_logo", version = "0.1.11")
2828

29+
prebuilt_tools = use_extension("//:prebuilt-tools.bzl", "prebuilt_tools")
30+
use_repo(
31+
prebuilt_tools,
32+
"ecsact_unreal_codegen_linux",
33+
"ecsact_unreal_codegen_win64",
34+
)
35+
36+
# local_path_override(
37+
# module_name = "ecsact_unreal_codegen",
38+
# path = "../ecsact_unreal/Tools/EcsactUnrealCodegen",
39+
# )
40+
# git_override(
41+
# module_name = "ecsact_unreal_codegen",
42+
# commit = "1a2c65d45a9a697bbbe61c643ff7926ad28243be",
43+
# remote = "git@github.com:ecsact-dev/ecsact_unreal.git",
44+
# strip_prefix = "Tools/EcsactUnrealCodegen",
45+
# )
46+
2947
bazel_dep(name = "toolchains_llvm", version = "1.2.0", dev_dependency = True)
3048
bazel_dep(name = "hedron_compile_commands", dev_dependency = True)
3149

dist/AppxManifest.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,17 @@
3636
</Extensions>
3737
</Application>
3838

39+
<Application Id="EcsactSdk.EcsactUnrealCodegen" Executable="bin/EcsactUnrealCodegen.exe" EntryPoint="Windows.FullTrustApplication">
40+
<uap3:VisualElements DisplayName="Ecsact Unreal Codegen" Description="Tool for executing ecsact codegen on Unreal projects" BackgroundColor="transparent" Square44x44Logo="images/ecsact-color44.png" Square150x150Logo="images/ecsact-color150.png" AppListEntry="none" VisualGroup="Ecsact" />
41+
<Extensions>
42+
<uap3:Extension Category="windows.appExecutionAlias">
43+
<uap3:AppExecutionAlias>
44+
<uap8:ExecutionAlias Alias="EcsactUnrealCodegen.exe" />
45+
</uap3:AppExecutionAlias>
46+
</uap3:Extension>
47+
</Extensions>
48+
</Application>
49+
3950
</Applications>
4051
<Capabilities>
4152
<rescap:Capability Name="runFullTrust" />

prebuilt-tools.bzl

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_file")
2+
3+
def _prebuilt_tools(mctx):
4+
http_file(
5+
name = "ecsact_unreal_codegen_win64",
6+
downloaded_file_path = "EcsactUnrealCodegen.exe",
7+
executable = True,
8+
integrity = "sha256-HIra76wJlgsBAR+Oaj90INFCYLIS3QyPSWDDhvqUFCo=",
9+
url = "https://github.com/ecsact-dev/ecsact_unreal/releases/download/0.2.0/EcsactUnrealCodegen-Win64.exe",
10+
)
11+
http_file(
12+
name = "ecsact_unreal_codegen_linux",
13+
downloaded_file_path = "EcsactUnrealCodegen",
14+
executable = True,
15+
url = "https://github.com/ecsact-dev/ecsact_unreal/releases/download/0.2.0/EcsactUnrealCodegen-Linux",
16+
)
17+
18+
prebuilt_tools = module_extension(_prebuilt_tools)

0 commit comments

Comments
 (0)