This is a probably broken version of build.py
This commit is contained in:
@@ -1,10 +1,16 @@
|
|||||||
{
|
{
|
||||||
"permissions": {
|
"permissions": {
|
||||||
"defaultMode": "acceptEdits",
|
"allow": [
|
||||||
|
"WebFetch(domain:dev.epicgames.com)",
|
||||||
|
"WebSearch",
|
||||||
|
"WebFetch(domain:github.com)",
|
||||||
|
"Bash(chmod:*)"
|
||||||
|
],
|
||||||
"deny": [
|
"deny": [
|
||||||
"Bash(git commit *)",
|
"Bash(git commit *)",
|
||||||
"Bash(git push *)",
|
"Bash(git push *)",
|
||||||
"Bash(rm -rf *)"
|
"Bash(rm -rf *)"
|
||||||
]
|
],
|
||||||
|
"defaultMode": "acceptEdits"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
1
.gitignore
vendored
1
.gitignore
vendored
@@ -46,3 +46,4 @@ luprex/ext/eris-master/src/luac
|
|||||||
luprex/ext/eris-master/test/persist
|
luprex/ext/eris-master/test/persist
|
||||||
luprex/ext/eris-master/test/unpersist
|
luprex/ext/eris-master/test/unpersist
|
||||||
|
|
||||||
|
GPF-output/**
|
||||||
|
|||||||
@@ -100,8 +100,6 @@ Now, I'm seriously tempted to have lua_len just return the number of keys in the
|
|||||||
|
|
||||||
Since this feels insane, I have also provided a totally new API function: lua_nkeys. This returns the number of keys in the table, full stop. It's constant-time.
|
Since this feels insane, I have also provided a totally new API function: lua_nkeys. This returns the number of keys in the table, full stop. It's constant-time.
|
||||||
|
|
||||||
This patch also includes a function lua_nthkey, to get the Nth item in the table iteration, random-access style. I am not certain that this is a good idea, and I have deliberately avoided the use of this function for now, until I am convinced that it's wise.
|
|
||||||
|
|
||||||
This patch is live, and is necessary to the determinism of the system.
|
This patch is live, and is necessary to the determinism of the system.
|
||||||
|
|
||||||
## The Table Flag Bits Patch
|
## The Table Flag Bits Patch
|
||||||
|
|||||||
32
build.py
32
build.py
@@ -340,21 +340,38 @@ def build_intellisense_database_for_clangd():
|
|||||||
Path(f"{INTEGRATION}/.vscode/compile_commands.json").write_text(json.dumps(ccjson, indent=2))
|
Path(f"{INTEGRATION}/.vscode/compile_commands.json").write_text(json.dumps(ccjson, indent=2))
|
||||||
|
|
||||||
|
|
||||||
|
def run_generateprojectfiles_in_sandbox():
|
||||||
|
"""
|
||||||
|
Unreal's GenerateProjectFiles does an absolutely terrible
|
||||||
|
job of generating project files for vscode. It's so bad
|
||||||
|
that we've decided to just not use it at all. But we
|
||||||
|
still sometimes want to look at the output, to see what
|
||||||
|
it would have generated. We run GenerateProjectFiles
|
||||||
|
in a sandbox so it can't modify the real project. Then,
|
||||||
|
we leave the output in the sandbox for inspection. The
|
||||||
|
results don't affect our build system at all.
|
||||||
|
"""
|
||||||
|
sandbox = Path(f"{INTEGRATION}/GPF-output")
|
||||||
|
if sandbox.exists():
|
||||||
|
shutil.rmtree(sandbox)
|
||||||
|
sandbox.mkdir()
|
||||||
|
(sandbox / "Integration.uproject").write_bytes(Path(f"{INTEGRATION}/Integration.uproject").read_bytes())
|
||||||
|
for name in ["Source", "Config", "Content"]:
|
||||||
|
(sandbox / name).symlink_to(f"../{name}")
|
||||||
|
shell(str(sandbox), f'{UNREALENGINE}/GenerateProjectFiles.{BAT} -projectfiles -project="{sandbox}/Integration.uproject" -game')
|
||||||
|
# Remove the symlinks and uproject copy, leaving only generated files
|
||||||
|
for name in ["Source", "Config", "Content", "Integration.uproject"]:
|
||||||
|
(sandbox / name).unlink()
|
||||||
|
|
||||||
|
|
||||||
def generate_integration_code_workspace():
|
def generate_integration_code_workspace():
|
||||||
"""
|
"""
|
||||||
We build Integration.code-workspace from a template that we
|
We build Integration.code-workspace from a template that we
|
||||||
wrote ourselves, Integration.code-workspace.tpl.json.
|
wrote ourselves, Integration.code-workspace.tpl.json.
|
||||||
We use UnrealBuildTool to generate Integration.code-workspace.ubt,
|
|
||||||
but we don't use it: we just keep it as a reference that you can
|
|
||||||
refer to when editing the template.
|
|
||||||
"""
|
"""
|
||||||
workspace = f"{INTEGRATION}/Integration.code-workspace"
|
workspace = f"{INTEGRATION}/Integration.code-workspace"
|
||||||
workspace_ubt = f"{INTEGRATION}/Integration.code-workspace.ubt"
|
|
||||||
template = f"{INTEGRATION}/Integration.code-workspace.tpl.json"
|
template = f"{INTEGRATION}/Integration.code-workspace.tpl.json"
|
||||||
Path(workspace).unlink(missing_ok=True)
|
Path(workspace).unlink(missing_ok=True)
|
||||||
Path(workspace_ubt).unlink(missing_ok=True)
|
|
||||||
shell(INTEGRATION, f'{UNREALENGINE}/GenerateProjectFiles.{BAT} -projectfiles -project="{INTEGRATION}/Integration.uproject" -game')
|
|
||||||
Path(workspace).rename(workspace_ubt)
|
|
||||||
expand_json_file(template, workspace, CONFIG)
|
expand_json_file(template, workspace, CONFIG)
|
||||||
|
|
||||||
|
|
||||||
@@ -384,6 +401,7 @@ if MODE == "all":
|
|||||||
generate_lpx_paths()
|
generate_lpx_paths()
|
||||||
generate_integration_uproject()
|
generate_integration_uproject()
|
||||||
run_unrealengine_setup_bat_replacement()
|
run_unrealengine_setup_bat_replacement()
|
||||||
|
run_generateprojectfiles_in_sandbox()
|
||||||
build_unrealbuildtool()
|
build_unrealbuildtool()
|
||||||
generate_integration_code_workspace()
|
generate_integration_code_workspace()
|
||||||
|
|
||||||
|
|||||||
@@ -1227,20 +1227,6 @@ LUA_API int lua_nkeys (lua_State *L, int idx) {
|
|||||||
return n;
|
return n;
|
||||||
}
|
}
|
||||||
|
|
||||||
LUA_API int lua_nthkey (lua_State *L, int idx, int n) {
|
|
||||||
StkId t;
|
|
||||||
lua_lock(L);
|
|
||||||
t = index2addr(L, idx);
|
|
||||||
api_check(L, ttistable(t), "table expected");
|
|
||||||
api_incr_top(L);
|
|
||||||
api_incr_top(L);
|
|
||||||
int res = luaH_nthkey(L, hvalue(t), n, L->top - 2);
|
|
||||||
if (res == 0)
|
|
||||||
L->top -= 2;
|
|
||||||
lua_unlock(L);
|
|
||||||
return res;
|
|
||||||
}
|
|
||||||
|
|
||||||
LUA_API void lua_concat (lua_State *L, int n) {
|
LUA_API void lua_concat (lua_State *L, int n) {
|
||||||
lua_lock(L);
|
lua_lock(L);
|
||||||
api_checknelems(L, n);
|
api_checknelems(L, n);
|
||||||
|
|||||||
@@ -317,7 +317,6 @@ LUA_API lua_Alloc (lua_getallocf) (lua_State *L, void **ud);
|
|||||||
LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
|
LUA_API void (lua_setallocf) (lua_State *L, lua_Alloc f, void *ud);
|
||||||
|
|
||||||
LUA_API int (lua_nkeys) (lua_State *L, int idx);
|
LUA_API int (lua_nkeys) (lua_State *L, int idx);
|
||||||
LUA_API int (lua_nthkey) (lua_State *L, int idx, int n);
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
** ===============================================================
|
** ===============================================================
|
||||||
|
|||||||
Reference in New Issue
Block a user