Skip to content

Commit

Permalink
Some files needed to build the windows executable
Browse files Browse the repository at this point in the history
  • Loading branch information
FenixFeather committed Dec 7, 2013
1 parent 1ce6950 commit 0f33eab
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
43 changes: 43 additions & 0 deletions buildWindows.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
#!/usr/bin/env python

from distutils.core import setup
import py2exe
import os
import glob

def find_data_files(source,target,patterns):
"""Locates the specified data-files and returns the matches
in a data_files compatible format.
source is the root of the source data tree.
Use '' or '.' for current directory.
target is the root of the target data tree.
Use '' or '.' for the distribution directory.
patterns is a sequence of glob-patterns for the
files you want to copy.
"""
if glob.has_magic(source) or glob.has_magic(target):
raise ValueError("Magic not allowed in src, target")
ret = {}
for pattern in patterns:
pattern = os.path.join(source,pattern)
for filename in glob.glob(pattern):
if os.path.isfile(filename):
targetpath = os.path.join(target,os.path.relpath(filename,source))
path = os.path.dirname(targetpath)
ret.setdefault(path,[]).append(filename)
return sorted(ret.items())

setup(name="Spreader",
version="1.4.0",
author="Thomas Liu",
author_email="[email protected]",
url="https://tfliu.com",
license="GNU General Public License (GPL)",
scripts=["cards_server.py","cards_gui_client.py","cards_client.py"],
console=["cards_server.py","cards_client.py"],
windows=[{"script": "cards_gui_client.py", "icon_resources": [(1, "spreader.ico")]}],
data_files=find_data_files('.','',[
'img/*','LICENSE.','README.md','settings.ini', 'CHANGELOG', 'test-adjs.txt','test-nouns.txt'
]),
options={"py2exe": {"includes": ["sip"]}})
Binary file added img/card.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/cardSelected.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added img/spreader.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added spreader.ico
Binary file not shown.

0 comments on commit 0f33eab

Please sign in to comment.