@@ -53,8 +53,8 @@ bool androidProject::createProjectFile(){
53
53
// Copy the `src/` folder from the template
54
54
try {
55
55
fs::copy (
56
- templatePath / " ofApp" / " src " ,
57
- projectDir / " ofApp" / " src " ,
56
+ templatePath / " ofApp" ,
57
+ projectDir / " ofApp" ,
58
58
fs::copy_options::recursive | (bOverwrite ? fs::copy_options::overwrite_existing : fs::copy_options::update_existing)
59
59
);
60
60
} catch (fs::filesystem_error & e) {
@@ -63,7 +63,7 @@ bool androidProject::createProjectFile(){
63
63
}
64
64
65
65
try {
66
- fs::copy (templatePath / " res" , projectDir / " ofApp/res" , fs::copy_options::recursive);
66
+ fs::copy (templatePath / " ofApp/src/ res" , projectDir / " ofApp/src /res" , fs::copy_options::recursive);
67
67
} catch (fs::filesystem_error & e) {
68
68
ofLogError (LOG_NAME) << " Error copying res folder: " << e.what ();
69
69
}
@@ -78,8 +78,8 @@ bool androidProject::createProjectFile(){
78
78
}
79
79
80
80
findandreplaceInTexfile (projectDir / " ofApp/res/values/strings.xml" , " TEMPLATE_APP_NAME" , projectName);
81
- fs::path from = projectDir / " srcJava/ cc/openframeworks/APP_NAME " ;
82
- fs::path to = projectDir / (" srcJava/ cc/openframeworks/" + projectName );
81
+ fs::path from = projectDir / " ofApp/src/java/ cc/openframeworks/android " ;
82
+ fs::path to = projectDir / (" ofApp/src/java/ cc/openframeworks/android " );
83
83
84
84
try {
85
85
fs::create_directories (to.parent_path ());
@@ -88,8 +88,6 @@ bool androidProject::createProjectFile(){
88
88
ofLogError (LOG_NAME) << " Error renaming package directory: " << e.what ();
89
89
}
90
90
91
- findandreplaceInTexfile (to / " OFActivity.java" , " TEMPLATE_APP_NAME" , projectName);
92
-
93
91
ofLogNotice (LOG_NAME) << " Android Project created successfully!" ;
94
92
return true ;
95
93
}
0 commit comments