Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save thomasstoeckert/98567adaca27de20d4487d989a4ac5b0 to your computer and use it in GitHub Desktop.
Save thomasstoeckert/98567adaca27de20d4487d989a4ac5b0 to your computer and use it in GitHub Desktop.
Thomas Stoeckert
Thomas Stoeckert
WSL pebble building
Windows 10 Version 1709
First, enable WSL:
- In the control panel, search for "Turn Windows features on or off"
- Check "Windows Subsystem for Linux"
- PC will restart
- Open the Microsoft Store and install a linux distro, Unbuntu is reccomended. Multiple may be installed at once.
- Once the Store downloads the distro, open it and follow setup instructions
(This is required to display emulators and configuration pages)
Get VcXsrv for windows
- By default, it will not start with windows, but you can do this by adding a shortcut to it in your startup folder
- Your startup folder is located by going to %appdata% in the windows explorer, then Microsoft/Windows/Start Menu/Programs/Startup
- Copy VcXsrv's executable from C:/Program Files/VcXsrv, and in the startup folder, right click > Paste Shortcut
Update all apps/programs that WSL shipps with
- Run bash
| "sudo apt-get update && sudo apt-get -y upgrade"
Requirements for pebble to run
| "sudo apt-get install libsdl1.2debian libfdt1 libpixman-1-0 libfreetype6-dev python-pip python2.7-dev"
| "sudo apt-get install firefox" (To display configuration pages, also takes a while, so throw away your trash from the snack)
Install VirtualEnv
| "sudo pip install virtualenv"
Install NPM
| "sudo apt-get install npm"
| "sudo npm -g install npm"
Install Node (For JS compiling)
| "sudo npm install -g n"
| "sudo n stable"
Finally, time to install the pebble SDK
- To keep your wsl environment organized, I'd suggest creating a downloads folder.
| "mkdir downloads"
| "cd downloads"
- Time to download!
| "wget"
- Unzip into a folder for pebble tools
| "cd ../"
| "mkdir pebble-dev"
| "cd pebble-dev"
| "tar -jxf ~/downloads/pebble-sdk-4.5-linux64.tar.bz2"
- You now have a folder inside of "pebble-dev" with the name "pebble-sdk-4.5-linux64"
- Now we need to setup all the requirements with virtaulenv
| "cd ~/pebble-dev/pebble-sdk-4.5-linux64/"
| "virtualenv --no-site-packages .env"
| "source .env/bin/activate"
| "pip install -r requirements.txt" (It'll freeze at one point, but eventually it'll work itself out)
| "deactivate"
- Almost done here! Now we need to make sure `pebble` commands work. We can do this by changing the path that bash uses to find executables. To keep us from having to do this every time bash launches, we can edit a file called `.bashrc`, which is located in the home directory associated with your account.
| "cd ~/"
| "vim .bashrc" (Press 'i' to edit an open file in vim)
- Now you're able to type freely. Add the following lines to the bottom.
| export DISPLAY=:0
| export PATH=~/pebble-dev/pebble-sdk-4.5-linux64/bin:$PATH
- Press ESC to exit editing mode and type ":wq" to write the file and quit.
- Go ahead and close bash and open it back up again. You can make sure everything is OK and working by typing "pebble"
- For our final step, we need to install the latest version of the Pebble SDK.
| "pebble sdk install latest"
- As part of the setup, it's going to ask you if you want to send tracking information to pebble. Pebble is not a thing anymore, so decline.
And you're done! At this point you can follow any pebble guide, using the Pebble SDK option instead of Cloudpebble.
However, there's one issue. If you're making pebble projects in your Linux folders, you cannot edit them except using a text editor that's already in the linux subsystem, i.e. vim or nano. Instead, if you put them in a windows folder, such as in your documents folder, you can use VSCode or Notepad++ or any windows program to edit the files. To access a letter drive, such as the C drive, you must type
| "cd /mnt/[drive letter]"
From there, you can access the entire windows filesystem, and do whatever you like wherever.