Skip to content

Mac build: ./resCompiler : Unable to detect PebbleSDK, make sure it is in your PATH! #24

@konsumer

Description

@konsumer

I could not get it to detect my SDK path, so I modified resCompiler to look like this, which I think is maybe closer to the intent of that code:

from distutils.spawn import find_executable

try:
    # locate PebbleSDK so we can profit from their code :)
    path=os.path.dirname(find_executable('pebble'))
    sdk_tools_path = os.path.join(path, '..', 'Pebble', 'tools')
    if os.path.exists(os.path.join(sdk_tools_path, 'bitmapgen.py')):
        sys.path.append(sdk_tools_path)
    import bitmapgen # safest way to convert bitmap resources..
except ImportError as e:
    logging.basicConfig(format='[%(levelname)-8s] %(message)s', level=logging.INFO)
    logging.fatal('Unable to detect PebbleSDK, make sure it is in your PATH!')
    sys.exit(1)

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions