Skip to content

projectGenerator ideas #291

Open
Open

Description

@dimitre

In the last days I took some time to write a fork of xcodeProj.cpp to use a different method than pugi::xml

Reading carefully the actual code I've noticed some things that can be improved.

  • Poco::UUID can be used to generate UUID
  • OTHER_CPLUSPLUSFLAGS - there is something strange there. the template only has one parameter which is -D__MACOSX_CORE__ but if you use in your addon CPPFlags it adds to the template the following parameters: --D__MACOSX_CORE__, -mtune=native, -Wreturn-type, -Werror=return-type. we can remove them here or add to the template.
  • local_addons folder can be removed when not used. OR better yet: created by demand.
  • addons.make should not be rewritten as it is now. - projectGenerator CLI : addons.make file is altered and addons are removed if not found #258
  • PG Doesn't overwrite info.plist if it already exist @2bbb

Done

  • findArrayForUUID can be replaced. it tries to find UUID of the parent by looking for some children UUID. As everything is already set in emptyExample.pbxproj we can just have the parent UUIDs and not worring about traversing XML
  • emptyExample.pbxproj I'm proposing all the general settings (appliable to Release, Debug and AppStore) can be moved to Project.xcconfig, so we have them in a more readable way, and the template gets smaller.
  • SOURCE_ROOT is a variable used as a template placeholder to be replaced, but in some parts of the code it goes untouched to the final pbxproj
  • void xcodeProject::saveWorkspaceXML is unused and can be removed
  • migrating more settings from pbxproj to here openFrameworks#6937
  • Avoid renameProject being called twice #289
  • change templatesFolder hardcoded to a variable #290

Activity

  1. changed the title [-]projectGenerator overall[/-] [+]projectGenerator ideas[/+] on Apr 13, 2022
  2. 2bbb commented on Apr 17, 2022

    @2bbb
    Contributor

    I think If PG get feature what PG doesn't overwrite Info.plist if it exists, it's so great when develop iOS. (e.g. for usage description)

  3. dimitre commented on Apr 17, 2022

    @dimitre
    MemberAuthor

    @2bbb it can be done like this:

    		if (!ofFile::doesFileExist(ofFilePath::join(projectDir, "openFrameworks-Info.plist"))) {

    but maybe as an optional parameter of projectGenerator because sometimes info.plist get updated with most modern settings and it is desirable to be overwritten.
    it would be great to be able to have custom plist settings per project that got appended in info.plist when project is generated :)

  4. dimitre commented on Apr 20, 2022

    @dimitre
    MemberAuthor

    ProjectGenerator template has Release Debug and AppStore xcschemes files, but only make copies of the Debug and Release. Should we copy AppStore too or it is a leftover?

    void xcodeProject::saveScheme()
  5. dimitre commented on May 7, 2022

    @dimitre
    MemberAuthor

    @2bbb I like a lot the idea of keeping some info untouched by project generator.
    In fact it would be GREAT to have a recipe to build the project, something similar to platformio which have a separate platformio.ini to serve as a recipe to build everything.

    something like this sketch:

    ; OpenFrameworks Project Configuration File
    ;
    ; Please visit documentation for the other options and examples
    
    [software]
    name = EmptyExample
    version = 0.76
    
    [signing]
    bundleidentifier = EmptyExample
    team = 
    
    [env:*]
    platforms = ios xcode make linux
    template = gl4.0
    
    ; modular building in the future
    libs = cairo boost fmod freeimage
    ; libs = Cairo Audio 
    
    addons = 
        ofxNetwork
        ofxAssimpModelLoader
        https://github.com/hiroyuki/ofxArtnet@e51e9bf8c42ee67f5eab04d123a96cc641c905ea
        https://github.com/danomatika/ofxMidi
        https://github.com/leadedge/ofxNDI
    
  6. 2bbb commented on Apr 6, 2023

    @2bbb
    Contributor

    sometime I put addons under directory related to project like local_addons on apps/PROJECT/local_addons or apps/myApps/PROJECT/local_addons.
    then, addon can't get dependencies.

    can we make addon search pathes or similar concept?
    e.g.
    ADDON_SEARCH_PATHES = 'addons' '../local_addons' './local_addons'

  7. dimitre commented on Apr 6, 2023

    @dimitre
    MemberAuthor

    It is super useful. for team work or project archival.
    I think PG is so outdated that lots of things needs a rewrite.

  8. dimitre commented on Oct 6, 2023

    @dimitre
    MemberAuthor

    I've made this tool a while ago to get reproduceable projectGenerator settings
    https://github.com/dimitre/ofbuild

    it uses a file of.yml in project folder to act as a guide
    usage example:

    name: Empty
    
    ofpath: ../../..
    
    addons:
    - ofxTools
    - ofxMicroUI
    - ofxScenes
    - ofxSvg
    # - ofxAssimpModelLoader
    # - ofxMidi
    # - ofxMicroUIMidiController
    - ofxVoronoi
    - ofxSyphon
    
    platforms: ["osx", "vscode"]
    # templates: ["vscode"]
    
    sources:
    # - /Users/d/Desktop/WERK2023/OF/OFLocal/src
    # - src2
    
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions