Skip to content

Commit

Permalink
[unity]native_src_il2cpp的ci缺失unityenv_for_puerts.h
Browse files Browse the repository at this point in the history
  • Loading branch information
chexiongsheng committed Sep 12, 2024
1 parent 4db78dd commit 5c63332
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 3 deletions.
12 changes: 9 additions & 3 deletions unity/cli/make.mts
Original file line number Diff line number Diff line change
Expand Up @@ -265,9 +265,15 @@ async function runPuertsMake(cwd: string, options: BuildOptions) {
const linkD = (BackendConfig['link-libraries'][options.platform]?.[options.arch] || []).join(';')
const incD = (BackendConfig.include || []).join(';')

if ('native_src_il2cpp' == basename(cwd) && !existsSync(`${cwd}/Src/FunctionBridge.Gen.h`)) {
console.warn(`${cwd}/Src/FunctionBridge.Gen.h not existed! using default one`);
cp(join(cwd, '../cli/FunctionBridge.Gen.h'), join(cwd, 'Src/FunctionBridge.Gen.h'));
if ('native_src_il2cpp' == basename(cwd)) {
if (!existsSync(join(cwd, 'Src/FunctionBridge.Gen.h'))) {
console.warn(`${cwd}/Src/FunctionBridge.Gen.h not existed! using default one`);
cp(join(cwd, '../cli/FunctionBridge.Gen.h'), join(cwd, 'Src/FunctionBridge.Gen.h'));
}
if (!existsSync(join(cwd, '../Assets/core/upm/Plugins/puerts_il2cpp/unityenv_for_puerts.h'))) {
console.warn(`${join(cwd, '../Assets/core/upm/Plugins/puerts_il2cpp/unityenv_for_puerts.h')} not existed! using default one`);
cp(join(cwd, '../cli/unityenv_for_puerts.h'), join(cwd, 'Inc/unityenv_for_puerts.h'));
}
}

mkdir('-p', CMAKE_BUILD_PATH);
Expand Down
9 changes: 9 additions & 0 deletions unity/cli/unityenv_for_puerts.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@

#ifndef UNITY_2021_1_OR_NEWER
#define UNITY_2021_1_OR_NEWER
#endif

#ifndef PUERTS_SHARED
#define PUERTS_SHARED
#endif

0 comments on commit 5c63332

Please sign in to comment.