Fix darwin detection

This commit is contained in:
Orsiris de Jong 2023-06-11 15:02:48 +02:00
parent d1ada6d8d4
commit e09643cf0f
2 changed files with 8 additions and 3 deletions

View file

@ -7,7 +7,7 @@ __intname__ = "npbackup.compile"
__author__ = "Orsiris de Jong"
__copyright__ = "Copyright (C) 2023 NetInvent"
__license__ = "GPL-3.0-only"
__build__ = "2023033001"
__build__ = "2023061101"
__version__ = "1.8.3"
@ -178,6 +178,10 @@ def compile(arch, audience, no_gui=False):
program_executable = "npbackup.exe"
restic_executable = "restic.exe"
platform = "windows"
elif sys.platform.lower() == "darwin":
platform = "darwin"
program_executable = "npbackup"
restic_executable = "restic"
else:
program_executable = "npbackup"
restic_executable = "restic"

View file

@ -7,10 +7,11 @@ __intname__ = "npbackup.gui.core.restic_source_binary"
__author__ = "Orsiris de Jong"
__copyright__ = "Copyright (C) 2022-2023 NetInvent"
__license__ = "GPL-3.0-only"
__build__ = "2023061101"
__build__ = "2023061102"
import os
import sys
import glob
from npbackup.path_helper import BASEDIR
@ -26,7 +27,7 @@ def get_restic_internal_binary(arch):
binary = "restic_*_windows_amd64.exe"
else:
binary = "restic_*_windows_386.exe"
elif os.name == "darwin":
elif sys.platform.lower() == "darwin":
if arch == "arm64":
binary = "restic_*_darwin_arm64"
else: