求助,请问有没有给python安装使用过"ming"的朋友?
以下所有的安装方法我都试过了,都不能正确给python安装上,我用的是mingw.
请问有没有朋友成功的安装过的,请教一下正确的安装方法,谢谢。
(Ming is a highly useful open-source Flash SWF )
这是ming的官方网站 http://ming.sourceforge.net/
有0.3,和0.4两个版本,我都试过了,都没成功
=================
1) Download and unzip the ming [2] sources
2) cd into src/ and do a "make static"
3) copy the following distutils setup.py file into py_ext/
#----------------8<----------------------------------------------------
from distutils.core import setup
from distutils.extension import Extension
setup ( name = "ming",
version = "0.2a",
description = "A library for creating Shockwave files.",
py_modules = ["ming"],
ext_modules = [Extension( name='mingc',
sources=['ming_wrap.c'],
include_dirs=[".."],
library_dirs=["../src"],
libraries=["ming"]
)]
)
#----------------8<----------------------------------------------------
4) cd into py_ext/ and issue "python setup.py build --compiler=mingw32"
5) if you want to create an installer, issue "python setup.py bdist_wininst"
Now you have a Windows installer for the Python ming wrapper under dist. The
whole thing took me about five minutes, but I confess this isn't the first
setup.py I hacked.
===================
第二种安装方法
1. Download & install Python 2.4 for Windows in e.g. c:/python
2. Download & install Cygwin in e.g. c:/cygwin. This provides you with a shell and other tools. When it comes to picking the modules and applications to use, add in autoconf, bison and flex. Do not install gcc or make - these are taken care of in the next step.
3. Download & install MinGW in e.g. c:/mingw. MinGW is not Ming - MinGW is an entirely different application takes care of the compilation.
4. Download the MinGW-zlib library. Copy the two .h files in usr/include/mingw to c:/mingw/include
5. Copy the file libpython24.a from c:/python/libs to c:/mingw/lib.
6. Download & install the Ming source code, in e.g. c:/ming
7. Download the source code for zlib. Copy the files zlib.h and zconf.h into c:/ming/src
8. Fire up Cygwin and go into the ming directory (e.g. cd /cygdrive/c/ming)
9. Type the following commands:
$ autoconfig
$ ./configure
$ cd src
$ mingw32-make static
$ cd ..
$ ls libming.a
10. A file called libming.a should now exist. Type cd py_ext and press ENTER.
11. In this folder, there should be a file setup.py. Open it, delete the existing code and replace it with:
from distutils.core import setup, Extension
setup(name = "mingc",
version = "0.4",
description = "A library for creating Flash files",
py_modules = ['ming', 'mingc'],
ext_modules = [Extension(name="_mingc",
sources=["ming_wrap.c"],
include_dirs=['/usr/local/include', '../src'],
library_dirs=['/usr/local/lib', '..'],
libraries=['ming'])])
12. Run the following command:
$ ../../python/python setup.py build --compiler=mingw32
按官方的安装方法也不可以啊。。。。。。。。麻烦熟悉编译的朋友给看一下。很想试一下这个能在python使用的ming module.
这是和它相关的几个站
http://www.opaque.net/wiki/index.php?Ming%20%26%20Python
http://www16.brinkster.com/gazb/ming/index.html