"""
Taihsuan Ho 2016/10/19
This is a setup.py script generated by py2exe

Usage:
    python setup.py py2exe
"""

from distutils.core import setup
import glob
import py2exe

resources = glob.glob('resources/*.*')
bkimgs = list(set(glob.glob('BKIMG/*.jpg')))
bgms = list(set(glob.glob('BGM/*.mp3')))

setup(
	# bundle_files=2, making files bundle in the executable.
	# optimize=2, maximize optimization, might be buggy, remove this option if there is anything wrong.
	options = {'py2exe': {'bundle_files': 2, 'optimize': 2}},
	# For script, give the main py is engough.
	windows = [{'script': "KyleOthello.py", "icon_resources": [(1, 'resources/KyleOthello.ico')]}],
	# First element in tuple is '', so all the data image and icon files will be copied to the dist folder.
	data_files = [('resources', resources), ('BKIMG', bkimgs), ('BGM', bgms)],
	# Set zipfile= None, since bundle_files is not 3 (no bundle).
	zipfile = None
	)
