Skip to content

Commit ed9b352

Browse files
authored
Merge pull request #758 from p4puniya/migrating-vr-gsoc2023
Adding Cpp Directory
2 parents 14716e0 + a1c852b commit ed9b352

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

mode/src/processing/mode/android/AndroidBuild.java

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -239,11 +239,15 @@ protected File createProject(boolean external, String password)
239239

240240
// Create the 'src' folder with the preprocessed code.
241241
srcFolder = new File(tmpFolder, module + "/src/main/java");
242-
binFolder = srcFolder; // Needed in the the parent JavaBuild class
242+
binFolder = srcFolder; // Needed in the parent JavaBuild class
243243
if (processing.app.Base.DEBUG) {
244244
Platform.openFolder(tmpFolder);
245245
}
246246

247+
// Create the 'cpp' folder within 'src/main'
248+
File cppFolder = new File(srcFolder.getParentFile(), "cpp");
249+
cppFolder.mkdirs(); // Create the folder if it doesn't exist
250+
247251
manifest = new Manifest(sketch, appComponent, mode.getFolder(), false);
248252

249253
// build the preproc and get to work
@@ -262,7 +266,9 @@ protected File createProject(boolean external, String password)
262266
createAppModule(module);
263267
}
264268
}
265-
269+
//check if cpp folders exist:
270+
if(cppFolder.exists()) System.out.println("Cpp Directory created successfully.");
271+
else System.out.println("Error while creating Cpp Dir.");
266272
return tmpFolder;
267273
}
268274

0 commit comments

Comments
 (0)