Skip to content

Commit bcf0dc5

Browse files
authored
Android Template Fixes (#627)
v0.97.0
1 parent de7683b commit bcf0dc5

File tree

2 files changed

+6
-8
lines changed

2 files changed

+6
-8
lines changed

commandLine/src/defines.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
2-
#define OFPROJECTGENERATOR_MINOR_VERSION "96"
2+
#define OFPROJECTGENERATOR_MINOR_VERSION "97"
33
#define OFPROJECTGENERATOR_PATCH_VERSION "0"
44

55
#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)

commandLine/src/projects/android.cpp

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ bool androidProject::createProjectFile(){
5353
// Copy the `src/` folder from the template
5454
try {
5555
fs::copy(
56-
templatePath / "ofApp" / "src",
57-
projectDir / "ofApp" / "src",
56+
templatePath / "ofApp",
57+
projectDir / "ofApp",
5858
fs::copy_options::recursive | (bOverwrite ? fs::copy_options::overwrite_existing : fs::copy_options::update_existing)
5959
);
6060
} catch (fs::filesystem_error & e) {
@@ -63,7 +63,7 @@ bool androidProject::createProjectFile(){
6363
}
6464

6565
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);
6767
} catch (fs::filesystem_error & e) {
6868
ofLogError(LOG_NAME) << "Error copying res folder: " << e.what();
6969
}
@@ -78,8 +78,8 @@ bool androidProject::createProjectFile(){
7878
}
7979

8080
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");
8383

8484
try {
8585
fs::create_directories(to.parent_path());
@@ -88,8 +88,6 @@ bool androidProject::createProjectFile(){
8888
ofLogError(LOG_NAME) << "Error renaming package directory: " << e.what();
8989
}
9090

91-
findandreplaceInTexfile(to / "OFActivity.java", "TEMPLATE_APP_NAME", projectName);
92-
9391
ofLogNotice(LOG_NAME) << "Android Project created successfully!";
9492
return true;
9593
}

0 commit comments

Comments
 (0)