Skip to content

Commit 166cf82

Browse files
committed
added windows.spec for windows binary and improved the Makefile
1 parent 7dbf8f1 commit 166cf82

File tree

2 files changed

+38
-14
lines changed

2 files changed

+38
-14
lines changed

Makefile

+8-14
Original file line numberDiff line numberDiff line change
@@ -59,10 +59,6 @@ ${PYTHON_EXE}: deps/python-${PYTHON_VERSION}.msi
5959
msiexec /i python-2.7.3.msi /qb
6060
@touch $@
6161

62-
${PIP_EXE}: ${PYTHON_EXE} deps/distribute_setup.py
63-
wine ${PYTHON_EXE} deps/distribute_setup.py
64-
65-
6662
dependencies_wine: ${PYTHON_EXE} pip.installed
6763

6864
${WINE_PATH}/Python27/msvcp90.dll: ${WINE_PATH}/windows/system32/msvcp90.dll
@@ -79,10 +75,11 @@ deps/distribute_setup.py:
7975
@touch $@
8076

8177
${EASYINSTALL_EXE}: ${PYTHON_EXE} deps/distribute_setup.py
82-
wine ${PYTHON_EXE} deps/distribute_setup.py
78+
cd deps && \
79+
wine ${PYTHON_EXE} distribute_setup.py
8380
@touch $@
8481

85-
deps/pip.installed: ${PYTHON_EXE} ${EASYINSTALL_EXE}
82+
${PIP_EXE}: ${PYTHON_EXE} ${EASYINSTALL_EXE}
8683
wine ${EASYINSTALL_EXE} pip
8784
@touch $@
8885

@@ -98,7 +95,7 @@ tools/env/bin/activate: tools/.done
9895
virtualenv --no-site-packages --distribute tools/env
9996
@touch $@
10097

101-
tools/requirements.windows.checked: deps/pip.installed requirements.txt
98+
tools/requirements.windows.checked: ${PIP_EXE} requirements.txt
10299
wine ${PIP_EXE} install -r requirements.txt
103100
@touch $@
104101

@@ -107,17 +104,14 @@ dependencies: tools/requirements.checked \
107104

108105
dependencies_wine: ${PYTHON_EXE} ${PIP_EXE}
109106

110-
dist/backupd.exe: ${PYINSTALLER} tools/requirements.windows.checked
111-
wine ${PYTHON_EXE} ${PYINSTALLER} --onefile backupd.spec
112-
@touch $@
113107

114108
windows_binary_dependencies: ${WINE_PATH}/Python27/Scripts/pywin32_postinstall.py
115109

116-
dist/app.exe: ${PYINSTALLER} ${PYTHON_EXE} windows_binary_dependencies tools/requirements.windows.checked
117-
#windows_binary_dependencies
118-
wine ${PYTHON_EXE} ${PYINSTALLER} app.win.spec
110+
dist/windows/pynes.exe: ${PYINSTALLER} ${PYTHON_EXE} windows_binary_dependencies tools/requirements.windows.checked
111+
wine ${PYTHON_EXE} ${PYINSTALLER} --onefile pynes.windows.spec
112+
@touch $@
119113

120-
dist: dist/app.exe
114+
dist: clean dist/windows/pynes.exe
121115

122116
clean:
123117
@rm -rf build

pynes.windows.spec

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
# -*- mode: python -*-
2+
a = Analysis(['bin/pynes', os.path.join(HOMEPATH, 'support\\_mountzlib.py'),
3+
os.path.join(HOMEPATH, 'support\\useUnicode.py')],
4+
pathex=[os.path.join('.')],
5+
hiddenimports=['pynes'
6+
], hookspath=None)
7+
8+
pyz = PYZ(a.pure)
9+
10+
exe = EXE(pyz,
11+
a.scripts,
12+
a.zipfiles,
13+
a.datas,
14+
exclude_binaries=1,
15+
name=os.path.join('build', 'pyi.win32', 'pynes.exe'),
16+
debug=False,
17+
strip=False,
18+
upx=True,
19+
console=False )
20+
21+
coll = COLLECT(exe,
22+
a.binaries,
23+
a.zipfiles,
24+
a.datas,
25+
strip=False,
26+
upx=True,
27+
name=os.path.join('dist', 'windows'))
28+
29+
app = BUNDLE(coll,
30+
name=os.path.join('bundle', 'windows', 'pynes'))

0 commit comments

Comments
 (0)