Category
Recent Posts
- Smooth Zooming Depends on Flash Version
- Covert Actions
- Transform SWF 3.0.1 now available
- Considering A Move To Memphis
- Well, It Took A While
Archives
Search Box
Meta
Archive for the ‘ming’ Category
Compiling Ming For Windows
Posted by smackay | Filed under ming
After spending some time wrestling with Ming, I got it to build on Windows Vista using the MinGW GCC tool chain, though with some caveats, see the issues section below. Here are the steps I went through:
- Install MinGW 5.1.6. Make sure you select the following options:
- MinGW base tools
- g++ compiler
- MinGW Make
Also make sure the name of the directory where you install MinGW does not contain any spaces. C:\MinGW works just fine.
- Install MSYS 1.0.11. Again the name of the directory where you install MSYS should not contains any spaces. C:\msys works just fine.
- Install msysDTK-1.0.1.
- Download and unpack msys bison. Copy the files from the bin, lib and share directories into the same directories in your msys installation.
- Download and unpack msys flex. Copy the files from the bin, lib, include and share directories into the same directories in your msys installation.
- Download and unpack msys regex. Copy the dll from the bin directory into the bin directory in your msys installation.
- Download and unpack ming 0.4.3.
- Add c:\MSYS\bin, c:\MinGW\bin, in that order, to the PATH environment variable.
- Open a windows shell, change directory to where you unzipped the ming files and run the following command:
bash
then at the prompt, run:./configure --disable-freetype
this will configure to build the libraries with c++ bindings. - Now edit the file, libtool, in the ming root directory. On line 686 in the function func_extract_an_archive () change:
if ($AR t "$f_ex_an_ar_oldlib" | sort | sort -uc >/dev/null 2>&1); then
to:if ($AR t "$f_ex_an_ar_oldlib" | sort | sort >/dev/null 2>&1); then
Yes, this is subverting the build process and the step will be brittle but all the script is doing is comparing the names of the object files with those stored in the archive. The -uc option is for strict order checking of the file names and there is no obvious reason (at least in the limited time I spent looking) why it does not work. - Now compile and install the libraries:
make install
The libraries and header files will be installed in C:\msys\1.0\local
Issues:
In step 9, support for FreeType was disabled. This means that you will not be able to generate any font definitions from OpenType files. This is a nuisance since that limits the fonts you can use to ones already in Ming’s FDB format. However has FDB files for the Open Source Bitstream Vera fonts so you can get starting albeit with limited typography. I have not tries these fonts so there may be issues if the format changed – it is filed under Really Old Stuff.
The second major issue is another nuisance. The ming library is built without zlib. When the configure script runs it fails to find the compress2 function used by Ming even though the library was available in msys (downloaded and compiled specifically). That means that Ming cannot generate compressed Flash files. This is not too important, but obviously lacking in any code destined for serious use.
Next Steps:
- Get zlib to be recognised by the configure script.
- Add FreeType so OpenType fonts can be loaded.
- Get the build working with the other language wrappers: python, php and perl.
I will post updates as soon as they are available. I also plan on posting the libraries and ported versions of the Cookbook examples over the next few weeks.