Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion commandLine/src/defines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#define OFPROJECTGENERATOR_MAJOR_VERSION "0"
#define OFPROJECTGENERATOR_MINOR_VERSION "96"
#define OFPROJECTGENERATOR_MINOR_VERSION "97"
#define OFPROJECTGENERATOR_PATCH_VERSION "0"

#define PG_VERSION (OFPROJECTGENERATOR_MAJOR_VERSION "." OFPROJECTGENERATOR_MINOR_VERSION "." OFPROJECTGENERATOR_PATCH_VERSION)
Expand Down
12 changes: 5 additions & 7 deletions commandLine/src/projects/android.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@ bool androidProject::createProjectFile(){
// Copy the `src/` folder from the template
try {
fs::copy(
templatePath / "ofApp" / "src",
projectDir / "ofApp" / "src",
templatePath / "ofApp",
projectDir / "ofApp",
fs::copy_options::recursive | (bOverwrite ? fs::copy_options::overwrite_existing : fs::copy_options::update_existing)
);
} catch (fs::filesystem_error & e) {
Expand All @@ -63,7 +63,7 @@ bool androidProject::createProjectFile(){
}

try {
fs::copy(templatePath / "res", projectDir / "ofApp/res", fs::copy_options::recursive);
fs::copy(templatePath / "ofApp/src/res", projectDir / "ofApp/src/res", fs::copy_options::recursive);
} catch (fs::filesystem_error & e) {
ofLogError(LOG_NAME) << "Error copying res folder: " << e.what();
}
Expand All @@ -78,8 +78,8 @@ bool androidProject::createProjectFile(){
}

findandreplaceInTexfile(projectDir / "ofApp/res/values/strings.xml", "TEMPLATE_APP_NAME", projectName);
fs::path from = projectDir / "srcJava/cc/openframeworks/APP_NAME";
fs::path to = projectDir / ("srcJava/cc/openframeworks/" + projectName);
fs::path from = projectDir / "ofApp/src/java/cc/openframeworks/android";
fs::path to = projectDir / ("ofApp/src/java/cc/openframeworks/android");

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

findandreplaceInTexfile(to / "OFActivity.java", "TEMPLATE_APP_NAME", projectName);

ofLogNotice(LOG_NAME) << "Android Project created successfully!";
return true;
}