mirror of
https://github.com/netinvent/npbackup.git
synced 2025-02-24 14:35:36 +08:00
Exclude more packages when --no-gui is given
This commit is contained in:
parent
5ee383d6ef
commit
d21f7e5332
2 changed files with 7 additions and 2 deletions
|
@ -238,10 +238,13 @@ def compile(arch, audience, no_gui=False):
|
||||||
NUITKA_OPTIONS += " --onefile-tempdir-spec=/var/tmp"
|
NUITKA_OPTIONS += " --onefile-tempdir-spec=/var/tmp"
|
||||||
|
|
||||||
if no_gui:
|
if no_gui:
|
||||||
NUITKA_OPTIONS += " --plugin-disable=tk-inter --nofollow-import-to=PySimpleGUI"
|
NUITKA_OPTIONS += " --plugin-disable=tk-inter --nofollow-import-to=PySimpleGUI --nofollow-import-to=_tkinter --nofollow-import-to=npbackup.gui"
|
||||||
else:
|
else:
|
||||||
NUITKA_OPTIONS += " --plugin-enable=tk-inter"
|
NUITKA_OPTIONS += " --plugin-enable=tk-inter"
|
||||||
|
|
||||||
|
if os.name != "nt":
|
||||||
|
NUITKA_OPTIONS += " --nofollow-import-to=npbackup.windows"
|
||||||
|
|
||||||
EXE_OPTIONS = '--company-name="{}" --product-name="{}" --file-version="{}" --product-version="{}" --copyright="{}" --file-description="{}" --trademarks="{}"'.format(
|
EXE_OPTIONS = '--company-name="{}" --product-name="{}" --file-version="{}" --product-version="{}" --copyright="{}" --file-description="{}" --trademarks="{}"'.format(
|
||||||
COMPANY_NAME,
|
COMPANY_NAME,
|
||||||
PRODUCT_NAME,
|
PRODUCT_NAME,
|
||||||
|
|
|
@ -43,7 +43,6 @@ from npbackup.customization import (
|
||||||
LICENSE_FILE,
|
LICENSE_FILE,
|
||||||
)
|
)
|
||||||
from npbackup import configuration
|
from npbackup import configuration
|
||||||
from npbackup.windows.task import create_scheduled_task
|
|
||||||
from npbackup.core.runner import NPBackupRunner
|
from npbackup.core.runner import NPBackupRunner
|
||||||
from npbackup.core.i18n_helper import _t
|
from npbackup.core.i18n_helper import _t
|
||||||
from npbackup.path_helper import CURRENT_DIR, CURRENT_EXECUTABLE
|
from npbackup.path_helper import CURRENT_DIR, CURRENT_EXECUTABLE
|
||||||
|
@ -58,6 +57,9 @@ if not _NO_GUI:
|
||||||
sg.theme(PYSIMPLEGUI_THEME)
|
sg.theme(PYSIMPLEGUI_THEME)
|
||||||
sg.SetOptions(icon=OEM_ICON)
|
sg.SetOptions(icon=OEM_ICON)
|
||||||
|
|
||||||
|
if os.name == 'nt':
|
||||||
|
from npbackup.windows.task import create_scheduled_task
|
||||||
|
|
||||||
|
|
||||||
# Nuitka compat, see https://stackoverflow.com/a/74540217
|
# Nuitka compat, see https://stackoverflow.com/a/74540217
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Reference in a new issue