openframeworks / openframeworks/openFrameworks

Update TargetPlatform Enum

Open
#3,485 6 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

core feature section-internals
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Description

Currently our ofTargetPlatformEnum is:

enum ofTargetPlatform{
    OF_TARGET_OSX,
    OF_TARGET_WINGCC,
    OF_TARGET_WINVS,
    OF_TARGET_IOS,
    OF_TARGET_ANDROID,
    OF_TARGET_LINUX,
    OF_TARGET_LINUX64,
    OF_TARGET_LINUXARMV6L, // arm v6 little endian
    OF_TARGET_LINUXARMV7L, // arm v7 little endian
    OF_TARGET_EMSCRIPTEN
};

For projects like Project Generator and ofSketch, it would be very useful to have a better differentiation for android, and 32/64 bit platforms. Proposed update:

enum ofTargetPlatform{
    OF_TARGET_OSX,   ///< 32 bit.
    OF_TARGET_OSX64,
    OF_TARGET_WINGCC, ///< 32 bit.
    OF_TARGET_WINGCC64,
    OF_TARGET_WINVS, ///< 32 bit.
    OF_TARGET_WINVS64,
    OF_TARGET_IOSARM64,
    OF_TARGET_IOSARMV7, ///< 32 bit.
    OF_TARGET_ANDROIDARMV5, ///< 32 bit.
    OF_TARGET_ANDROIDARMV7, ///< 32 bit.
    OF_TARGET_LINUX, ///< 32 bit.
    OF_TARGET_LINUX64,
    OF_TARGET_LINUXARMV6L, // arm v6 little endian ///< 32 bit.
    OF_TARGET_LINUXARMV7L, // arm v7 little endian ///< 32 bit.
    OF_TARGET_EMSCRIPTEN 
};

Alternatively it might be useful to break this down a bit:

enum ofTargetPlatform {
    OSX,
    WINGCC,
    WINVS,
    IOS,
    ANDROID,
    LINUX,
    EMSCRIPTEN
};

enum ofTargetArch {
    I386,
    X86_64,
    ARM5,
    ARM6,
    ARMV7,
    ARM64,
    NONE ///< Emscripten?
};

EDITED: to update w/ @danoli3's comments.

@danoli3 -- does that look right for IOS?
@arturoc What do you think?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing how the ofTargetPlatform enum is consumed by Project Generator and ofSketch, then compare the existing platform and architecture assumptions with the alternatives in the issue. Done means the project consistently represents the required Android and 32/64-bit distinctions, with all affected consumers updated; the issue names no specific files or tests.

Written by the indexing model from the issue text.

Assessment

Tech stack
cpp
Domain
build-system, operating-systems
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.