openframeworks / openframeworks/projectGenerator
Templates for multiple targets
Nobody has claimed this yet.
- Dominant language
- CSS
- Stars
- 90
- Forks
- 79
- Avg merge
- 2d 9h
- Merged PRs (30d)
- 5
Description
I'm doing a bunch of android apps these days (as you might be able to see on the PR's), and i've started now to use the PG to generate projects both for xcode and android at the same time. Super userfull since i then easily can prototype in xcode, and then do the more slow compiling for android when i know stuff works as i want it to do.
That means of course i got a lot of #ifdef TARGET_ANDROID, but the thing i want to mention as an issue is when I add the two targets, i then have to modify the ofApp.h file to something like this:
#pragma once
#include "ofMain.h"
#ifdef TARGET_ANDROID
#include "ofxAndroid.h"
class ofApp : public ofxAndroidApp {
#else
class ofApp : public ofBaseApp {
#endif
public:
void setup();
void update();
void draw();
void keyPressed(int key);
void keyReleased(int key);
void windowResized(int w, int h);
#ifdef TARGET_ANDROID
void touchDown(int x, int y, int id);
void touchMoved(int x, int y, int id);
void touchUp(int x, int y, int id);
void touchDoubleTap(int x, int y, int id);
void touchCancelled(int x, int y, int id);
void swipe(ofxAndroidSwipeDir swipeDir, int id);
void pause();
void stop();
void resume();
void reloadTextures();
bool backPressed();
void okPressed();
void cancelPressed();
#endif
};
I don't know if this is a PG task or oF design question, but could this design be simplified for easier multi platoform (mobile) projects?
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the generated ofApp.h and the projectGenerator's handling of Android and Xcode targets. Clarify whether the change belongs in project templates or openFrameworks design, then define acceptance criteria for generating both targets without manual platform conditionals; the issue currently provides no specific files or tests to verify.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- android, cpp
- Domain
- mobile, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 25/100