Skip to content

Commit

Permalink
testing build
Browse files Browse the repository at this point in the history
  • Loading branch information
zzzeid committed Sep 27, 2023
1 parent 9f5a5b5 commit d56b338
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
4 changes: 2 additions & 2 deletions gui/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
import subprocess
import sys
import tarfile
from pathlib import Path
# from pathlib import Path

IS_WIN = os.name == "nt"
IS_MAC = sys.platform == "darwin"
Expand Down Expand Up @@ -92,7 +92,7 @@ def do_bundle(options):
makensis_path = os.path.join(options.nsis_path, "makensis.exe")
call(makensis_path, "wininst.nsi", cwd="wininst")
elif IS_MAC:
Path("dist/mozregression GUI").unlink()
# Path("dist/mozregression GUI").unlink()
with tarfile.open("mozregression-gui-app-bundle.tar.gz", "w:gz") as tar:
tar.add(r"dist", arcname="mozregression-gui-app-bundle")
else:
Expand Down
40 changes: 18 additions & 22 deletions gui/gui.spec
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# -*- mode: python -*-
import sys
from PyInstaller.utils.hooks import (collect_all, collect_submodules)
from mozregression.pyinstaller import BUNDLE_WITH_TK

IS_MAC = sys.platform == "darwin"

Expand All @@ -18,38 +17,35 @@ for pkgname in ['glean', 'glean_parser', 'mozregression', 'yamllint', 'bs4']:
# https://github.com/pypa/setuptools/issues/1963
hiddenimports.extend(collect_submodules('pkg_resources'))

analysis_kwargs = {
"binaries": binaries,
"datas": datas,
"hiddenimports": hiddenimports,
"hookspath": [],
"excludes": [],
"win_no_prefer_redirects": False,
"win_private_assemblies": False,
"cipher": block_cipher,
"noarchive": False
}
if IS_MAC:
analysis_kwargs["runtime_hooks"] = ["splash_hook.py"]

a = Analysis(['mozregression-gui.py'], **analysis_kwargs)
a = Analysis(['mozregression-gui.py'],
binaries=binaries,
datas=datas,
hiddenimports=hiddenimports,
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)

if IS_MAC:
exe = EXE(pyz,
a.scripts,
a.binaries,
a.zipfiles,
a.datas,
[],
exclude_binaries=True,
name='mozregression GUI',
debug=False,
bootloader_ignore_signals=False,
strip=False,
upx=False,
console=False,
target_arch="universal2")
app = BUNDLE_WITH_TK(exe,
target_arch="universal2",
console=False)
app = BUNDLE(exe,
a.binaries,
a.zipfiles,
a.datas,
strip=False,
upx=True,
name='mozregression GUI.app',
Expand Down

0 comments on commit d56b338

Please sign in to comment.