VAGRANT: Updates to vagrant and builder

This commit is contained in:
Buzz 2017-07-30 12:35:04 +10:00 committed by Matt
parent 63a642f3eb
commit 40067615f1
5 changed files with 51 additions and 5 deletions

View File

@ -29,6 +29,13 @@ To build with tup, simply invoke it at the root of the project directory:
$ tup
# to build inside vagrant:
cd OpenSolo/artoo
vagrant up
vagrant ssh
cd /vagrant
tup
### dev environment
I'm primarily using Qt Creator (https://qt-project.org/downloads) for editing, which is tracked in the following project files: artoo.{config, creator, files, includes}

View File

@ -85,7 +85,7 @@ CPPSRCS := src/*.cpp src/stm32/*.cpp
# generate version string as well via tup trickery
# we pass source to GCC via stdin, then add the object file to our list of .o's to link
GIT_TAG := vers=`git describe --tags`
GIT_TAG := vers=`./git_describe_tag`
VERSION_SRC := "#include \"src/version.h\"\nconst char* Version::str() {return \"$vers\";}"
COMPILE_VERSION := $(GIT_TAG); echo $(VERSION_SRC) | $(CXX) $(CXXFLAGS) $(CPPFLAGS) $(ARCH_FLAGS) -x c++ -c - -o $(OBJDIR)/version.o

5
artoo/git_describe_tag Executable file
View File

@ -0,0 +1,5 @@
#!/bin/bash
# this command should really execute:
#git describe --tags
# but we don't have any version tags in the repo yet, so lets fake it:
echo v0.0.1

View File

@ -12,3 +12,14 @@ by default, PIL just uses the first, and doesn't provide a way to specify which
http://fondu.sourceforge.net/ is a tool that extracts each of them into individual .ttf files (install on OS X via `brew install fondu`).
This was used to generate HelveticaNeueMedium.ttf from HelveticaNeue.dfont
Alternatively, 'Roboto' is an Apache Licensed Free Font by google that can be gotten from here:
https://material.io/guidelines/resources/roboto-noto-fonts.html
( wget https://storage.googleapis.com/material-design/publish/material_v_11/assets/0B0J8hsRkk91LRjU4U1NSeXdjd1U/RobotoTTF.zip
and we might be able to get away with using these instead of helveticaNeue?
Roboto-Regular arrives in the zip as a .ttf, converting it to .otf is easy with any online tool for this, eg: https://everythingfonts.com/ttf-to-otf
finally, to use Roboto where the system is expecting helvetica we'll do this:
cp Roboto-Regular.otf HelveticaNeueLTPro-Lt.otf
cp Roboto-Regular.otf HelveticaNeueLTPro-Roman.otf
cp Roboto-Regular.otf HelveticaNeueMedium.ttf
cp Roboto-Regular.otf Copenhagen_Light.otf

View File

@ -1,11 +1,34 @@
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6AF0E1940624A220
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 6D1D8367A3421AFB
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5BB92C09DB82666C
apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main' -y
add-apt-repository 'ppa:terry.guo/gcc-arm-embedded' -y
# fix broken urllib3 or some ssl stuff diesn't work
sudo apt-get install -y --force-yes python-pip
sudo pip install urllib3[secure]
apt-get -qq --assume-yes update
apt-get -qq --assume-yes install tup freetype* python-pip python-dev gcc-arm-none-eabi git
# fix broken python2.7.x by moving it forward to something newer than 2.7.8:
sudo add-apt-repository -y ppa:fkrull/deadsnakes-python2.7
sudo apt-get -y --force-yes update
sudo apt-get install -y --force-yes python2.7 python2.7-dev
## get deps for pillow, and note that we get Pillow from easy_install instead of 'pip' or apt-get becuase this method actually works.
#sudo apt-get install -y python-dev python-setuptools
sudo apt-get install -y --force-yes libtiff4-dev libjpeg8-dev zlib1g-dev libfreetype6-dev liblcms2-dev libwebp-dev tcl8.5-dev tk8.5-dev python-tk
sudo easy_install Pillow
sudo apt-add-repository 'deb http://ppa.launchpad.net/anatol/tup/ubuntu precise main' -y
sudo add-apt-repository 'ppa:terry.guo/gcc-arm-embedded' -y
sudo apt-get --assume-yes update
sudo apt-get --assume-yes install tup freetype* python-pip python-dev gcc-arm-none-eabi git
sudo pip install --upgrade pip
sudo pip install pillow
echo ""
echo To build the artoo stm32 binary enter the VM with:
echo vagrant ssh
echo Then type this:
echo cd /vagrant
echo tup