[Scribus] MacOS native version

Andreas Vox vox
Sat Mar 5 02:22:24 CET 2005


Hi!

I noticed that you still require X11 for the MacOSX version of Scribus.

I managed to compile Scribus 1.2.1 with Qt/Mac native and I wondered
if you'd like to get some hints how it is done. In fact it was quite 
easy
once I solved my libtool problems (screenshot attached :-) )

So this is what I did:

0. Started with the Scribus 1.2.1 sources
1. configured Scribus to use Qt/Mac inbstead of the fink Qt version
2. replaced all gdk-* sourcefiles with empty files
3. commented out all #include <X11.h> etc.
4. Removed GC from scpainter
5. Rewrote scpainter::end():

void ScPainter::end()
{
         QImage qimg(m_width, m_height, 32, QImage::BigEndian);
         QRgb * bits = (QRgb *) qimg.bits();
         int words = qimg.numBytes() / 4;
         art_u8 * p = m_buffer;;
         for (int i=0; i < words; ++i) {
                 art_u8 r = *p++;
                art_u8 g = *p++;
                art_u8 b = *p++;
                art_u8 a = *p++;
                *bits++ = qRgba(r,g,b,a);
         }
         bitBlt(m_target, 0, 0, &qimg);
}

6. libtool nuisances:
6a)  Apply fink patch to use correct -bundle for libtool
6b)  Remove -s option (stripping is no good idea if you want to link 
plugins)
7. Make Scribus ignore any "-psn_*" commandline options passed by Qt
8. Adjust a few #includes to MacOSX
9. Created a rudimentary Scribus.app/ bundle (thanks to Ronald Florence 
who
     did the same for LyX so I just had to replace a few strings)

The application still uses the files (plugins etc.) which Scribus 
installs to /usr/local.
The following libraries get linked:
/Applications/local/Scribus.app/Contents/MacOS/scribus:
         /sw/lib/libjpeg.62.dylib (compatibility version 63.0.0, current 
version 63.0.0)
         /sw/lib/libart_lgpl_2.2.dylib (compatibility version 6.0.0, 
current version 6.16.0)
         /usr/local/lib/libfreetype6.dylib (compatibility version 6.2.0, 
current version 6.3.4)
         /usr/lib/libcups.2.dylib (compatibility version 2.0.0, current 
version 2.5.0)
         /usr/lib/libssl.0.9.7.dylib (compatibility version 0.9.7, 
current version 0.9.7)
         /usr/lib/libcrypto.0.9.7.dylib (compatibility version 0.9.7, 
current version 0.9.7)
         /sw/lib/liblcms.1.dylib (compatibility version 2.0.0, current 
version 2.12.0)
         /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, 
current version 71.1.1)
         /sw/lib/libtiff.3.dylib (compatibility version 3.6.0, current 
version 3.6.1)
         libqt-mt.3.dylib (compatibility version 3.3.0, current version 
3.3.3)
         /sw/lib/libpng.3.dylib (compatibility version 3.0.0, current 
version 3.0.0)
         /usr/lib/libz.1.dylib (compatibility version 1.0.0, current 
version 1.0.0)

I still have problems with some plugins and some icons don't show, but 
otherwise
it's usable.
Anyone who want's to test and help finishing it to a proper MacOSX 
application?

Regards
Andreas

Ah, yes, the screenshot:

-------------- next part --------------
A non-text attachment was scrubbed...
Name: scribus-screen-shot-small.jpg
Type: image/jpeg
Size: 48409 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050305/a9711066/attachment.jpg 



More information about the scribus mailing list