From 8b7c34c20b51714be22674f7345d034f94787ec4 Mon Sep 17 00:00:00 2001 From: Mike Auty Date: Wed, 31 Oct 2018 17:15:59 +0000 Subject: [PATCH] Ensure all the schemas, json files and plugins get pulled in. --- vol.spec | 48 ++++++++++++++++++++++++++---------------------- 1 file changed, 26 insertions(+), 22 deletions(-) diff --git a/vol.spec b/vol.spec index 031bb5ff3..58547c01b 100644 --- a/vol.spec +++ b/vol.spec @@ -1,38 +1,42 @@ # -*- mode: python -*- +import os import sys + from PyInstaller.utils.hooks import collect_submodules, collect_data_files block_cipher = None -sys.path.append('/home/mike/workspace/volatility3') +# Volatility must be findable in sys.path in order for collect_submodules to work +# This adds the current working directory, which should usually do the trick +sys.path.append(os.getcwd()) a = Analysis(['vol.py'], - pathex=[], - binaries=[], - datas=collect_data_files('volatility.framework') + \ - collect_data_files('volatility.schemas') + \ - [('volatility/plugins', 'volatility/plugins')], - hiddenimports=collect_submodules('volatility.plugins'), - hookspath=[], - runtime_hooks=[], - excludes=[], - win_no_prefer_redirects=False, - win_private_assemblies=False, - cipher=block_cipher, - noarchive=False) + pathex = [], + binaries = [], + datas = collect_data_files('volatility.framework') + \ + collect_data_files('volatility.schemas') + \ + collect_data_files('volatility.plugins', include_py_files = True), + hiddenimports = collect_submodules('volatility.plugins'), + hookspath = [], + 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) + cipher = block_cipher) exe = EXE(pyz, a.scripts, a.binaries, a.zipfiles, a.datas, [], - name='vol', - debug=False, - bootloader_ignore_signals=False, - strip=False, - upx=True, - runtime_tmpdir=None, - console=True ) + name = 'vol', + debug = False, + bootloader_ignore_signals = False, + strip = False, + upx = True, + runtime_tmpdir = None, + console = True)