PLocalSim
PLocalSim copied to clipboard
Mac build: ./resCompiler : Unable to detect PebbleSDK, make sure it is in your PATH!
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)
I have this issue too. It is in PATH, I do pebble new-project x
fine, for instance.
Still have error, even with konsumer's modification, though.
use $HOME instead of ~ in your path
Unfortunately, that made no difference.
Getting this as well, even with the change to $HOME
I've added following line under sys.path.append(sdk_tools_path)
sys.path.append('/Users/yourusername/pebble-dev/PebbleSDK-2.0.2/Pebble/tools')
and deactivated import bitmapgen (-> caused the same error) to
# import bitmapgen
then it worked fine on my Mac (OSX 10.9.2)
@funclass what file are you editing? If I comment bitmapgen in resCompiler I get:
NameError: global name 'bitmapgen' is not defined
(OSX 10.9.3)
Got the same error by using Templates that need bitmapgen. A simple watchface without using bitmapgen works fine. Unfortunately I haven`t got any ideas to solve this problem.
The SDK2 uses a virtual environment provided by virtualenv located in "PebbleSDK/.env", by running "source PebbleSDK/.env/bin/activate" and "deactivate" in the way you see in https://github.com/Helco/PebbleLocalSim/blob/master/build/linux/build/bin/build.local.sh#L51 for Linux, the python resource compiler should be able to load the additional python packages for the bitmap generation. Unfortunately I don't have a possibility to test this out, but please share your experience if this works :)