Project

General

Profile

LAOS CUPS driver OSX » History » Version 1

m.winkler, 2012-11-19 19:37

1 1 m.winkler
h1. LAOS CUPS driver installation under Mac OSX 10.7 
2
3
h2. Before you start 
4
5
h3. Requirements :
6
7
You will need Apples Xcode + Apple's Command Line Developer Tools
8
9
read http://www.macports.org/install.php, that should provide you with all you need
10
11
h3. Environment:
12
13
If you have macports or homebrew installed make shure your PATH variable lists
14
15
/usr/bin /bin /usr/sbin /sbin before any other bin or sbin directories
16
17
example macports
18
19
     $ echo $PATH
20
     /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/user/bin/:/Users/user/bin/
21
22
     $ export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/user/bin/:/Users/user/bin/"
23
24
25
if you want to check against which librarys your programm has been linked use
26
27
     $ otool -L <binary>
28
29
make shure that you don't link against /opt/local/lib, this is a macports library path and shouldn't be used if you want to 
30
have a native OSX installation
31
32
if you run in problems with the linking use 
33
34
     $ LDFLAGS="-L/usr/lib" ./configure
35
36
that will force the linker to search /usr/lib first.
37
38
 
39
h2. Now we can start installing
40
41
h3. ghostscript
42
43
read first http://www.ghostscript.com/doc/9.06/Make.htm#Mac_build
44
45
     $ wget http://downloads.ghostscript.com/public/ghostscript-9.06.tar.gz
46
     $ tar -xvzf ghostscript-9.06.tar.gz
47
     $ cd ghostscript-9.06
48
     $ ./configure
49
     $ make
50
     $ sudo make install 
51
52
53
h3. GraphicsMagick
54
55
This is work in progress, pstoedit uses Magick++ so i compiled it but stripped almost everything to have a clean compile without installing 
56
further dependencies, need to have a look in pstoedit/src/drvlaos.cpp to see what is actually used for image manipulation
57
58
59
     $ wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.17.tar.gz
60
     $ tar -xvzf GraphicsMagick-1.3.17.tar.gz
61
     $ cd GraphicsMagick-1.3.17/
62
     $ ./configure --disable-openmp --without-bzlib --without-jbig --without-jpeg --without-jp2 --without-lcms --without-lcms2 --without-lzma --without-png --without-tiff --without-trio --without-ttf --without-wmf --without-xml --without-zlib --without-x --without-png 
63
     $ make 
64
     $ sudo make install
65
66
67
pstoedit will look for Magick++-config instead of GraphicsMagick++-config
68
so we create a link to cover this 
69
70
     $ sudo ln -s /usr/local/bin/GraphicsMagick++-config /usr/local/bin/Magick++-config
71
72
73
h3. tftp-hpa
74
75
the OSX tftp client doesn't work with cups-laos, install the extended version
76
77
     $ wget http://www.kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-5.2.tar.gz
78
     $ tar -xvzf tftp-hpa-5.2.tar.gz
79
     $ cd tftp-hpa-5.2
80
     $ ./configure --without-ipv6
81
     
82
     backup the original, and install tftp-hpa
83
     $ sudo cp /usr/bin/tftp /usr/bin/tftp.orig
84
     $ cp tftp/tftp /usr/bin/tftp
85
86
 
87
88
h3. pstoedit
89
90
after gostscript and GraphicsMagick is installed pstoedit will compile
91
92
     $ git clone -b laos https://github.com/LaosLaser/pstoedit.git
93
     $ cd pstoedit
94
     $ ./configure
95
     $ make
96
     $ sudo make install
97
98
h3. cups-laos cups backend + ppd
99
100
     $ git clone https://github.com/LaosLaser/Software
101
     $ cd Softwate/cups-laos/src
102
     $ make
103
     
104
     $ sudo cp cups-laos /usr/libexec/cups/backend/
105
     $ sudo chmod 755 /usr/libexec/cups/backend/cups-laos   
106
107
read https://developer.apple.com/library/mac/#documentation/Printing/Conceptual/UsingPPDFiles/ppd_tasks/ppd_tasks.html  section "Installing PPD Files" 
108
     
109
     $ sudo mkdir /Library/Printers/PPDs/Contents/Resources/en.lproj
110
     $ sudo cp CUPS-LAOS.ppd /Library/Printers/PPDs/Contents/Resources/en.lproj
111
     $ sudo chmod 755 /Library/Printers/PPDs/Contents/Resources/en.lproj/CUPS-LAOS.ppd
112
113
     
114
h4. Install the laser cutter under CUPS 
115
116
117
now you can add a printer/laser cutter eader trough http://localhost:631 
118
or OSX System Preferences -> Printer -> + -> cups-laos
119
120
Bug: Connection is allways "cups-laos://127.0.0.1:69/laos" and can only be changed 
121
by editing the cups backend in Software/cups-laos/src/Config.cpp line 20 
122
than recompile, copy the new backend to /usr/libexec/cups/backend/ and reinstall
123
the printer/laser cutter in cups admin interface