F-Engrave on OSX

I’m looking at doing some V-Carving and from other posts on this forum I found out about F-Engrave and wanted to give it a try; however I couldn’t find any instructions for installing it on Mac OSX so I wanted to write up how I got it to work. Hopefully someone finds it useful.

I did this on a MacBook Pro on El Capitan (10.11.1). I already had XCode and XQuartz installed but if you don’t you’ll need to grab it from the App Store to get the compiler and related developer header files. You’ll need a basic understanding of the OSX Terminal and how to execute commands. There are plenty of tutorials out there if you get stuck on a command.

  1. Install XCode from the Mac App Store to get the developer tools including the compilers.
  2. Download and instal XQuartz to get X11 support and associated header files and libraries. You may already have it installed if you have been using InkScape: https://xquartz.macosforge.org
  3. Launch a Terminal.
  4. Make a directory to hold the final F-Engrave files: mkdir ~/Applications/f-engrave
  5. Make a temporary directory to work in if you don’t already have one: mkdir ~/tmp
  6. Change to the temporary directory: cd ~/tmp
  7. Download the F-Engrave source from here F-Engrave
  8. Extract it to a temporary directory using unzip: unzip ~/Downloads/F-Engrave-1.52_src.zip
  9. Change to the extracted directory: cd F-Engrave-1.5.2_src
  10. Copy the F-Engrae Pythonfile to the final application directory:cp f-engrave-152.py ~/Applications/f-engrave`
  11. Change to the included tt2cxf source directory: cd TTF2CXF_STREAM
  12. Launch TextEdit and edit the Makefile in this directory to point to the proper freetype headers. Change the line g++ -o ttf2cxf_stream ttf2cxf_stream.cpp -lm -I/usr/include/freetype2 –lfreetype to g++ -o ttf2cxf_stream ttf2cxf_stream.cpp -lm -L/usr/X11/lib -I/usr/X11/include/freetype2 -lfreetype. You can also use vi in the Terminal if you’re comfortable with it: vi Makefile
  13. Run make to compile: make
  14. Copy the new binary to the final application directory: cp ttf2cxf_stream ~/Applications/f-engrave
  15. Change back to the temporary directory: cd ~/tmp
  16. Download the potrace binaries for OSX from here Potrace
  17. Extract it to a temporary directory using tar: tar –xzf ~/Downloads/potrace-1.13.mac-x86_64.tar.gz
  18. Copy the extracted binary to the final application directory: cp potrace-1.13.mac-x86_64/potrace ~/Applications/f-engrave
  19. Change to your final application directory: cd ~/Applications/f-engrave
  20. Update your PATH environment variable to include this directory so F-Engrave can find potrace and tt2cxf. You’ll need to do this every time you launch the Terminal or add the line to your ~/.bashrc: export PATH=$PATH:~/Applications/f-engrave
  21. Run F-Engrave using Python: python ./f-engrave-152.py

If all goes well you should now have a working copy of F-Engrave. If you don’t see any messages like “ttf2cxf_stream executable is not present/working…Bummer” then you’re good to go. If you do see a “Bummer” error, first check that the individual commands work by running ./tt2cxf_stream and ./potrace -v. If those two commands work, then it is probably just a problem with your PATH and F-Engrave can’t find the binaries. If those commands don’t work then it might be an executable permission issue or one of the steps above failed.

Once the application is running, you need to point it to some fonts. Apple has a good list of font locations here https://support.apple.com/en-us/HT201722. I found that most of my fonts are in /Library/Fonts and ~/Library/Fonts. You’ll need to select one of these directories by going to Settings->General Settings->Font Directory in F-Engrave.

Happy V-Carving!

-mike

Edit 11/24: Added steps to install XCode and XQuartz.

2 Likes

This looks great but I’m fairly new to OSX. Can someone translate the narrative directions above to the actual keystrokes?
Thanks,
Bill

@Bill I updated the instructions with a little more detail. It would be good to get confirmation from someone else that they work but hopefully it is enough detail to get you started.

-mike

Thanks for this tip! I am going to try this.
I have been copying / converting my fonts into F-Engrave’s local font directory. Hopefully your tip will save me this extra step!

I get

ttf2cxf_stream.cpp:51:10: fatal error: ‘ft2build.h’ file not found

when I try to make the ttf2cxf_stream executable by typing make while in the TTF2CXF_STREAM directory.

Can you run ls /usr/X11/include/freetype2/ and post the output? Also run cat Makefile in the TTF2CXF_STREAM and post the output.

Stand by… turns out I have an older version of XCode, and it’s going to take a while to install the new one.

Mike, thanks for the extra work. At Step 9, I get an error saying that no such file or directory exists. I don’t see where I would have created it, so am wondering if I needed to have another software package installed.

Ok, so as it turned out I had not only an outdated version of XCode but also an outdated version of X11 as well. After updating both of those, following your instructions and re-building the executables, I’ve ended up with a folder in my Applications called f-engrave with three files in it:

f-engrave-152.py
potrace
ttf2cxf_stream

When I run f-engrave, it opens fine but I get the bummer messages for both potrace and ttf2cxf_stream. When I launch either on their own, they seem to run fine.

I didn’t have or couldn’t find a .bashrc file, so I created one in my home folder with that line in it. I also added that line to my .bash_profile just in case.

Still no love.

Ok, this is why I love having a Linux expert in my house.

I had to run this line:

sudo install -m 755 EXECUTABLE /usr/local/bin

for both executables, from their originating folders.
So, for ttf2cxf_stream, I did

cd ~/tmp/F-Engrave-1.52_src/TTF2CXF_STREAM

then

sudo install -m 755 ttf2cxf_stream /usr/local/bin

and for potrace:

cd ~/tmp/potrace

then

sudo install -m 755 potrace /usr/local/bin

After that, F-Engrave worked like a charm!

@mike Glad you got it working. It sounds like it was an issue with your PATH. In theory you don’t need to install the binaries into /usr/local/bin if you update your PATH environment variable to include the f-engrave directory but it doesn’t hurt. Good point about X11. I assumed the headers came from the Xcode install but you’re probably right that people have to install XQuartz. I already had it installed because I use InkScape but I’ll have to update the instructions.

@Bill Make sure you’re following the steps in order. The TTF2CXF_STREAM directory should be inside the F-Engrave-1.5.2_src directory that was created when you did the unzip in step 6 and then changed into that directory in step 7. You can run ls to get a directory listing and see what files and directories are available or pwd to display the current working directory.

Or just download :smiley: => http://www.motions-media.de/download/f-engrave-fuer-mac/
unzip and execute ./run-f-engrave.sh in Terminal inside the extracted folder :smirk:

Update 21. Feb 2016: new version 1.57 of f-engrave is now included in the download zip file => http://www.motions-media.de/download/f-engrave-fuer-mac-v1-57

But where’s the adventure in that?! :smile:

Thanks, I appreciate the help.

Thank you for the super detailed write up!

After following all the instructions and running into no errors I was hoping I would be fine. I changed most things to 1.54 as that is the latest build of f-engrave. Nothing has been moved from downloads to applications however and when I try to open the .py file after unpacking the .zip it opens in x-code but no program actually runs just a text box with version updates ect…

any thoughts on where I went wrong?

Terminal Saved Output (3.1 KB)

Youhad lots of typo’s between 1.54 and 1.52 which was very confusing…
Anyway, try what you did over and but do not type any tick ` marks (the key to left of 1).
You basically got stuck in bash shell on line 38 of your terminal output.
FYI tab complete will auto complete file names and make the typo’s less as well.

As @JeremyJohnstone said, you have an unmatched quote at the end of line 38 which put you into a multi-line command mode in bash. That’s why you got a ‘>’ prompt on each line rather than your normal ‘YourMomsMacbook:’ prompt. Run through the process again but watch your quotes.

I got F-engrave working with Wine. But is there a way to export g-code from F-engrave that works on Easel?
Thanks in advanced

I’ve used ChiliPepper with success (http://chilipeppr.com) but I don’t think Easel had the g-code import option at the time. You could probably start a new thread with your g-code attached if you’re seeing odd behavior in Easel.

-mike

There is no need to run F-Engrave in WINE.
The program runs in Windows, MacOS X, and Linux.
Maybe you have some strange exception which is why you are running it in WINE.
There are several methods to send the g-code:

  1. Easel - Turn off Arc fitting inside F-Engrave first
  2. ChiliPeppr
  3. UGS (Universal G-Code Sender)