mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-11 22:39:02 +08:00
Set arm64 architecture in UltiMaker-Cura.spec when compiling for M1
Contributes to #11841 Co-authored-by: "Justin F. Hallett" <thesin@southofheaven.org>
This commit is contained in:
parent
bfed341d97
commit
a2358277b1
10
conanfile.py
10
conanfile.py
@ -152,6 +152,14 @@ class CuraConan(ConanFile):
|
||||
py_interp = Path(*[f'"{p}"' if " " in p else p for p in py_interp.parts])
|
||||
return py_interp
|
||||
|
||||
@property
|
||||
def _pyinstaller_spec_arch(self):
|
||||
if self.settings.os == "Macos":
|
||||
if self.settings.arch == "armv8":
|
||||
return "'arm64'"
|
||||
return "'x86_64'"
|
||||
return "None"
|
||||
|
||||
def _generate_cura_version(self, location):
|
||||
with open(Path(__file__).parent.joinpath("CuraVersion.py.jinja"), "r") as f:
|
||||
cura_version_py = Template(f.read())
|
||||
@ -253,7 +261,7 @@ class CuraConan(ConanFile):
|
||||
osx_bundle_identifier = "'nl.ultimaker.cura'" if self.settings.os == "Macos" else "None",
|
||||
upx = str(self.settings.os == "Windows"),
|
||||
strip = False, # This should be possible on Linux and MacOS but, it can also cause issues on some distributions. Safest is to disable it for now
|
||||
target_arch = "'x86_64'" if self.settings.os == "Macos" else "None", # FIXME: Make this dependent on the settings.arch_target
|
||||
target_arch = self._pyinstaller_spec_arch,
|
||||
macos = self.settings.os == "Macos",
|
||||
version = f"'{version}'",
|
||||
short_version = f"'{cura_version.major}.{cura_version.minor}.{cura_version.patch}'",
|
||||
|
Loading…
x
Reference in New Issue
Block a user