Skip to content
Open
28 changes: 21 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,18 +29,34 @@ Other firmware development links
* [Unstructured firmware development notes](https://github.com/makerbot/Toolchain-Release/wiki/Unstructured-firmware-development-notes)

### Ubuntu setup
* Install some basic utilities

#### Toolpath Quick Setup

If only building toolpath:
```bash
sudo apt update
sudo apt install -y build-essential cmake git ninja-build libboost-dev-all libyajl-dev python2.7 npm
```
The update script still requires python2:
```bash
python3 -m pip install -U pip
python3 -m pip install jsonschema dohq-artifactory wheel
```
The build can be invoked with
```bash
python3 update-repos.py -t=toolpather
python3 build-repos.py
```

#### Firmware
If you are building firmware

```bash
sudo apt-get install build-essential cmake-curses-gui
sudo apt-get install git python python-setuptools python-software-properties python-pip
sudo apt-get install openssh-server lsb-release devscripts cdbs debhelper libudev-dev libjpeg-dev genext2fs libusb-1.0-0-dev
```

* If you are using Ubuntu Precise (12.04), get a new computer

* If you are using Ubuntu Xenial (16.04):
Comment thread
scottsha marked this conversation as resolved.

Manually install Python3.4:
```bash
mkdir python-build && cd python-build
Expand All @@ -58,8 +74,6 @@ sudo apt-get update
sudo apt-get install python3.4 python3.4-dev python3-pip
```

If you are going to build firmware:

* Install 32-bit libc:

```bash
Expand Down
12 changes: 10 additions & 2 deletions build_tools/platforms.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@
UBU_1610_32 = 'Ubuntu_1610_32'
UBU_1610_64 = 'Ubuntu_1610_64'
UBU_1804_64 = 'Ubuntu_1804_64'
UBU_2204_64 = 'Ubuntu_2204_64'
UBU_2304_64 = 'Ubuntu_2304_64'
Comment thread
scottsha marked this conversation as resolved.

FED_20_32 = 'Fedora_20_32'
FED_20_64 = 'Fedora_20_64'
Expand All @@ -56,6 +58,8 @@
UBU_1510_64,
UBU_1604_64,
UBU_1804_64,
UBU_2204_64,
UBU_2304_64,
FED_20_32,
FED_20_64,
FED_21_32,
Expand Down Expand Up @@ -106,8 +110,12 @@ def find_platform(Win32=False):
# TODO(ted): why msvc 12?
platform_string = 'Windows_MSVC14_' + bitness
elif utils.is_linux:
(distro, version, codename) = platform.linux_distribution()
platform_string = distro + "_"
try:
(distro_str, version, codename) = platform.linux_distribution()
except AttributeError:
from distro import linux_distribution
(distro_str, version, codename) = linux_distribution()
platform_string = distro_str + "_"
platform_string += str.replace(version, '.', '') + "_"
platform_string += bitness
else:
Expand Down
3 changes: 2 additions & 1 deletion cmake-tools/MBCMakeToolsConfig.cmake
Original file line number Diff line number Diff line change
@@ -1,14 +1,15 @@
# This is the top-level package Config file for MakerBot
# cmake tools

cmake_minimum_required(VERSION 3.1)
cmake_minimum_required(VERSION 3.3)
Comment thread
scottsha marked this conversation as resolved.
Outdated

# Policies
# Any Policy introduced in 3.1 or earlier will be set to NEW by the
# cmake_minimum_required call above. For Policies introduced later
# we manually set them so that the build system devs can use them.
# I'm not setting all of them, because some don't seem to have any
# bearing on us.
cmake_policy(SET CMP0057 NEW)
Comment thread
scottsha marked this conversation as resolved.
Outdated
if(${CMAKE_MAJOR_VERSION} EQUAL 3 AND ${CMAKE_MINOR_VERSION} GREATER 1)
# strict break()
cmake_policy(SET CMP0055 NEW)
Expand Down
12 changes: 6 additions & 6 deletions cmake-tools/python34.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ macro(add_python34)
set(PYTHON_INCLUDE_DIR
"${CMAKE_INSTALL_PREFIX}/${HEADER_INSTALL_DIR}/python3.4m"
CACHE INTERNAL "")
find_package(PythonLibs 3.4 EXACT REQUIRED)
find_package(PythonLibs REQUIRED)
set(PYTHON_DEV_HOME
"${CMAKE_INSTALL_PREFIX}/${RESOURCE_INSTALL_DIR}/python34")
elseif(${CMAKE_SYSTEM_NAME} MATCHES "Darwin")
Expand All @@ -106,19 +106,19 @@ macro(add_python34)
set(PYTHON_INCLUDE_DIR
"${CMAKE_INSTALL_PREFIX}/${HEADER_INSTALL_DIR}/python3.4m"
CACHE INTERNAL "")
find_package(PythonLibs 3.4 EXACT REQUIRED)
find_package(PythonLibs REQUIRED)
# This only works if LIB_INSTALL_DIR ends with /lib
set(PYTHON_DEV_HOME
"${CMAKE_INSTALL_PREFIX}/${LIB_INSTALL_DIR}/..")
else()
find_program(PYTHON34_EXECUTABLE python3.4)
find_program(PYTHON34_EXECUTABLE python)
# This fails on linux when we are not building a CXX project
if(CMAKE_CXX_COMPILER_LOADED)
find_package(PythonLibs 3.4 EXACT REQUIRED)
find_package(PythonLibs REQUIRED)
endif()
endif()
if(NOT PYTHON34_EXECUTABLE)
message(FATAL_ERROR "Python 3.4 not found")
message(STATUS "Python 3.4 not found")
endif()

# Store the basic command for calling python 34 in PYTHON34_COMMAND
Expand Down Expand Up @@ -323,7 +323,7 @@ function(build_wheel target_name)
RESULT_VARIABLE error)

if(${error})
message(FATAL_ERROR "Could not determine wheel name")
message(STATUS "Could not determine wheel name")
endif()

# So, we've been trying pretty hard to maintain that under cmake
Expand Down
6 changes: 3 additions & 3 deletions dev-tools/artifactory_clean_repo_diagnostic.py
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,9 @@
for repo in repos:
space_made = 0;
for plat in plats:
all = list(artifactory_utils.all(repo, platform=plat))
all = sorted(all, key=lambda art: art.stat().mtime)
old = [i for i in all if
all_artifacts_unsorted = list(artifactory_utils.all(repo, platform=plat))
Comment thread
scottsha marked this conversation as resolved.
all_artifacts = sorted(all_artifacts_unsorted, key=lambda art: art.stat().mtime)
old = [i for i in all_artifacts if
(datetime.today()-i.stat().mtime.replace(tzinfo=None)) > age_cutoff]

#for i in all:
Expand Down