Skip to content

Commit 892ba43

Browse files
committed
including the Tree() on the COLLECT lines so that files from the source (ie: .kv files) get included in the builds
1 parent 8df0f3f commit 892ba43

File tree

2 files changed

+46
-8
lines changed

2 files changed

+46
-8
lines changed

build/mac/buildDmg.sh

Lines changed: 45 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -73,13 +73,51 @@ ${PYTHON_PATH} -m pip install --upgrade --user PyInstaller
7373
mkdir pyinstaller
7474
pushd pyinstaller
7575

76-
${PYTHON_PATH} -m PyInstaller -y --clean --windowed --name ${APP_NAME} \
77-
--hidden-import 'pkg_resources.py2_warn' \
78-
--exclude-module _tkinter \
79-
--exclude-module Tkinter \
80-
--exclude-module enchant \
81-
--exclude-module twisted \
82-
../src/main.py
76+
cat >> ${APP_NAME}.spec <<EOF
77+
# -*- mode: python ; coding: utf-8 -*-
78+
79+
block_cipher = None
80+
81+
82+
a = Analysis(['../src/main.py'],
83+
pathex=['./'],
84+
binaries=[],
85+
datas=[],
86+
hiddenimports=['pkg_resources.py2_warn'],
87+
hookspath=[],
88+
runtime_hooks=[],
89+
excludes=['_tkinter', 'Tkinter', 'enchant', 'twisted'],
90+
win_no_prefer_redirects=False,
91+
win_private_assemblies=False,
92+
cipher=block_cipher,
93+
noarchive=False)
94+
pyz = PYZ(a.pure, a.zipped_data,
95+
cipher=block_cipher)
96+
exe = EXE(pyz,
97+
a.scripts,
98+
[],
99+
exclude_binaries=True,
100+
name='${APP_NAME}',
101+
debug=False,
102+
bootloader_ignore_signals=False,
103+
strip=False,
104+
upx=True,
105+
console=False )
106+
coll = COLLECT(exe, Tree('../src/'),
107+
a.binaries,
108+
a.zipfiles,
109+
a.datas,
110+
strip=False,
111+
upx=True,
112+
upx_exclude=[],
113+
name='${APP_NAME}')
114+
app = BUNDLE(coll,
115+
name='${APP_NAME}.app',
116+
icon=None,
117+
bundle_identifier=None)
118+
EOF
119+
120+
${PYTHON_PATH} -m PyInstaller -y --clean --windowed "${APP_NAME}.spec"
83121

84122
pushd dist
85123
hdiutil create ./${APP_NAME}.dmg -srcfolder ${APP_NAME}.app -ov

build/windows/buildExe.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ exe = EXE(pyz,
102102
strip=False,
103103
upx=True,
104104
console=True )
105-
coll = COLLECT(exe,
105+
coll = COLLECT(exe, Tree('..\\src\\'),
106106
a.binaries,
107107
a.zipfiles,
108108
a.datas,

0 commit comments

Comments
 (0)