Discussion:
MacOS native version
(too old to reply)
vox (Andreas Vox)
2005-03-05 01:22:24 UTC
Permalink
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 : Loading Image...
cbradney (Craig Bradney)
2005-03-05 08:29:33 UTC
Permalink
Hi

Looks great.. erm.. what replaces the gdk sources then?

Craig
Post by vox (Andreas Vox)
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 :-) )
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
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);
}
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.
/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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050305/0c6b9dec/attachment.pgp
cbradney (Craig Bradney)
2005-03-05 08:41:33 UTC
Permalink
and what replaces the X call(s) in scfonts.cpp ? Does this mean you always
have to add in the font paths via the additional font paths setup?

Craig
Post by cbradney (Craig Bradney)
Hi
Looks great.. erm.. what replaces the gdk sources then?
Craig
Post by vox (Andreas Vox)
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 :-) )
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
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);
}
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.
/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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050305/1d4d5f74/attachment.pgp
craig (Craig Ringer)
2005-03-05 12:16:12 UTC
Permalink
Post by cbradney (Craig Bradney)
and what replaces the X call(s) in scfonts.cpp ? Does this mean you always
have to add in the font paths via the additional font paths setup?
I expect fontconfig, as used in 1.3, should work fine for this job. It
probably won't permit the use of MacOS9 style resource-fork-based fonts
(PostScript / Type 1 and TrueType) or OS/X native style .dfont fonts,
though.

I'm rather more curious about what replaced gdk-* and the more general
issues with how it all works, though.
--
Craig Ringer
juergen.groth ( Jürgen Groth )
2005-03-05 09:13:00 UTC
Permalink
Hallo Herr Fox,

kann leider nciht richtig Englisch, habe aber ?ber ihre Bild gesehen, dass Sie auf "deutschsprachigen" Mac gearbeitet haben. Ich habe Scribus unter Linux laufen (Suse 9.2).
Ist es relativ einfach, die Anpassung f?r den Mac vorzunehmen? X11 habe ich installiert, da ich OpenOffice zu lesen vieler Dateien brauche (hatte bisher einen Windowsrechner).

F?r eine kurze Nachricht bin ich Ihnen dankbar.
Mit freundlichen Gr??en
J?rgen Groth
Post by vox (Andreas Vox)
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 :-) )
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
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);
}
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.
/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
<hr>
_______________________________________________
Scribus mailing list
Scribus at nashi.altmuehlnet.de
http://nashi.altmuehlnet.de/mailman/listinfo/scribus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 1445 bytes
Desc: S/MIME Cryptographic Signature
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050305/ebb69b5b/attachment.bin
costabel (Martin Costabel)
2005-03-05 10:23:16 UTC
Permalink
Post by juergen.groth ( Jürgen Groth )
Hallo Herr Fox,
kann leider nciht richtig Englisch, habe aber ?ber ihre Bild gesehen, dass Sie auf "deutschsprachigen" Mac gearbeitet haben. Ich habe Scribus unter Linux laufen (Suse 9.2).
Ist es relativ einfach, die Anpassung f?r den Mac vorzunehmen? X11 habe ich installiert, da ich OpenOffice zu lesen vieler Dateien brauche (hatte bisher einen Windowsrechner).
Die Scribus-Version von Andreas Vox sieht zwar vielversprechend aus, ist
aber zur Zeit noch ein bi?chen Zukunftsmusik. Wenn Du Scribus jetzt in
Moment auf dem Mac laufen lassen willst, kannst Du es mit der Version
von Fink versuchen, zumal Du ja X11 schon installiert hast.

Scribus selbst l?uft auf deutsch, wenn man es mit "scribus -l de"
startet, und auch viele der Fink-Webseiten existieren in einer deutschen
Version: http://fink.sourceforge.net/index.php?phpLang=de . Leider sind
die deutschen ?bersetzer im Fink-Projekt nicht so flei?ig wie die f?r
Scribus, so da? manche der angeblich deutschen Seiten doch ein wenig
Englisch enthalten.

Scribus mit Fink zu installieren ist sehr einfach; wie es geht, ist im
scribus-Wiki beschrieben:
http://wiki.scribus.net/index.php/Installing_Scribus_on_Mac_OS_X
(auf englisch, aber die 3 Zeilen sind nicht sehr schwierig zu verstehen).
--
Martin
craig (Craig Ringer)
2005-03-05 12:10:43 UTC
Permalink
Post by vox (Andreas Vox)
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 :-) )
This does seem extremely interesting. I've been meaning to try an Aqua-
native port of 1.3cvs for a while, but I just don't have the mac
development experience, and there was the gdk-pixbuf issue to consider.

Like Craig Bradney, I'd be very interested in knowing how you handled
fonts and how you worked around the gdk dependencies.
Post by vox (Andreas Vox)
From what I see in your library list below, I see that you still link to
quite a few fink-supplied libraries. I imagine we'd have to ship
prebuilt copies of those, or statically link them, with any
"installable" Aqua Scribus build. Sound about right?
Post by vox (Andreas Vox)
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)
That's very, very useful to know.

Did you end up using Xcode for all this, or just tweaked the existing
build to use Qt/Aqua?
Post by vox (Andreas Vox)
/sw/lib/libjpeg.62.dylib (compatibility version 63.0.0, current
version 63.0.0)
Does MacOS X not provide libjpeg? That's from fink by the looks...
Post by vox (Andreas Vox)
/sw/lib/libart_lgpl_2.2.dylib (compatibility version 6.0.0,
current version 6.16.0)
I imagine we'd have to bundle or statically link libart.
Post by vox (Andreas Vox)
/usr/local/lib/libfreetype6.dylib (compatibility version 6.2.0,
current version 6.3.4)
/usr/local/lib . Interesting. Did you compile a Mac-native version of
freetype yourself, or use an installer package or something?
Post by vox (Andreas Vox)
/usr/lib/libcups.2.dylib (compatibility version 2.0.0, current
version 2.5.0)
Glad to see we can rely on MacOS/X for CUPS libraries.
Post by vox (Andreas Vox)
/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)
Fink again. I guess that'd be another static linking candidate.
Post by vox (Andreas Vox)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 71.1.1)
Is this MacOS/X's libc equivalent? Or does it provide the core Aqua
routines etc?
Post by vox (Andreas Vox)
/sw/lib/libtiff.3.dylib (compatibility version 3.6.0, current
version 3.6.1)
Hmm, you got libtiff from fink too. Again, I'm rather surprised OS/X
doesn't include that.
Post by vox (Andreas Vox)
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)
libpng from fink too :-(
Post by vox (Andreas Vox)
/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?
Me!

Especially if you can give some more detailed info, especially about how
you did the build and where the various libraries are from.

One thing I'm curious about... I know MacOS/X has five different major
APIs:

Carbon (Cleaned up OS/9)
Classic (Virtual OS/9 for unchanged apps)
Cocoa (Native MacOS/X Objective C/Aqua)
Java (duh!)
POSIX/BSD/X11 (unix-style apps, usually console or X11 based)

but I was always under the impression they were rather separate, and one
couldn't for example write a POSIX/BSD app that used Cocoa (Aqua)
graphics. I also thought Cocoa apps had to link to 'Libraries' and
'Frameworks' that were different from the POSIX/BSD style shared
libraries.

Do you know if this distinction is less strict than I thought, and one
can mix and match to an extent? Or is Qt doing some magic to protect us
from these issues? Can we do things like use the MacOS/X font APIs? Have
you built Scribus as a Cocoa application, a POSIX/BSD app, or some
hybrid of the two?

If you know where I can go to find out more about MacOS/X development
and porting from UNIX, that'd be really handy too...

(It's funny - I don't actually like macs. But I still want to help port
Scribus across.)
--
Craig Ringer
avox (Andreas Vox)
2005-03-05 18:18:40 UTC
Permalink
Post by craig (Craig Ringer)
This does seem extremely interesting. I've been meaning to try an Aqua-
native port of 1.3cvs for a while, but I just don't have the mac
development experience, and there was the gdk-pixbuf issue to consider.
Since this post appears to contain more questions than others I'll
respond to this :-)
Post by craig (Craig Ringer)
Like Craig Bradney, I'd be very interested in knowing how you handled
fonts and how you worked around the gdk dependencies.
Ok, short one first: Fonts. I just commented out the body of
addXFontpath.
Currently I only have Courier/Luxi/Utopia etc from /usr/X11R6/bin.
Some work needs to be done here.

About the gdk-pixmap business: my first step was to delete/comment out
anything
which uses X11. I have a native LyX version based on Qt/Mac, so I know
this is
possible. Unfortunately when I started Scribus the main drawing area
was black.

Then I looked at the code and saw that in ScPainter::end() the libart
buffer is just
copied to an X pixmap. I then tried QImage for this:
QImage qimg(m_buffer, m_width, m_height, 0, 0);
bitBlt(target, 0, 0, &qimg);

That worked but after a while I noticed the colors where wrong. Some
testing and
thinking revealed that libart uses RGBA, while Qt uses ARGB. That's how
I arrived
at the current code: just copy the libart buffer into a QImage
manually.

The gdk-sources are not needed at all, QImage/bitBlt do all the work.
This should also
work for other platforms btw.
I'm not sure if scrolling is as fast as in X11, but it feels ok.
Sometimes I see artefacts
of half-drawn screens while scrolling, but once I stop everything looks
ok.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
From what I see in your library list below, I see that you still link
to
quite a few fink-supplied libraries. I imagine we'd have to ship
prebuilt copies of those, or statically link them, with any
"installable" Aqua Scribus build. Sound about right?
That was my quick&dirty approach again. It was easier for me to use
fink.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
9. Created a rudimentary Scribus.app/ bundle (thanks to Ronald
Florence
Post by vox (Andreas Vox)
who did the same for LyX so I just had to replace a few strings)
That's very, very useful to know.
Did you end up using Xcode for all this, or just tweaked the existing
build to use Qt/Aqua?
No XCode, not even Eclipse. Just Developertools gcc 3.3.3, Terminal.app
and vi :-)
The app-bundle is just a bunch of files where you have to copy your
executable to the right position and provide some information in an XML-
based Info.plist file.
I haven't produced icons yet, I will use the XCode tool for that.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
/sw/lib/libjpeg.62.dylib (compatibility version 63.0.0,
current
Post by vox (Andreas Vox)
version 63.0.0)
Does MacOS X not provide libjpeg? That's from fink by the looks...
Yes. Couldn't find one in OSX.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
/sw/lib/libart_lgpl_2.2.dylib (compatibility version 6.0.0,
current version 6.16.0)
I imagine we'd have to bundle or statically link libart.
Yes, unless you replace it by Cairo before ;-)
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
/usr/local/lib/libfreetype6.dylib (compatibility version
6.2.0,
Post by vox (Andreas Vox)
current version 6.3.4)
/usr/local/lib . Interesting. Did you compile a Mac-native version of
freetype yourself, or use an installer package or something?
I installed the fink one but obviously configure found the one from X11.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
/usr/lib/libcups.2.dylib (compatibility version 2.0.0,
current
Post by vox (Andreas Vox)
version 2.5.0)
Glad to see we can rely on MacOS/X for CUPS libraries.
Post by vox (Andreas Vox)
/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
Post by vox (Andreas Vox)
version 2.12.0)
Fink again. I guess that'd be another static linking candidate.
Post by vox (Andreas Vox)
/usr/lib/libSystem.B.dylib (compatibility version 1.0.0,
current version 71.1.1)
Is this MacOS/X's libc equivalent? Or does it provide the core Aqua
routines etc?
Yes, libc, libm and others.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
/sw/lib/libtiff.3.dylib (compatibility version 3.6.0,
current
Post by vox (Andreas Vox)
version 3.6.1)
Hmm, you got libtiff from fink too. Again, I'm rather surprised OS/X
doesn't include that.
I guess Apple needs Objective C routines for image handling most of the
time, so they have equivalents in their Cocoa framework.
Post by craig (Craig Ringer)
Post by vox (Andreas Vox)
libqt-mt.3.dylib (compatibility version 3.3.0, current
version
Post by vox (Andreas Vox)
3.3.3)
/sw/lib/libpng.3.dylib (compatibility version 3.0.0, current
version 3.0.0)
libpng from fink too :-(
Post by vox (Andreas Vox)
/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
Post by vox (Andreas Vox)
otherwise
it's usable.
Anyone who want's to test and help finishing it to a proper MacOSX
application?
Me!
Great.
Post by craig (Craig Ringer)
Especially if you can give some more detailed info, especially about
how
you did the build and where the various libraries are from.
Maybe we can stick to the fink ones for the time beeing and get the
other
stuff right, first?
Post by craig (Craig Ringer)
One thing I'm curious about... I know MacOS/X has five different major
Carbon (Cleaned up OS/9)
Classic (Virtual OS/9 for unchanged apps)
Emulator.
Post by craig (Craig Ringer)
Cocoa (Native MacOS/X Objective C/Aqua)
Objective C framework from Nextstep
Post by craig (Craig Ringer)
Java (duh!)
Has Cocoa bindings.
Post by craig (Craig Ringer)
POSIX/BSD/X11 (unix-style apps, usually console or X11 based)
Can be mixed with Carbon. I think X11 and Qt/Mac are also based on
Carbon.

It's all layered. I guess all graphics eventually end up in the Quartz
library.
For a single application it is very advisable to stick to one
framework, though.
Post by craig (Craig Ringer)
but I was always under the impression they were rather separate, and
one
couldn't for example write a POSIX/BSD app that used Cocoa (Aqua)
graphics. I also thought Cocoa apps had to link to 'Libraries' and
'Frameworks' that were different from the POSIX/BSD style shared
libraries.
Do you know if this distinction is less strict than I thought, and one
can mix and match to an extent? Or is Qt doing some magic to protect us
from these issues? Can we do things like use the MacOS/X font APIs?
Have
you built Scribus as a Cocoa application, a POSIX/BSD app, or some
hybrid of the two?
Qt/Mac app :-)
You can link to any framework you want, so now Scribus links to
Posix/BSD
for non-graphics stuff and Qt/Mac and libart for graphics.
Cocoa is more difficult because that's Objective C.

Scribus already almost exclusively uses Qt for graphics. The
buffer-copy in
scpainter and the fontpaths are the only X11 dependencies as far as I
know.
Post by craig (Craig Ringer)
If you know where I can go to find out more about MacOS/X development
and porting from UNIX, that'd be really handy too...
There are developer docs but mainly you can just use gcc/gdb/make etc.
You just have to read the Apple specific manpages for these tools, eg.
the special linking options of gcc for Darwin, -framework instead of -I,
or the fact that you can call gdb on a Mac.app application directly.
Post by craig (Craig Ringer)
(It's funny - I don't actually like macs.
Ha! I wont talk to you any more. ;-)
Post by craig (Craig Ringer)
But I still want to help port
Scribus across.)
You should know that MacOSX is the most popular Unix on earth :-)

OK, the next steps would be:

* decide if we want to work with 1.2.1 or 1.3cvs
* fix the makefile for MacOSX (include the fink changes)
* the fontpath issue
* use dynamic paths to access Scribus.app/Contents/Resources
instead of /usr/local/lib/scribus (We can build on some LyX work for
that)
* Provide a howto to compile Scribus for MacOS native (req. libraries,
configure options, installation, ...)
* Test Scribus/Mac for regression wrt. Scribus/X11
* When this works try to get a self contained binary with
bundled/static libs.

Ciao
/Andreas
cbradney (Craig Bradney)
2005-03-06 08:27:49 UTC
Permalink
Post by avox (Andreas Vox)
* decide if we want to work with 1.2.1 or 1.3cvs
I'd suggest 1.3 as we arent adding any new features to 1.2.1. 1.2.x works
already on Mac. Ok its not so simple or pretty
Post by avox (Andreas Vox)
* fix the makefile for MacOSX (include the fink changes)
* the fontpath issue
1.3 supports fontconfig.. I'm assuming fontconfig is ok via Fink. We will
strip the X dependency from 1.3 and rely on fontconfig soon enough.

We have a cairo build now, have had for ages, but its not fast enough to
switch yet. Your QImage idea might work on X11 just as quickly as libart
though..

Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050306/3b9f4924/attachment.pgp
costabel (Martin Costabel)
2005-03-06 14:20:40 UTC
Permalink
Two small remarks:

Andreas Vox wrote:
[]
Post by avox (Andreas Vox)
Post by vox (Andreas Vox)
Post by vox (Andreas Vox)
/usr/local/lib/libfreetype6.dylib (compatibility version
6.2.0,
Post by vox (Andreas Vox)
current version 6.3.4)
/usr/local/lib . Interesting. Did you compile a Mac-native version of
freetype yourself, or use an installer package or something?
I installed the fink one but obviously configure found the one from X11.
Actually, it found yet another one. The freetype from current Apple X11
is version 2.1.0 which is too old to work for scribus. Fink has versions
2.1.4 and 2.1.9, but they show other compatibility versions than what
you are showing.
Post by avox (Andreas Vox)
Post by vox (Andreas Vox)
Post by vox (Andreas Vox)
/usr/lib/libcups.2.dylib (compatibility version 2.0.0, current
version 2.5.0)
Glad to see we can rely on MacOS/X for CUPS libraries.
But headers like <cups/cups.h> are not supplied by Apple. You need a
small package cups-dev from Fink (or wait 4 months for MacOSX 10.4).
[]
Post by avox (Andreas Vox)
* decide if we want to work with 1.2.1 or 1.3cvs
It is probably natural for scribus developers to eye 1.3x here, and I
would agree if this means that 1.3x will be cleaned up for the Mac.
Right now, I haven't yet got it working correctly.

- There is a bug in the prefs plugin that prevents the preferences
dialog from coming up, but it is not the same bug as the one in 1.2.1,
and I haven't yet identified it. There is another bug in the svgex
plugin, but this is less important than the preferences.

- The colors are all wrong, again. I don't know which version of David
Purton's patch went into the cvs sources, but the result looks like with
the first version of his patch which was not correct for bigendian machines.
--
Martin
costabel (Martin Costabel)
2005-03-06 16:34:54 UTC
Permalink
Martin Costabel wrote:
[]
Post by costabel (Martin Costabel)
- There is a bug in the prefs plugin that prevents the preferences
dialog from coming up, but it is not the same bug as the one in 1.2.1,
and I haven't yet identified it.
It is actually still the same bug: A spurious declaration of
ChangeGrid() in prefs.h. Only that it changed its name to changeGrid()
now so that my patch script didn't catch it. Oh well...
--
Martin
costabel (Martin Costabel)
2005-03-06 18:00:34 UTC
Permalink
Post by costabel (Martin Costabel)
It is actually still the same bug: A spurious declaration of
ChangeGrid() in prefs.h. Only that it changed its name to changeGrid()
now so that my patch script didn't catch it. Oh well...
I had to remove two more spurious declarations to get the preferences to
work, see diff below.

If someone wants to admire the interesting colors I am getting, here is
a screenshot:
Loading Image...
(the same as pdf is also there). One can see that the screen shows
picture colors right and solid colors wrong, whereas for the print
preview it is the other way round.

% cvs diff scribus/libprefs/prefs.h
Index: scribus/libprefs/prefs.h
===================================================================
RCS file: /cvs/Scribus/scribus/libprefs/prefs.h,v
retrieving revision 1.19.2.24
diff -u -b -w -r1.19.2.24 prefs.h
--- scribus/libprefs/prefs.h 3 Mar 2005 18:14:30 -0000 1.19.2.24
+++ scribus/libprefs/prefs.h 6 Mar 2005 17:50:35 -0000
@@ -191,8 +191,6 @@
void changeProfs();
void changeScripts();
void changeTemplates();
- void changeScaling();
- void changeGrid();
void setDS();
void setPageWidth(int v);
void setPageHeight(int v);
@@ -202,7 +200,6 @@
void setRight(int v);
void setSize(const QString &);
void setOrien(int ori);
- void changePapColor();
void unitChange();
void setDisScale();
void switchCMS(bool enable);
--
Martin
cbradney (Craig Bradney)
2005-03-06 18:20:10 UTC
Permalink
Post by costabel (Martin Costabel)
Post by costabel (Martin Costabel)
It is actually still the same bug: A spurious declaration of
ChangeGrid() in prefs.h. Only that it changed its name to changeGrid()
now so that my patch script didn't catch it. Oh well...
I had to remove two more spurious declarations to get the preferences to
work, see diff below.
If someone wants to admire the interesting colors I am getting, here is
http://perso.univ-rennes1.fr/martin.costabel/scribus/Scribus_1.3cvs_colors.
jpg (the same as pdf is also there). One can see that the screen shows
picture colors right and solid colors wrong, whereas for the print preview
it is the other way round.
% cvs diff scribus/libprefs/prefs.h
Index: scribus/libprefs/prefs.h
===================================================================
RCS file: /cvs/Scribus/scribus/libprefs/prefs.h,v
retrieving revision 1.19.2.24
diff -u -b -w -r1.19.2.24 prefs.h
--- scribus/libprefs/prefs.h 3 Mar 2005 18:14:30 -0000 1.19.2.24
+++ scribus/libprefs/prefs.h 6 Mar 2005 17:50:35 -0000
@@ -191,8 +191,6 @@
void changeProfs();
void changeScripts();
void changeTemplates();
- void changeScaling();
- void changeGrid();
void setDS();
void setPageWidth(int v);
void setPageHeight(int v);
@@ -202,7 +200,6 @@
void setRight(int v);
void setSize(const QString &);
void setOrien(int ori);
- void changePapColor();
void unitChange();
void setDisScale();
void switchCMS(bool enable);
Ok, fixed and in CVS now. Thanks.

Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050306/1fc6535c/attachment.pgp
cbradney (Craig Bradney)
2005-03-06 18:11:07 UTC
Permalink
Post by costabel (Martin Costabel)
[]
Post by costabel (Martin Costabel)
- There is a bug in the prefs plugin that prevents the preferences
dialog from coming up, but it is not the same bug as the one in 1.2.1,
and I haven't yet identified it.
It is actually still the same bug: A spurious declaration of
ChangeGrid() in prefs.h. Only that it changed its name to changeGrid()
now so that my patch script didn't catch it. Oh well...
Was this a Mac specific bug, or can you share the patch?

Craig
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://nashi.altmuehlnet.de/pipermail/scribus/attachments/20050306/41cf7e02/attachment.pgp
craig (Craig Ringer)
2005-03-06 15:20:40 UTC
Permalink
Post by avox (Andreas Vox)
Ok, short one first: Fonts. I just commented out the body of
addXFontpath. Currently I only have Courier/Luxi/Utopia etc
from /usr/X11R6/bin. Some work needs to be done here.
Fontconfig should take care of that for now. In the medium term I'd like
to look at trying to access fonts via the MacOS/X font apis ... but that
might require things like a carbonized version of freetype that knows
about resource forks.
Post by avox (Andreas Vox)
No XCode, not even Eclipse. Just Developertools gcc 3.3.3,
Terminal.app and vi :-) The app-bundle is just a bunch of files where
you have to copy your executable to the right position and provide
some information in an XML-based Info.plist file. I haven't produced
icons yet, I will use the XCode tool for that.
That's very useful to know.
Post by avox (Andreas Vox)
Post by craig (Craig Ringer)
Especially if you can give some more detailed info, especially about
how
you did the build and where the various libraries are from.
Maybe we can stick to the fink ones for the time beeing and get the
other stuff right, first?
That sounds sensible.
Post by avox (Andreas Vox)
Post by craig (Craig Ringer)
POSIX/BSD/X11 (unix-style apps, usually console or X11 based)
Can be mixed with Carbon. I think X11 and Qt/Mac are also based on
Carbon.
Thankyou. I wasn't aware POSIX/BSD apps could use Carbon ... that's
extremely handy to know. It also eliminates one of my biggest concerns
with a Mac native port - the ability to use Mac-native APIs for font
access, accessing color profiles, etc without having to do some sort of
Objective-C wrapper layer.
Post by avox (Andreas Vox)
Post by craig (Craig Ringer)
If you know where I can go to find out more about MacOS/X development
and porting from UNIX, that'd be really handy too...
There are developer docs but mainly you can just use gcc/gdb/make etc.
You just have to read the Apple specific manpages for these tools, eg.
the special linking options of gcc for Darwin, -framework instead of -I,
or the fact that you can call gdb on a Mac.app application directly.
Good to know. I was more hoping for a "survial guide for UNIX
developers" though, ie what's different, how to handle issues like
resource forks, .app bundles, the number of different APIs, etc. I'll
have to check out the main dev docs - I had a quick look before but
didn't spot any sort of summary for folks coming from a *nix background.
Post by avox (Andreas Vox)
You should know that MacOSX is the most popular Unix on earth :-)
I just wish they'd integrate X11 more, so it wasn't the most popular
UNIX-like OS on earth and the only workstation one that encourages users
to avoid X11 ;-)

I like my network transparency.
Post by avox (Andreas Vox)
* decide if we want to work with 1.2.1 or 1.3cvs
I tend to agree with MrB re using 1.3cvs. While it'd mean a longer lead
time to get a stable, usable build, and more changes happening along the
way, it should mean less duplicated work and merging.

I guess I'll have to finish getting XCode and the dev tools set up on
the eMac at work.
--
Craig Ringer
avox (Andreas Vox)
2005-03-06 15:00:29 UTC
Permalink
Post by costabel (Martin Costabel)
[]
Post by avox (Andreas Vox)
Post by vox (Andreas Vox)
Post by vox (Andreas Vox)
/usr/local/lib/libfreetype6.dylib (compatibility version
6.2.0,
Post by vox (Andreas Vox)
current version 6.3.4)
/usr/local/lib . Interesting. Did you compile a Mac-native version
of
Post by avox (Andreas Vox)
Post by vox (Andreas Vox)
freetype yourself, or use an installer package or something?
I installed the fink one but obviously configure found the one from
X11.
Actually, it found yet another one.
You are right. Courtesy of word2x / libwmf.
...
Post by costabel (Martin Costabel)
It is probably natural for scribus developers to eye 1.3x here,
Fine. I'll start with patching now :-)
Post by costabel (Martin Costabel)
and I
would agree if this means that 1.3x will be cleaned up for the Mac.
Right now, I haven't yet got it working correctly.
- There is a bug in the prefs plugin that prevents the preferences
dialog from coming up, but it is not the same bug as the one in 1.2.1,
and I haven't yet identified it. There is another bug in the svgex
plugin, but this is less important than the preferences.
- The colors are all wrong, again. I don't know which version of David
Purton's patch went into the cvs sources, but the result looks like
with
the first version of his patch which was not correct for bigendian
machines.
This is Scribus/X11, yes? Is David Purton's patch changing the
gdk-sources
or libart or something else?

Ciao
/Andreas
vox (Andreas Vox)
2005-03-06 16:04:33 UTC
Permalink
Post by craig (Craig Ringer)
In the medium term I'd like
to look at trying to access fonts via the MacOS/X font apis ... but
that
might require things like a carbonized version of freetype that knows
about resource forks.
AFAIK resource forks are deprecated in MacOSX.
Post by craig (Craig Ringer)
Thankyou. I wasn't aware POSIX/BSD apps could use Carbon ... that's
extremely handy to know. It also eliminates one of my biggest concerns
with a Mac native port - the ability to use Mac-native APIs for font
access, accessing color profiles, etc without having to do some sort of
Objective-C wrapper layer.
That's why they created Carbon in the first place :-) -- noone wanted
to switch
to Objective C.
Post by craig (Craig Ringer)
Post by avox (Andreas Vox)
Post by craig (Craig Ringer)
If you know where I can go to find out more about MacOS/X
development
Post by avox (Andreas Vox)
Post by craig (Craig Ringer)
and porting from UNIX, that'd be really handy too...
There are developer docs but mainly you can just use gcc/gdb/make
etc.
Post by avox (Andreas Vox)
You just have to read the Apple specific manpages for these tools,
eg.
Post by avox (Andreas Vox)
the special linking options of gcc for Darwin, -framework instead of
-I,
Post by avox (Andreas Vox)
or the fact that you can call gdb on a Mac.app application directly.
Good to know. I was more hoping for a "survial guide for UNIX
developers" though, ie what's different, how to handle issues like
resource forks, .app bundles, the number of different APIs, etc. I'll
have to check out the main dev docs - I had a quick look before but
didn't spot any sort of summary for folks coming from a *nix
background.
Look for Unix porting guide. Manpages for gcc, glibtool, otool, etc.

I also found
http://sveinbjorn.vefsyn.is/writings
and
http://kernelthread.com/mac/osx/tools.html
useful.

Ciao
/Andreas
Continue reading on narkive:
Loading...