From d9fdbc7279bc12d8590ea1cee056c48fab125691 Mon Sep 17 00:00:00 2001 From: giuliof Date: Wed, 29 Dec 2021 22:15:53 +0100 Subject: [PATCH] Readme more readable, added virtualenv explanation. --- .gitignore | 3 ++- README.md | 27 +++++++++++++++++++-------- launch.sh | 10 ++++++++++ 3 files changed, 31 insertions(+), 9 deletions(-) create mode 100755 launch.sh diff --git a/.gitignore b/.gitignore index ce33b515..234bb2a9 100644 --- a/.gitignore +++ b/.gitignore @@ -1,4 +1,5 @@ *.pyc .idea/ tests/tmp/ -build/ \ No newline at end of file +build/ +venv/ diff --git a/README.md b/README.md index 094eb7b5..776022cf 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,13 @@ -FlatCAM BETA (c) 2019 - by Marius Stanciu +# FlatCAM BETA (c) 2019 - by Marius Stanciu + Based on FlatCAM: 2D Computer-Aided PCB Manufacturing by (c) 2014-2016 Juan Pablo Caram -===================================================================== FlatCAM is a program for preparing CNC jobs for making PCBs on a CNC router. Among other things, it can take a Gerber file generated by your favorite PCB CAD program, and create G-Code for Isolation routing. -===================================================================== - --------------------------- Installation instructions ---------------- +## Installation instructions Works with Python version 3.5 or greater and PyQt5. More on the YouTube channel: https://www.youtube.com/playlist?list=PLVvP2SYRpx-AQgNlfoxw93tXUXon7G94_ @@ -21,7 +19,20 @@ Menu -> Help -> About FlatCAM -> Programmers -> Marius Stanciu - Download sources from: https://bitbucket.org/jpcgt/flatcam/downloads/ - Unzip them on a HDD location that your user has permissions for. -1.Windows +### Linux Virtual Env + +1. Clone this repository. +2. Install these packages from your distro's repository. +On Ubuntu: +`sudo apt install libfreetype6 libfreetype6-dev libgeos-dev libpng-dev libspatialindex-dev qt5-style-plugins python3-dev python3-gdal python3-pip python3-pyqt5 python3-pyqt5.qtopengl python3-simplejson python3-tk python3-virtualenv` +3. Create python virtual environment in repo's folder and activate it. +`virtualenv venv` +`source venv/bin/activate` +4. Install python requirements. +`pip3 install -r requirements.txt` +5. Now, FlatCAM can be launched with `launch.sh`. + +#### Windows - download the provided installer (for your OS flavor 64bit or 32bit) from: https://bitbucket.org/jpcgt/flatcam/downloads/ @@ -61,7 +72,7 @@ Run FlatCAM beta from the installation folder (e.g D:\FlatCAM_beta) in the Comma cd D:\FlatCAM_beta python FlatCAM.py -2.Linux +#### Linux - make sure that Python 3.8 is installed on your OS and that the command: python3 -V confirm it - verify that the pip package is installed for your Python installation (e.g 3.8) by running the command: @@ -96,7 +107,7 @@ make install sudo make install ``` -3.MacOS +#### MacOS Instructions from here: https://gist.github.com/natevw/3e6fc929aff358b38c0a#gistcomment-3111878 diff --git a/launch.sh b/launch.sh new file mode 100755 index 00000000..410dc67c --- /dev/null +++ b/launch.sh @@ -0,0 +1,10 @@ +#!/bin/bash + +cwd=$(dirname "$0") +args=$* + +source "$cwd/venv/bin/activate" + +python "$cwd/FlatCAM.py" "$args" + +deactivate