Skip to content

Commit

Permalink
Copy hand-written d.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
BlurryLight committed Nov 12, 2024
1 parent 860e619 commit e5c415c
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions unreal/Puerts/Source/JsEnv/JsEnv.Build.cs
Original file line number Diff line number Diff line change
Expand Up @@ -170,6 +170,25 @@ public JsEnv(ReadOnlyTargetRules Target) : base(Target)
string coreJSPath = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Content"));
string destDirName = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "..", "..", "Content"));
DirectoryCopy(coreJSPath, destDirName, true);

// 每次build时拷贝一些手写的.d.ts到Typing目录以同步更新
var SourceFiles = new string[]
{
"ue/ue_s.d.ts",
"ue/puerts.d.ts",
"ue/puerts_decorators.d.ts",
"ue/index.d.ts",
"puerts/index.d.ts",
"ffi/index.d.ts"
};
foreach (var Source in SourceFiles)
{
string src = Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "Typing", Source));
string dest =
Path.GetFullPath(Path.Combine(ModuleDirectory, "..", "..", "..", "..", "Typing", Source));
Logger.LogDebug("Copy " + Source + " from " + src + " to " + dest);
File.Copy(src, dest, true);
}
}

void OldThirdParty(ReadOnlyTargetRules Target)
Expand Down

0 comments on commit e5c415c

Please sign in to comment.