Archive

Posts Tagged ‘Mac OSX’

XULMusic Mac OSX Build

November 19th, 2005

For those interested I put together a Mac Build. I was in the middle of refactoring the playlist when I got side tracked with work and metro stop, so the current state of xulmusic is certainly not pretty… Anyway, I think this still serves as a pretty good example. So, here’s a link to the binary for Mac OSX for those interested. xullicious.com/XULMusic.app.tar.bz2 11M

Software , , , ,

Building Firefox 1.0.x on MacOSX 10.4 Tiger

September 19th, 2005

I found out a couple of things about building firefox 1.0.x on tiger today as I attempt once again at porting Simohealth to the mac. The first thing I did was run:

sudo gcc_select 3.3

Then I created my .mozconfig

. $topsrcdir/browser/config/mozconfig</code>
 
ac_add_options --disable-tests
ac_add_options --enable-debug
ac_add_options --disable-optimize
 
ac_add_options --without-system-nspr
ac_add_options --without-system-zlib
ac_add_options --without-system-jpeg
ac_add_options --without-system-png
ac_add_options --without-system-mng
ac_add_options --with-macos-sdk=/Developer/SDKs/MacOSX10.3.9.sdk

Notice I already had MacOSX10.3.9 sdk installed from building xulrunner.

I downloaded the firefox-1.0.6-source.tar.bz2 tar ball.

extracted the tar ball.

cd mozilla/
make -f client.mk build

I started getting errors:

c++ -o asdecode.o -c -DOSTYPE=\"Darwin8.2.0\" -DOSARCH=\"Darwin\"   -I../dist/include -I../dist/include -I/Users/taf2/projects/moz1.7/debug/dist/include/nspr        -fPIC   -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/include -fpascal-strings -no-cpp-precomp -fno-common -fshort-wchar -I/Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon -pipe  -DDEBUG -D_DEBUG -DDEBUG_taf2 -DTRACING -g   -DMOZILLA_CLIENT -include ../mozilla-config.h -Wp,-MD,.deps/asdecode.pp /Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp
In file included from /Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp:41:
/usr/include/gcc/darwin/3.3/c++/cstdlib:139: error: `_Exit' not declared
/usr/include/gcc/darwin/3.3/c++/cstdlib:165: error: `_Exit' not declared
/Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp: In function `int
main(int, char**)':
/Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp:114: warning: comparison
between signed and unsigned integer expressions
/Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp: At top level:
/Users/taf2/projects/moz1.7/mozilla/config/asdecode.cpp:58: warning: `int
read_int(FILE*)' defined but not used
make[2]: *** [asdecode.o] Error 1
make[1]: *** [default] Error 2
make: *** [build] Error 2

I worked past that error manually only to hit another error:

c++ -o nsFileSpec.o -c -DOSTYPE=\"Darwin8.2.0\" -DOSARCH=\"Darwin\" -D_IMPL_NS_COM_OBSOLETE -I.. -I/Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/../io  -I../../dist/include/xpcom -I../../dist/include/string -I../../dist/include/macmorefiles -I../../dist/include/xpcom_obsolete -I../../dist/include -I/Users/taf2/projects/moz1.7/debug/dist/include/nspr        -fPIC   -fno-rtti -fno-exceptions -Wall -Wconversion -Wpointer-arith -Wcast-align -Woverloaded-virtual -Wsynth -Wno-ctor-dtor-privacy -Wno-non-virtual-dtor -Wno-long-long -I/Developer/SDKs/MacOSX10.3.9.sdk/usr/include -fpascal-strings -no-cpp-precomp -fno-common -fshort-wchar -I/Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon -pipe  -DDEBUG -D_DEBUG -DDEBUG_taf2 -DTRACING -g -I/Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon   -DMOZILLA_CLIENT -include ../../mozilla-config.h -Wp,-MD,.deps/nsFileSpec.pp /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpec.cpp
In file included from /usr/include/sys/acl.h:26,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Files.h:61,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/Components.h:32,
from /System/Library/Frameworks/CoreServices.framework/Frameworks/CarbonCore.framework/Headers/CarbonCore.h:81,
from /System/Library/Frameworks/CoreServices.framework/Headers/CoreServices.h:21,
from /Developer/SDKs/MacOSX10.3.9.sdk/Developer/Headers/FlatCarbon/Aliases.h:1,
from /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpec.cpp:79:
/usr/include/sys/kauth.h:229: error: `user_addr_t' was not declared in this
scope
/usr/include/sys/kauth.h:229: error: parse error before `,' token
In file included from /usr/include/machine/_types.h:26,
from /usr/include/sys/_types.h:27,
from /usr/include/sys/statvfs.h:30,
from /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpecUnix.cpp:58,
from /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpec.cpp:520:
/usr/include/ppc/_types.h:73: error: conflicting types for `typedef union
__mbstate_t __mbstate_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/ppc/ansi.h:96: error: previous
declaration as `typedef union __mbstate_t __mbstate_t'
In file included from /usr/include/sys/statvfs.h:30,
from /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpecUnix.cpp:58,
from /Users/taf2/projects/moz1.7/mozilla/xpcom/obsolete/nsFileSpec.cpp:520:
/usr/include/sys/_types.h:66: error: redefinition of `struct
_opaque_pthread_attr_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:205: error: previous
definition of `struct _opaque_pthread_attr_t'
/usr/include/sys/_types.h:67: error: redefinition of `struct
_opaque_pthread_cond_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:213: error: previous
definition of `struct _opaque_pthread_cond_t'
/usr/include/sys/_types.h:68: error: redefinition of `struct
_opaque_pthread_condattr_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:211: error: previous
definition of `struct _opaque_pthread_condattr_t'
/usr/include/sys/_types.h:69: error: redefinition of `struct
_opaque_pthread_mutex_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:209: error: previous
definition of `struct _opaque_pthread_mutex_t'
/usr/include/sys/_types.h:70: error: redefinition of `struct
_opaque_pthread_mutexattr_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:207: error: previous
definition of `struct _opaque_pthread_mutexattr_t'
/usr/include/sys/_types.h:72: error: redefinition of `struct
_opaque_pthread_rwlock_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:217: error: previous
definition of `struct _opaque_pthread_rwlock_t'
/usr/include/sys/_types.h:73: error: redefinition of `struct
_opaque_pthread_rwlockattr_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:215: error: previous
definition of `struct _opaque_pthread_rwlockattr_t'
/usr/include/sys/_types.h:74: error: redefinition of `struct _opaque_pthread_t'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/types.h:203: error: previous
definition of `struct _opaque_pthread_t'
/usr/include/sys/_types.h:146: error: redefinition of `struct sigaltstack'
/Developer/SDKs/MacOSX10.3.9.sdk/usr/include/sys/signal.h:280: error: previous
definition of `struct sigaltstack'

Seeing this error I decided I still did not having something setup quiet right… So, I signed onto irc and started to explain the build problems… I was very lucky to ge t the help of mento… He kindly directed me to Bug 292530 with Patch 185940

Next he let me know I would need to use autoconf 2.13 not autoconf 2.54

I used apt-get to replace 2.54 with 2.13 and from the advice of some fink devs from freenode.

Next per mento’s advice I ran:

make -f client.mk distclean && autoconf && make -f client.mk build

Now I have a working Mac OSX Firefox 1.0.x debug build to start working with to begin working with to port simo.

Software , , ,

Music, RSS/Atom, Mac Support

August 17th, 2005

Music

On the music player front I’m reworking the playlist control. All the track data is going to be stored in a sqlite database. The displayed information will come from a custom nsITreeView implementation. This should make it possible to include some neat features like showing the playlist by artist or album. Also, it will make it easier to support other types of content like podcasting.

The biggest unknown I have is how drag and drop of rows will work, because I haven’t found any good examples or explanations about how that’s supposed to work.

I was able to greatly simplify playback by removing the separate thread that was being used to notify when playback had finished.

I also fixed the rounding issue that someone else had mentioned in response to one of my earlier posts.

The player now displays the time as you drag the position marker.

I found a bug in mozilla tree view, that I’m currently working on creating a patch for.

RSS/Atom

I haven’t had too much time to fool around with this code, but I did manage to improve the feed reader support for the upcoming simohealth release. Now, instead of scrapping news.google.com, it grabs the atom.xml feed from their site, caching it daily. I wonder if my asking about support for this at OSCON helped influence the support of a news feed from google. At any rate it certainly makes life a lot easier.

Mac Support

I’ve become much more fimilar with the mac over the last couple of weeks and now have xul music working on the mac as well as it does on linux and win32. I have to admit, I’m very happy with the mac, it’s a pretty cool environment. I’ve been without my linux notebook though for the last few weeks so i’m a little concerned about the state of the gstreamer implementation, but hope to get my linux system within the next few days so I can start working on it again. Heres a screenshot of the Mac xulmusic running:

Software , , ,

Mac Xulrunner

July 8th, 2005

Recently, I’ve been working on the mac to get xulmusic to work. I made some strides today in reaching that goal. First, I finally got things to link, and I am pretty sure I’m linking correctly now. After xulrunner switched to a Framework from an App Bundle, libxul.dylib disappeared. I found out today, to link to a framework I just needed to include the framework on the command line like so:

g++ $(DIST)/XUL.framework/XUL $(LIBS) $(OBJS) ...

The next thing I found out talking to bsmedberg on irc is xulrunner is going to be distributed as a framework, but include an app bundle for installing xulrunner packages. So, for example xulmusic would be distributed as a zip file, then to install it the xulrunner will read that zip file in and create a new app bundle.

The nice thing about this is all the core code is shared between each xulrunner application. It also means I can create one zip file and distribute it to any xulrunner supported platform and a user will get an icon on the desktop or in the startmenu and run the app by double clicking, etc…

Software , ,