Tuesday, September 20, 2005

Currently Working on... and Update: MinGW and PyOpenGL

So apparently I forgot to document the process on how to build PyOpenGL on MinGW+MSYS.

  1. Install MinGW+MSYS.
  2. Install GLUT (Preferably compiled yourself).
  3. Install pyMinGW (Preferably compiled yourself).
  4. Download and decompress the PyOpenGL tarball.
  5. Edit config/win32.cfg so that {include,lib}_dirs points to your GLUT base {include headers,libraries} path, e.g., C:/msys/1.0/local/{include,lib}, add a variable under those named extra_link_args that contains the locations of your Python library and your OpenGL library (that comes with w32api), separated by " ", e.g., C:/msys/1.0/local/lib/libpython.a" "C:/mingw/lib/libopengl32.a, and remove the value of libs in [GL].
  6. Run python setup.py build -cmingw32 && python setup.py install.

Much simpler than some software, trust me.

Also, I am currently working on an S5-building tool using PyGTK. Should be "ready" pretty soon; the hard part wasn't the S5 parser/builder, it'll be the pseudo-WYSIWYG editor.

Thursday, September 08, 2005

Update: MinGW, MSYS, GTK+, and "gcc.exe: : Invalid argument"

(14:30:53) malept: does anyone know why when trying to compile gtk+ on win32, running make results in " gcc.exe: : Invalid argument" on every single c file? Googling results in an unanswered mailing list question. (14:31:22) owen: malept; it's a libtool issue (14:31:43) owen: Sorry, pkg-config issue / msys bash issue (14:32:08) owen: http://mail.gnome.org/archives/gtk-devel-list/2005-January/msg00091.html - see Step 4 (14:33:08) malept: thanks, I've been trying to figure this one out for days

(note: above link does not go to that URL, it goes to the thread on gmane)

Edit: restored original link, because gmane screws up the syntax with its antispam filter.

Wednesday, September 07, 2005

Linux and Modems

At my house, all we have is dial-up for Internet access. After years of working with Linux, I am of the opinion that Linux hates modems. Sure, there's "support" for them, but it takes far too much of my time to set those stupid things up. With network cards, it usually "just works". There is no "just works" with modems. It took me months to figure out how to get the modem to work right when I'm not root with my gentoo box. When I was setting up my mom's box for Ubuntu, it put the modem in /dev/ttyS14. Why 14?! How the hell am I supposed to know that it's in /dev/ttyS14?! This is ridiculous. There needs to be a better way to do this. I've never had "autodetect" work.

/End rant.

Sunday, September 04, 2005

Update 2: MinGW and Expat

Given my recent luck with compilation, I decided to try expat yet again. So after another few hours trying, I got expat to compile and pass `make check`. And I didn't have to modify a single file. It pisses me off somewhat, but I'm rather glad I don't have to rely on the downloaded binaries anymore. All one has to do is ./configure && make LIBTOOL=/usr/bin/libtool all install. Simple, eh? The libtool bundled with expat hates MinGW (I believe that it thinks that all linking operations result in an executable), and if one tries to `libtoolize` and update libtool that way, the virus spreads to that one.

New Design; Update: MinGW + poppler

If anyone actually reads this thing, they might notice that this weblog's web page has been drastically revamped. I XHTML-1.0-Transitional-ized the HTML with the help of the W3C HTML Validator (to the best of my ability; the Blogger code contains a <br> somewhere, which sucks), and gutted the CSS. Interestingly enough, the W3C CSS Validator chokes on valid vendor-specific CSS, e.g. -moz-border-radius. Also, I'm testing out a tagging Greasemonkey script for Blogger.

Anyway, I took another crack at compiling poppler (with my newfound knowledge of autotools), and it seems that the #defined constant DATADIR is used in a win32api header, which sucks big-time. Fortunately though, I managed to get it to compile fully. As luck would have it, when trying to execute any of the test programs, it crashes. So, I've decided to rebuild everything I've custom-made myself with the debug flag (-g), so it'll be easier to track down runtime errors with Dr. Mingw, which is a very nice debugging tool, much lighter than gdb.

Oh right, my patch didn't get into PyGTK 2.8.0. Oh well.

Thursday, September 01, 2005

Bits and Pieces

  • If I'm lucky, I'll have my win32 autotools patch in PyGTK 2.8.0. Yay!
  • Being used to the linux terminal, I missed the usage of Home, End, and Delete. Fortunately, I found a mailing list post to enable them on MSYS's RXVT.
  • I'm probably going to write myself an AtomPP-based client in PyGTK. I need practice coding in things other than shell and m4, anyway.

[Edit: typoes]