diff --git a/build.bat b/build.bat new file mode 100644 index 0000000..2132ae8 --- /dev/null +++ b/build.bat @@ -0,0 +1 @@ +pyinstaller .\main.spec diff --git a/main.spec b/main.spec new file mode 100644 index 0000000..e0e129f --- /dev/null +++ b/main.spec @@ -0,0 +1,53 @@ +# -*- mode: python ; coding: utf-8 -*- + + +block_cipher = None + + +def get_mediapipe_path(): + import mediapipe + mediapipe_path = mediapipe.__path__[0] + return mediapipe_path + + +a = Analysis( + ['main.py'], + pathex=[], + binaries=[], + datas=[], + hiddenimports=[], + hookspath=[], + hooksconfig={}, + runtime_hooks=[], + excludes=[], + win_no_prefer_redirects=False, + win_private_assemblies=False, + cipher=block_cipher, + noarchive=False, +) +pyz = PYZ(a.pure, a.zipped_data, cipher=block_cipher) +mediapipe_tree = Tree(get_mediapipe_path(), prefix='mediapipe', excludes=["*.pyc"]) +a.datas += mediapipe_tree +a.binaries = filter(lambda x: 'mediapipe' not in x[0], a.binaries) + +exe = EXE( + pyz, + a.scripts, + a.binaries, + a.zipfiles, + a.datas, + [], + name='main', + debug=False, + bootloader_ignore_signals=False, + strip=False, + upx=True, + upx_exclude=[], + runtime_tmpdir=None, + console=False, + disable_windowed_traceback=False, + argv_emulation=False, + target_arch=None, + codesign_identity=None, + entitlements_file=None, +)