Skip to content

Commit 45219fa

Browse files
xcode build
1 parent 903eb95 commit 45219fa

File tree

2 files changed

+7
-17
lines changed

2 files changed

+7
-17
lines changed

Modules/@babylonjs/react-native/postinstall.js

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@ const os = require("os");
22
const { exec } = require('child_process');
33

44
function iosCMake() {
5-
process.stdout.write('ffffff');
65
console.log("Running CMake for iOS...");
76
exec("cmake -S ios -B Build/iOS -G Xcode -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_NATIVE_PLUGIN_TESTUTILS=OFF -DBABYLON_NATIVE_INSTALL=OFF -DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=./shared/BabylonNative/deps/bgfx.cmake-src -DFETCHCONTENT_SOURCE_DIR_ARCANA.CPP=./shared/BabylonNative/deps/arcana.cpp-src -DFETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS=./shared/BabylonNative/deps/cmakeextensions-src -DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=./shared/BabylonNative/deps/jsruntimehost-src -DFETCHCONTENT_SOURCE_DIR_URLLIB=./shared/BabylonNative/deps/urllib-src -DFETCHCONTENT_SOURCE_DIR_SPIRV-CROSS=./shared/BabylonNative/deps/spirv-cross-src -DFETCHCONTENT_SOURCE_DIR_LIBWEBP=./shared/BabylonNative/deps/libwebp-src -DFETCHCONTENT_SOURCE_DIR_GLSLANG=./shared/BabylonNative/deps/glslang-src -DFETCHCONTENT_SOURCE_DIR_BASE-N=./shared/BabylonNative/deps/base-n-src -DFETCHCONTENT_SOURCE_DIR_IOS-CMAKE=./shared/BabylonNative/deps/ios-cmake-src",
87
(error, stdout, stderr)=>{
@@ -15,21 +14,12 @@ process.stdout.write('ffffff');
1514
return;
1615
}
1716
console.error(`Output: ${stdout}`);
18-
1917
});
2018
}
2119

2220
function postInstall() {
2321
if (os.platform() === "darwin") {
2422
iosCMake();
25-
26-
27-
/*exec("npm install && npx gulp buildIOSRNTA", {
28-
cwd: "../../Package",
29-
});*/
30-
31-
//console.log(chalk.black.bgCyan("Installing iOS pods..."));
32-
//exec("pod install", { cwd: "ios" });
3323
}
3424
}
3525

Package/gulpfile.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -57,18 +57,18 @@ const buildTypeScript = async () => {
5757
packageJson.main = `${path.basename(packageJson.main, '.ts')}.js`;
5858
fs.writeFileSync('Assembled/package.json', JSON.stringify(packageJson, null, 4));
5959
};
60-
60+
/*
6161
const makeXCodeProj = async () => {
62-
exec(`cmake react-native/ios -G Xcode -DBUILD_RNAPP_DIR=Playground -B Build/iOS -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_NATIVE_PLUGIN_TESTUTILS=OFF -DBABYLON_NATIVE_INSTALL=OFF -DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=./react-native/shared/BabylonNative/deps/bgfx.cmake-src -DFETCHCONTENT_SOURCE_DIR_ARCANA.CPP=./react-native/shared/BabylonNative/deps/arcana.cpp-src -DFETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS=./react-native/shared/BabylonNative/deps/cmakeextensions-src -DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=./react-native/shared/BabylonNative/deps/jsruntimehost-src -DFETCHCONTENT_SOURCE_DIR_URLLIB=./react-native/shared/BabylonNative/deps/urllib-src -DFETCHCONTENT_SOURCE_DIR_SPIRV-CROSS=./react-native/shared/BabylonNative/deps/spirv-cross-src -DFETCHCONTENT_SOURCE_DIR_LIBWEBP=./react-native/shared/BabylonNative/deps/libwebp-src -DFETCHCONTENT_SOURCE_DIR_GLSLANG=./react-native/shared/BabylonNative/deps/glslang-src -DFETCHCONTENT_SOURCE_DIR_BASE-N=./react-native/shared/BabylonNative/deps/base-n-src -DFETCHCONTENT_SOURCE_DIR_IOS-CMAKE=./react-native/shared/BabylonNative/deps/ios-cmake-src`,
63-
'../Modules/@babylonjs');
62+
exec(`cmake -S ios -G Xcode -B Build/iOS -DFETCHCONTENT_FULLY_DISCONNECTED=ON -DBABYLON_NATIVE_BUILD_APPS=OFF -DBABYLON_NATIVE_PLUGIN_TESTUTILS=OFF -DBABYLON_NATIVE_INSTALL=OFF -DFETCHCONTENT_SOURCE_DIR_BGFX.CMAKE=./react-native/shared/BabylonNative/deps/bgfx.cmake-src -DFETCHCONTENT_SOURCE_DIR_ARCANA.CPP=./react-native/shared/BabylonNative/deps/arcana.cpp-src -DFETCHCONTENT_SOURCE_DIR_CMAKEEXTENSIONS=./react-native/shared/BabylonNative/deps/cmakeextensions-src -DFETCHCONTENT_SOURCE_DIR_JSRUNTIMEHOST=./react-native/shared/BabylonNative/deps/jsruntimehost-src -DFETCHCONTENT_SOURCE_DIR_URLLIB=./react-native/shared/BabylonNative/deps/urllib-src -DFETCHCONTENT_SOURCE_DIR_SPIRV-CROSS=./react-native/shared/BabylonNative/deps/spirv-cross-src -DFETCHCONTENT_SOURCE_DIR_LIBWEBP=./react-native/shared/BabylonNative/deps/libwebp-src -DFETCHCONTENT_SOURCE_DIR_GLSLANG=./react-native/shared/BabylonNative/deps/glslang-src -DFETCHCONTENT_SOURCE_DIR_BASE-N=./react-native/shared/BabylonNative/deps/base-n-src -DFETCHCONTENT_SOURCE_DIR_IOS-CMAKE=./react-native/shared/BabylonNative/deps/ios-cmake-src`,
63+
'../Modules/@babylonjs/react-native');
6464
};
65-
65+
*/
6666
const buildIphoneOS = async () => {
67-
exec('xcodebuild -sdk iphoneos -configuration Release -project BRNPlayground.xcworkspace -target Playground build CODE_SIGNING_ALLOWED=NO', '../Apps/Playground/ios');
67+
exec('xcodebuild -sdk iphoneos -configuration Release -workspace BRNPlayground.xcworkspace -scheme Playground build CODE_SIGNING_ALLOWED=NO', '../Apps/Playground/ios');
6868
};
6969

7070
const buildIphoneSimulator = async () => {
71-
exec('xcodebuild -sdk iphonesimulator -arch x86_64 -configuration Release -project BRNPlayground.xcworkspace -target Playground build CODE_SIGNING_ALLOWED=NO', '../Apps/Playground/ios');
71+
exec('xcodebuild -sdk iphonesimulator -arch x86_64 -configuration Release -workspace BRNPlayground.xcworkspace -scheme Playground build CODE_SIGNING_ALLOWED=NO', '../Apps/Playground/ios');
7272
};
7373

7474
const buildAndroid = async () => {
@@ -389,7 +389,7 @@ const buildBabylonNativeSourceTree = async () => {
389389

390390
const copyFiles = gulp.parallel(copyCommonFiles, copySharedFiles, copyIOSFiles, copyAndroidFiles, copyWindowsFiles);
391391
const buildAssembled = gulp.series(buildBabylonNativeSourceTree, copyFiles, buildTypeScript, validateAssembled);
392-
const buildIOS = gulp.series(makeXCodeProj, buildIphoneOS, buildIphoneSimulator); // should not be used anymore
392+
const buildIOS = gulp.series(buildIphoneOS, buildIphoneSimulator);
393393

394394
exports.buildAssembled = buildAssembled;
395395
exports.buildTypeScript = buildTypeScript;

0 commit comments

Comments
 (0)