Project

General

Profile

LAOS CUPS driver OSX » History » Version 5

m.winkler, 2012-11-19 20:01

1 1 m.winkler
h1. LAOS CUPS driver installation under Mac OSX 10.7 
2
3 2 m.winkler
{{>toc}}
4
5 1 m.winkler
h2. Before you start 
6
7
h3. Requirements :
8
9
You will need Apples Xcode + Apple's Command Line Developer Tools
10
11
read http://www.macports.org/install.php, that should provide you with all you need
12
13
h3. Environment:
14
15
If you have macports or homebrew installed make shure your PATH variable lists
16
17
/usr/bin /bin /usr/sbin /sbin before any other bin or sbin directories
18
19
example macports
20
21
     $ echo $PATH
22
     /opt/local/bin:/opt/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/user/bin/:/Users/user/bin/
23 3 m.winkler
$ export PATH="/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin:/Users/user/bin/:/Users/user/bin/"
24 1 m.winkler
25
26 5 m.winkler
if you want to check against which libraries your programm has been linked use
27 1 m.winkler
28
     $ otool -L <binary>
29
30
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 
31
have a native OSX installation
32
33
if you run in problems with the linking use 
34
35
     $ LDFLAGS="-L/usr/lib" ./configure
36
37
that will force the linker to search /usr/lib first.
38
39
 
40 3 m.winkler
h2. Installation of dependencies and laos-cups 
41 1 m.winkler
42
h3. ghostscript
43
44
read first http://www.ghostscript.com/doc/9.06/Make.htm#Mac_build
45
46
     $ wget http://downloads.ghostscript.com/public/ghostscript-9.06.tar.gz
47 3 m.winkler
$ tar -xvzf ghostscript-9.06.tar.gz
48
$ cd ghostscript-9.06
49
$ ./configure
50
$ make
51
$ sudo make install 
52 1 m.winkler
53
54
h3. GraphicsMagick
55
56
This is work in progress, pstoedit uses Magick++ so i compiled it but stripped almost everything to have a clean compile without installing 
57
further dependencies, need to have a look in pstoedit/src/drvlaos.cpp to see what is actually used for image manipulation
58
59
60
     $ wget ftp://ftp.graphicsmagick.org/pub/GraphicsMagick/1.3/GraphicsMagick-1.3.17.tar.gz
61 3 m.winkler
$ tar -xvzf GraphicsMagick-1.3.17.tar.gz
62
$ cd GraphicsMagick-1.3.17/
63
$ ./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 
64
$ make 
65
$ sudo make install
66 1 m.winkler
67
68
pstoedit will look for Magick++-config instead of GraphicsMagick++-config
69
so we create a link to cover this 
70
71
     $ sudo ln -s /usr/local/bin/GraphicsMagick++-config /usr/local/bin/Magick++-config
72
73
74
h3. tftp-hpa
75
76
the OSX tftp client doesn't work with cups-laos, install the extended version
77
78
     $ wget http://www.kernel.org/pub/software/network/tftp/tftp-hpa/tftp-hpa-5.2.tar.gz
79 3 m.winkler
$ tar -xvzf tftp-hpa-5.2.tar.gz
80
$ cd tftp-hpa-5.2
81
$ ./configure --without-ipv6
82 1 m.winkler
     
83 3 m.winkler
backup the original, and install tftp-hpa
84
85 1 m.winkler
     $ sudo cp /usr/bin/tftp /usr/bin/tftp.orig
86 3 m.winkler
$ cp tftp/tftp /usr/bin/tftp
87 1 m.winkler
88
 
89
90
h3. pstoedit
91
92
after gostscript and GraphicsMagick is installed pstoedit will compile
93
94
     $ git clone -b laos https://github.com/LaosLaser/pstoedit.git
95 3 m.winkler
$ cd pstoedit
96
$ ./configure
97
$ make
98
$ sudo make install
99 1 m.winkler
100
h3. cups-laos cups backend + ppd
101
102
     $ git clone https://github.com/LaosLaser/Software
103 3 m.winkler
$ cd Softwate/cups-laos/src
104
$ make
105
$ sudo cp cups-laos /usr/libexec/cups/backend/
106
$ sudo chmod 755 /usr/libexec/cups/backend/cups-laos   
107 1 m.winkler
108
read https://developer.apple.com/library/mac/#documentation/Printing/Conceptual/UsingPPDFiles/ppd_tasks/ppd_tasks.html  section "Installing PPD Files" 
109
     
110
     $ sudo mkdir /Library/Printers/PPDs/Contents/Resources/en.lproj
111 3 m.winkler
$ sudo cp CUPS-LAOS.ppd /Library/Printers/PPDs/Contents/Resources/en.lproj
112
$ sudo chmod 755 /Library/Printers/PPDs/Contents/Resources/en.lproj/CUPS-LAOS.ppd
113 1 m.winkler
114
     
115 3 m.winkler
h2. Install the laser cutter under CUPS 
116 1 m.winkler
117
118 3 m.winkler
now you can add a laser cutter eader trough http://localhost:631 
119 1 m.winkler
or OSX System Preferences -> Printer -> + -> cups-laos
120
121 3 m.winkler
122
h2. Notes
123
124
h3. Bug can't change device URI 
125
126
Connection is allways "cups-laos://127.0.0.1:69/laos" and can only be changed 
127
by editing /etc/cups/printers.conf
128
129
search for
130
   
131
        DeviceURI cups-laos://127.0.0.1:69/laos
132
 
133
and replace 127.0.0.1 with the destination of your laser cutter
134
135
136 4 m.winkler
h3. "wget: command not found"
137 3 m.winkler
138
if you are not using macports or homebrew but have already Apples Xcode + Apple's Command Line Developer Tools installed,
139
you can install wget with 
140
141
     $ curl -o wget-latest.tar.gz http://ftp.gnu.org/gnu/wget/wget-latest.tar.gz
142
$ tar xzf wget-latest.tar.gz
143
$ cd wget-x.y.z # Verzeichnis, das im latest Archiv verpackt war, z.B. wget-1.11.4
144
$ ./configure
145
$ make
146
$ sudo make install
147
148
otherwise just download the sources with your browser