Project

General

Profile

LAOS CUPS driver OSX » History » Version 8

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

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