금요일, 2월 09, 2007

perl2exe - 실행파일 만들기

* 파이션을 이용해서 실행파일을 만든경우
소스가 있는 위치에 setup.py파일을 만들고 실행시키면 dist디렉토리가 생성되면서 실행파일이 생성됨.
실행파일과 MSVCR71.dll을 배포하면됩니다.


* sample - console부분에 작성한 py파일을 입력한다.

from distutils.core import setup
import py2exe
import sys

# If run without args, build executables, in quiet mode.
if len(sys.argv) == 1:
sys.argv.append("py2exe")
sys.argv.append("-q")



setup(
# The first three parameters are not required, if at least a
# 'version' is given, then a versioninfo resource is built from
# them and added to the executables.
version = "0.0.1",
description = "py2exe hello world !!!",
name = "hello world samples",
options = {"py2exe": {"compressed": 1,
"optimize": 2,
"ascii": 1,
"bundle_files": 1}},
zipfile = None,
console = ["a.py"],
)

댓글 없음: