Skip to content

Commit

Permalink
Fix viewer build must include npbackup.gui interface
Browse files Browse the repository at this point in the history
  • Loading branch information
deajan committed Mar 10, 2024
1 parent b90f79e commit ae7bec9
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions bin/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,6 @@


LICENSE_FILE = os.path.join(BASEDIR, os.pardir, 'LICENSE')
print(LICENSE_FILE)

del sys.path[0]

Expand Down Expand Up @@ -254,18 +253,21 @@ def compile(arch: str, audience: str, build_type: str):
excludes_dir_source = os.path.join(BASEDIR, os.pardir, excludes_dir)
excludes_dir_dest = excludes_dir

NUITKA_OPTIONS = " --clang"
#NUITKA_OPTIONS = " --clang"
NUITKA_OPTIONS = ""
NUITKA_OPTIONS += " --enable-plugin=data-hiding" if have_nuitka_commercial() else ""

# Stupid fix for synology RS816 where /tmp is mounted with `noexec`.
if "arm" in arch:
NUITKA_OPTIONS += " --onefile-tempdir-spec=/var/tmp"

if build_type == "gui":
if build_type in ("gui", "viewer"):
NUITKA_OPTIONS += " --plugin-enable=tk-inter --disable-console"
else:
NUITKA_OPTIONS += " --plugin-disable=tk-inter --nofollow-import-to=PySimpleGUI --nofollow-import-to=_tkinter --nofollow-import-to=npbackup.gui"


if build_type == "gui":
NUITKA_OPTIONS +" --nofollow-import-to=npbackup.gui.config --nofollow-import-to=npbackup.__main__"
if os.name != "nt":
NUITKA_OPTIONS += " --nofollow-import-to=npbackup.windows"

Expand Down

0 comments on commit ae7bec9

Please sign in to comment.