Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
99 changes: 50 additions & 49 deletions scripts/pyinstaller/ileapp.spec
Original file line number Diff line number Diff line change
@@ -1,49 +1,50 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(['..\\..\\ileapp.py'],
pathex=['..\\scripts\\artifacts'],
binaries=[],
datas=[('..\\', '.\\scripts')],
hiddenimports=[
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
'Crypto.Cipher.AES',
'ijson',
'lib2to3.refactor',
'liblzfse',
'mdplist',
'mmh3',
'nska_deserialize',
'pandas',
'pgpy',
'pillow_heif',
'typedstream',
'xml.etree.ElementTree',
],
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)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='ileapp',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
version='ileapp-file_version_info.txt',
console=True )
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(['..\\..\\ileapp.py'],
pathex=['..\\scripts\\artifacts', '..\\..'],
binaries=[],
datas=[('..\\', '.\\scripts'), ('..\\..\\assets', '.\\assets'), ('..\\..\\leapp_functions', '.\\leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
'Crypto.Cipher.AES',
'ijson',
'lib2to3.refactor',
'liblzfse',
'mdplist',
'mmh3',
'nska_deserialize',
'pandas',
'pgpy',
'pillow_heif',
'typedstream',
'xml.etree.ElementTree',
],
hookspath=['./'],
runtime_hooks=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='ileapp',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
upx_exclude=[],
runtime_tmpdir=None,
version='ileapp-file_version_info.txt',
console=True )
101 changes: 51 additions & 50 deletions scripts/pyinstaller/ileappGUI.spec
Original file line number Diff line number Diff line change
@@ -1,50 +1,51 @@
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(['..\\..\\ileappGUI.py'],
pathex=['..\\scripts\\artifacts'],
binaries=[],
datas=[('..\\', '.\\scripts'), ('..\\..\\assets', '.\\assets')],
hiddenimports=[
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
'Crypto.Cipher.AES',
'ijson',
'lib2to3.refactor',
'liblzfse',
'mdplist',
'mmh3',
'nska_deserialize',
'pandas',
'pgpy',
'pillow_heif',
'typedstream',
'xml.etree.ElementTree',
],
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)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='ileappGUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
hide_console='hide-early',
disable_windowed_traceback=False,
upx_exclude=[],
version='ileappGUI-file_version_info.txt',
runtime_tmpdir=None )
# -*- mode: python ; coding: utf-8 -*-

block_cipher = None

a = Analysis(['..\\..\\ileappGUI.py'],
pathex=['..\\scripts\\artifacts', '..\\..'],
binaries=[],
datas=[('..\\', '.\\scripts'), ('..\\..\\assets', '.\\assets'), ('..\\..\\leapp_functions', '.\\leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
'Crypto.Cipher.AES',
'ijson',
'lib2to3.refactor',
'liblzfse',
'mdplist',
'mmh3',
'nska_deserialize',
'pandas',
'pgpy',
'pillow_heif',
'typedstream',
'xml.etree.ElementTree',
],
runtime_hooks=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
win_no_prefer_redirects=False,
win_private_assemblies=False,
cipher=block_cipher,
noarchive=False)
pyz = PYZ(a.pure, a.zipped_data,
cipher=block_cipher)
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
name='ileappGUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=True,
console=True,
hide_console='hide-early',
disable_windowed_traceback=False,
upx_exclude=[],
version='ileappGUI-file_version_info.txt',
runtime_tmpdir=None )
7 changes: 4 additions & 3 deletions scripts/pyinstaller/ileappGUI_Linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

a = Analysis(
['../../ileappGUI.py'],
pathex=['../scripts/artifacts'],
pathex=['../scripts/artifacts', '../..'],
binaries=[],
datas=[('../', 'scripts'), ('../../assets', 'assets')],
datas=[('../', 'scripts'), ('../../assets', 'assets'), ('../../leapp_functions', 'leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
Expand All @@ -27,7 +28,7 @@ a = Analysis(
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
noarchive=False,
)
pyz = PYZ(a.pure)
Expand Down
7 changes: 4 additions & 3 deletions scripts/pyinstaller/ileappGUI_macOS.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

a = Analysis(
['../../ileappGUI.py'],
pathex=['../scripts/artifacts'],
pathex=['../scripts/artifacts', '../..'],
binaries=[],
datas=[('../', 'scripts'), ('../../assets', 'assets')],
datas=[('../', 'scripts'), ('../../assets', 'assets'), ('../../leapp_functions', 'leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
Expand All @@ -26,7 +27,7 @@ a = Analysis(
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
noarchive=False,
)
pyz = PYZ(a.pure)
Expand Down
7 changes: 4 additions & 3 deletions scripts/pyinstaller/ileapp_Linux.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

a = Analysis(
['../../ileapp.py'],
pathex=['../scripts/artifacts'],
pathex=['../scripts/artifacts', '../..'],
binaries=[],
datas=[('../', 'scripts')],
datas=[('../', 'scripts'), ('../../assets', 'assets'), ('../../leapp_functions', 'leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
Expand All @@ -26,7 +27,7 @@ a = Analysis(
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
noarchive=False,
)
pyz = PYZ(a.pure)
Expand Down
7 changes: 4 additions & 3 deletions scripts/pyinstaller/ileapp_macOS.spec
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,11 @@

a = Analysis(
['../../ileapp.py'],
pathex=['../scripts/artifacts'],
pathex=['../scripts/artifacts', '../..'],
binaries=[],
datas=[('../', 'scripts')],
datas=[('../', 'scripts'), ('../../assets', 'assets'), ('../../leapp_functions', 'leapp_functions')],
hiddenimports=[
'leapp_functions.parsers.apple_atx',
'astc_decomp_faster',
'bencoding',
'blackboxprotobuf',
Expand All @@ -26,7 +27,7 @@ a = Analysis(
hookspath=[],
hooksconfig={},
runtime_hooks=[],
excludes=[],
excludes=['scipy', 'matplotlib', 'pyarrow'],
noarchive=False,
)
pyz = PYZ(a.pure)
Expand Down
17 changes: 13 additions & 4 deletions scripts/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,18 @@

import html
import os
import sys
from pathlib import Path
import shutil


def _base_dir():
"""Directory holding bundled data (assets/, scripts/data/). In a PyInstaller
build this is sys._MEIPASS; running from source it is the cwd (repo root).
Resolving from here (not Path.cwd()) lets a packaged binary find its assets
no matter which directory it is launched from."""
return Path(getattr(sys, "_MEIPASS", Path.cwd()))

from collections import OrderedDict
from scripts.html_parts import nav_bar_script, nav_bar_script_footer, \
page_header, page_footer, body_start, body_end, body_sidebar_setup, body_sidebar_trailer, \
Expand All @@ -23,15 +32,15 @@

def get_tabler_icon_names():
"""Returns a set of available tabler icon names by scanning the tabler_icons directory."""
for _, dirs, files in Path.cwd().joinpath("assets/tabler_icons").walk():
for _, dirs, files in _base_dir().joinpath("assets/tabler_icons").walk():
if '__pycache__' in dirs:
dirs.remove('__pycache__')
return set(file.replace('.svg', '') for file in files if file.endswith('.svg'))


def get_tabler_icon(icon_name):
"""Return the SVG contents for a Tabler icon by name."""
return get_txt_file_content(Path.cwd().joinpath("assets/tabler_icons", f"{icon_name}.svg"))
return get_txt_file_content(_base_dir().joinpath("assets/tabler_icons", f"{icon_name}.svg"))


def generate_report(reportfolderbase, time_in_secs, time_hms, extraction_type, image_input_path,
Expand All @@ -42,8 +51,8 @@ def generate_report(reportfolderbase, time_in_secs, time_hms, extraction_type, i
"""

tabler_icon_names = get_tabler_icon_names()
tabler_icon_correction = get_json_file_content('scripts/data/tabler_icon_correction.json')
feather_to_tabler_icon_names = get_json_file_content('scripts/data/feather_to_tabler_icon_names.json')
tabler_icon_correction = get_json_file_content(str(_base_dir() / 'scripts/data/tabler_icon_correction.json'))
feather_to_tabler_icon_names = get_json_file_content(str(_base_dir() / 'scripts/data/feather_to_tabler_icon_names.json'))

control = None
side_heading = \
Expand Down
Loading